Paul's Online Notes
Home / Calculus I / Extras / Constant of Integration
Show Mobile Notice Show All Notes Hide All Notes
Mobile Notice
You appear to be on a device with a "narrow" screen width (i.e. you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 7-9 : Constant of Integration

In this section we need to address a couple of topics about the constant of integration. Throughout most calculus classes we play pretty fast and loose with it and because of that many students don’t really understand it or how it can be important.

First, let’s address how we play fast and loose with it. Recall that technically when we integrate a sum or difference we are actually doing multiple integrals. For instance,

$\int{{15{x^4} - 9{x^{ - 2}}\,dx}} = \int{{15{x^4}\,dx}} - \int{{9{x^{ - 2}}\,dx}}$

Upon evaluating each of these integrals we should get a constant of integration for each integral since we really are doing two integrals.

\begin{align*}\int{{15{x^4} - 9{x^{ - 2}}\,dx}} & = \int{{15{x^4}\,dx}} - \int{{9{x^{ - 2}}\,dx}}\\ & = 3{x^5} + c + 9{x^{ - 1}} + k\\ & = 3{x^5} + 9{x^{ - 1}} + c + k\end{align*}

Since there is no reason to think that the constants of integration will be the same from each integral we use different constants for each integral.

Now, both $$c$$ and $$k$$ are unknown constants and so the sum of two unknown constants is just an unknown constant and we acknowledge that by simply writing the sum as a $$c$$.

So, the integral is then,

$\int{{15{x^4} - 9{x^{ - 2}}\,dx}} = 3{x^5} + 9{x^{ - 1}} + c$

We also tend to play fast and loose with constants of integration in some substitution rule problems. Consider the following problem,

$\int{{\cos \left( {1 + 2x} \right) + \sin \left( {1 + 2x} \right)\,dx}} = \frac{1}{2}\int{{\cos u + \sin u\,du}}\hspace{0.25in}\hspace{0.25in}u = 1 + 2x$

Technically when we integrate we should get,

$\int{{\cos \left( {1 + 2x} \right) + \sin \left( {1 + 2x} \right)\,dx}} = \frac{1}{2}\left( {\sin u - \cos u + c} \right)$

Since the whole integral is multiplied by $$\frac{1}{2}$$, the whole answer, including the constant of integration, should be multiplied by $$\frac{1}{2}$$. Upon multiplying the $$\frac{1}{2}$$ through the answer we get,

$\int{{\cos \left( {1 + 2x} \right) + \sin \left( {1 + 2x} \right)\,dx}} = \frac{1}{2}\sin u - \frac{1}{2}\cos u + \frac{c}{2}$

However, since the constant of integration is an unknown constant dividing it by 2 isn’t going to change that fact so we tend to just write the fraction as a $$c$$.

$\int{{\cos \left( {1 + 2x} \right) + \sin \left( {1 + 2x} \right)\,dx}} = \frac{1}{2}\sin u - \frac{1}{2}\cos u + c$

In general, we don’t really need to worry about how we’ve played fast and loose with the constant of integration in either of the two examples above.

The real problem however is that because we play fast and loose with these constants of integration most students don’t really have a good grasp of them and don’t understand that there are times where the constants of integration are important and that we need to be careful with them.

To see how a lack of understanding about the constant of integration can cause problems consider the following integral.

$\int{{\frac{1}{{2x}}\,dx}}$

This is a really simple integral. However, there are two ways (both simple) to integrate it and that is where the problem arises.

The first integration method is to just break up the fraction and do the integral.

$\int{{\frac{1}{{2x}}\,dx}} = \int{{\frac{1}{2}\frac{1}{x}\,dx}} = \frac{1}{2}\ln \left| x \right| + c$

The second way is to use the following substitution.

$u = 2x\hspace{0.25in}\hspace{0.25in}du = 2dx\hspace{0.25in} \Rightarrow \hspace{0.25in}\,\,dx = \frac{1}{2}du$ $\int{{\frac{1}{{2x}}\,dx}} = \frac{1}{2}\int{{\frac{1}{u}\,du}} = \frac{1}{2}\ln \left| u \right| + c = \frac{1}{2}\ln \left| {2x} \right| + c$

Can you see the problem? We integrated the same function and got very different answers. This doesn’t make any sense. Integrating the same function should give us the same answer. We only used different methods to do the integral and both are perfectly legitimate integration methods. So, how can using different methods produce different answer?

The first thing that we should notice is that because we used a different method for each there is no reason to think that the constant of integration will in fact be the same number and so we really should use different letters for each.

$\int{{\frac{1}{{2x}}\,dx}} = \frac{1}{2}\ln \left| x \right| + c\hspace{0.25in}\hspace{0.25in}\hspace{0.25in}\hspace{0.25in}\int{{\frac{1}{{2x}}\,dx}} = \frac{1}{2}\ln \left| {2x} \right| + k$

Now, let’s take another look at the second answer. Using a property of logarithms we can write the answer to the second integral as follows,

\begin{align*}\int{{\frac{1}{{2x}}\,dx}} & = \frac{1}{2}\ln \left| {2x} \right| + k\\ & = \frac{1}{2}\left( {\ln 2 + \ln \left| x \right|} \right) + k\\ & = \frac{1}{2}\ln \left| x \right| + \frac{1}{2}\ln 2 + k\end{align*}

Upon doing this we can see that the answers really aren’t that different after all. In fact they only differ by a constant and we can even find a relationship between $$c$$ and $$k$$. It looks like,

$c = \frac{1}{2}\ln 2 + k$

So, without a proper understanding of the constant of integration, in particular using different integration techniques on the same integral will likely produce a different constant of integration, we might never figure out why we got “different” answers for the integral.

Note as well that getting answers that differ by a constant doesn’t violate any principles of calculus. In fact, we’ve actually seen a fact that suggested that this might happen. We saw a fact in the Mean Value Theorem section that said that if $$f'\left( x \right) = g'\left( x \right)$$ then $$f\left( x \right) = g\left( x \right) + c$$. In other words, if two functions have the same derivative then they can differ by no more than a constant.

This is exactly what we’ve got here. The two functions,

$f\left( x \right) = \frac{1}{2}\ln \left| x \right|\hspace{0.25in}\hspace{0.25in}\hspace{0.25in}\hspace{0.25in}\hspace{0.25in}g\left( x \right) = \frac{1}{2}\ln \left| {2x} \right|$

have exactly the same derivative,

$\frac{1}{{2x}}$

and as we’ve shown they really only differ by a constant.

There is another integral that also exhibits this behavior. Consider,

$\int{{\sin \left( x \right)\cos \left( x \right)\,dx}}$

There are actually three different methods for doing this integral.

Method 1 :
This method uses a trig formula,

$\sin \left( {2x} \right) = 2\sin \left( x \right)\cos \left( x \right)$

Using this formula (and a quick substitution) the integral becomes,

$\int{{\sin \left( x \right)\cos \left( x \right)\,dx}} = \frac{1}{2}\int{{\sin \left( {2x} \right)\,dx}} = - \frac{1}{4}\cos \left( {2x} \right) + {c_1}$

Method 2 :
This method uses the substitution,

$u = \cos \left( x \right)\hspace{0.25in}\hspace{0.25in}du = - \sin \left( x \right)dx$ $\int{{\sin \left( x \right)\cos \left( x \right)\,dx}} = - \int{{u\,du}} = - \frac{1}{2}{u^2} + {c_2} = - \frac{1}{2}{\cos ^2}\left( x \right) + {c_2}$

Method 3 :
Here is another substitution that could be done here as well.

$u = \sin \left( x \right)\hspace{0.25in}\hspace{0.25in}du = \cos \left( x \right)dx$ $\int{{\sin \left( x \right)\cos \left( x \right)\,dx}} = \int{{u\,du}} = \frac{1}{2}{u^2} + {c_3} = \frac{1}{2}{\sin ^2}\left( x \right) + {c_3}$

So, we’ve got three different answers each with a different constant of integration. However, according to the fact above these three answers should only differ by a constant since they all have the same derivative.

In fact, they do only differ by a constant. We’ll need the following trig formulas to prove this.

$\cos \left( {2x} \right) = {\cos ^2}\left( x \right) - {\sin ^2}\left( x \right)\hspace{0.25in}\hspace{0.25in}\hspace{0.25in}{\cos ^2}\left( x \right) + {\sin ^2}\left( x \right) = 1$

$- \frac{1}{4}\left( {{{\cos }^2}\left( x \right) - {{\sin }^2}\left( x \right)} \right) + {c_1}$

Now, from the second identity above we have,

${\sin ^2}\left( x \right) = 1 - {\cos ^2}\left( x \right)$

so, plug this in,

\begin{align*} - \frac{1}{4}\left( {{{\cos }^2}\left( x \right) - \left( {1 - {{\cos }^2}\left( x \right)} \right)} \right) + {c_1} & = - \frac{1}{4}\left( {2{{\cos }^2}\left( x \right) - 1} \right) + {c_1}\\ & = - \frac{1}{2}{\cos ^2}\left( x \right) + \frac{1}{4} + {c_1}\end{align*}

This is then answer we got from the second method with a slightly different constant. In other words,

${c_2} = \frac{1}{4} + {c_1}$

We can do a similar manipulation to get the answer from the third method. Again, starting with the answer from the first method use the double angle formula and then substitute in for the cosine instead of the sine using,

${\cos ^2}\left( x \right) = 1 - {\sin ^2}\left( x \right)$

Doing this gives,

\begin{align*} - \frac{1}{4}\left( {\left( {1 - {{\sin }^2}\left( x \right)} \right) - {{\sin }^2}\left( x \right)} \right) + {c_1} & = - \frac{1}{4}\left( {1 - 2{{\sin }^2}\left( x \right)} \right) + {c_1}\\ & = \frac{1}{2}{\sin ^2}\left( x \right) - \frac{1}{4} + {c_1}\end{align*}

which is the answer from the third method with a different constant and again we can relate the two constants by,

${c_3} = - \frac{1}{4} + {c_1}$

So, what have we learned here? Hopefully we’ve seen that constants of integration are important and we can’t forget about them. We often don’t work with them in a Calculus I course, yet without a good understanding of them we would be hard pressed to understand how different integration methods can apparently produce different answers.