Constant Of Integration

To single out one particular antiderivative from the family F ( x ) + C , we need one extra piece of information: the value of the antiderivative at a specific point. This is called an initial condition.

Concept Meaning
F ( x ) + C General antiderivative (family of curves)
Initial condition f ( x 0 ) = y 0 Fixes the value of C
Particular solution The unique antiderivative satisfying the initial condition
Geometric meaning of C Vertical shift of the curve y = F ( x )

Determination of the Constant of Integration

To determine the constant of integration, in addition to the given function to be integrated, we need extra data. Specifically, the extra data is the value of the antiderivative at a point. Let us illustrate this by means of examples.

Find f if f'(x) = x^3 - 3x + 1 + e^x and f ( 0 ) = 1 .

Solution\begin{aligned} f(x) = \int f'(x)\,dx &= \int(x^3 - 3x + 1 + e^x)\,dx \\ &= \frac{1}{4}x^4 - \frac{3}{2}x^2 + x + e^x + C. \end{aligned}

To determine C , we use the condition f ( 0 ) = 1 :

f ( 0 ) = 0 0 + 0 + e 0 = 1 + C = 1 C = 2 ,

so

f ( x ) = 1 4 x 4 3 2 x 2 + x + e x 2.

Find f if f''(x) = 3\sin x + 5x, f ( 0 ) = 1 , and f'(0) = 0.

Solution\begin{aligned} f'(x) &= \int f''(x)\,dx \\ &= \int(3\sin x + 5x)\,dx \\ &= -3\cos x + \frac{5}{2}x^2 + C. \end{aligned}

Because f'(0) = 0, we have

3 cos 0 = 1 + 5 2 ( 0 ) + C = 0 C = 3.

Therefore, f'(x) = -3\cos x + \dfrac{5}{2}x^2 + 3, and

\begin{aligned} f(x) &= \int f'(x)\,dx \\ &= \int\left(-3\cos x + \frac{5}{2}x^2 + 3\right)\,dx \\ &= -3\sin x + \frac{5}{6}x^3 + 3x + D. \end{aligned}

To determine D , we impose the condition f ( 0 ) = 1 :

\begin{aligned} f(0) &= -3\underbrace{\sin 0}_{=0} + \frac{5}{6}(0) + 3(0) + D \\ &= 1 \end{aligned} D = 1.

Therefore

f ( x ) = 3 sin x + 5 6 x 3 + 3 x + 1.

Find f , if f''(x) = 1 - x^2, f ( 0 ) = 2 , and f ( 1 ) = 1 .

Solution\begin{aligned} f'(x) &= \int f''(x)\,dx \\ &= \int(1-x^2)\,dx \\ &= x - \frac{x^3}{3} + C, \end{aligned}

and

\begin{aligned} f(x) &= \int f'(x)\,dx \\ &= \int\left(x - \frac{x^3}{3} + C\right)\,dx \\ &= \frac{1}{2}x^2 - \frac{1}{12}x^4 + Cx + D. \end{aligned}

To determine C and D , we use the given conditions f ( 0 ) = 2 and f ( 1 ) = 1 :

f ( 0 ) = 0 0 + 0 + D = 2 D = 2 ,

and

\begin{aligned} f(1) &= \frac{1}{2}(1^2) - \frac{1}{12}(1^4) + C(1) + 2 \\ &= -1 \end{aligned} C = 41 12 .

Therefore, the required function is

f ( x ) = 1 2 x 2 1 12 x 4 41 12 x + 2.

Geometrical Significance of the Constant of Integration

Suppose we want to determine the equation of the curve at every point of which the tangent line has the slope 3 x 2 2 x .

Because the slope of the tangent to a curve at a point is d y / d x or f'(x), we have by the hypothesis

f'(x) = 3x^2 - 2x.

Therefore, by integration we have

f ( x ) = ( 3 x 2 2 x ) d x = x 3 x 2 + C ,

where C is the constant of integration. This family of functions is shown in the figure below, where we see curves for various choices of C . There are an infinite number of them. All of them have the same value of f' (or d y / d x ); that is, they have the same slope (or the same direction) for the same value of x . Also, notice that the difference in the lengths of their y -values remains the same for all values of x . Hence, all of these curves can be obtained by moving any one of them vertically up or down, the value of C in this case not affecting the slope of the curve.

Graphs of y = x³ − x² + C for various values of C, showing a family of parallel curves shifted vertically.
Graphs of y = x 3 x 2 + C for various values of C .

If in this example, we impose the additional condition that the curve shall pass through the point ( 1 , 2 ) , then the coordinates of this point must satisfy y = x 3 x 2 + C , giving

2 = 1 1 + C , or C = 2.

Hence, the particular curve required is

y = x 3 x 2 + 2.

Exercises


Find f in each case, using the given initial condition to determine the constant of integration:


(a) f'(x) = 6x^{2}-4x+5,   f ( 1 ) = 3

(b) f'(x) = \dfrac{1}{x}+2x,   f ( 1 ) = 4 ,   x > 0

(c) f'(\theta) = 2\cos\theta-\sec^{2}\theta,   f ( 0 ) = 5

(d) f'(x) = \dfrac{4}{\sqrt{1-x^{2}}},   f ( 1 2 ) = 0

Answer

(a) f ( x ) = 2 x 3 2 x 2 + 5 x 2

(b) f ( x ) = ln x + x 2 + 3

(c) f ( θ ) = 2 sin θ tan θ + 5

(d) f ( x ) = 4 arcsin x 2 π 3

Solution

In every part the method is the same: integrate to get the general antiderivative F ( x ) + C , then substitute the given point to solve for C .


(a) Integrating term by term, f ( x ) = 2 x 3 2 x 2 + 5 x + C .

Imposing f ( 1 ) = 3 :

\begin{aligned} 2-2+5+C &= 3 \\ C &= -2, \end{aligned}

so f ( x ) = 2 x 3 2 x 2 + 5 x 2 .


(b) Using d x x = ln | x | + C and restricting to x > 0 , f ( x ) = ln x + x 2 + C .

Imposing f ( 1 ) = 4 and recalling ln 1 = 0 :

0 + 1 + C = 4 C = 3 ,

so f ( x ) = ln x + x 2 + 3 .


(c) Integrating, f ( θ ) = 2 sin θ tan θ + C .

Since sin 0 = 0 and tan 0 = 0 , the condition f ( 0 ) = 5 gives C = 5 directly, so

f ( θ ) = 2 sin θ tan θ + 5.
(d) Integrating, f ( x ) = 4 arcsin x + C .

Here the condition is imposed at x = 1 2 , where arcsin 1 2 = π 6 :

\begin{aligned} 4\cdot\frac{\pi}{6}+C &= 0 \\ C &= -\frac{2\pi}{3}, \end{aligned}

so f ( x ) = 4 arcsin x 2 π 3 . Notice that the initial condition need not be given at x = 0 .


Find f if f''(x) = 12x^{2}-6x,   f'(0) = 1,   and f ( 0 ) = 2 .

Answer

f ( x ) = x 4 x 3 + x 2

Solution

Two integrations are needed, and each one introduces its own constant. Determine the first constant before integrating again.


Step 1: integrate f'' to get f'. \begin{aligned} f'(x) &= \int\left(12x^{2}-6x\right)dx \\ &= 4x^{3}-3x^{2}+C. \end{aligned}

The condition f'(0) = 1 gives 0 0 + C = 1 , so C = 1 and

f'(x) = 4x^{3}-3x^{2}+1.
Step 2: integrate f' to get f . \begin{aligned} f(x) &= \int\left(4x^{3}-3x^{2}+1\right)dx \\ &= x^{4}-x^{3}+x+D. \end{aligned}

The condition f ( 0 ) = 2 gives D = 2 , so

f ( x ) = x 4 x 3 + x 2.


Find f if f''(x) = \sin x+\cos x,   f'(0) = 2,   and f ( 0 ) = 3 .

Answer

f ( x ) = sin x cos x + 3 x + 4

Solution
Step 1. Integrating once, \begin{aligned} f'(x) &= \int\left(\sin x+\cos x\right)dx \\ &= -\cos x+\sin x+C. \end{aligned}

Since cos 0 = 1 and sin 0 = 0 , the condition f'(0) = 2 gives

1 + 0 + C = 2 C = 3 ,

so f'(x) = -\cos x+\sin x+3.


Step 2. Integrating again, \begin{aligned} f(x) &= \int\left(-\cos x+\sin x+3\right)dx \\ &= -\sin x-\cos x+3x+D. \end{aligned}

The condition f ( 0 ) = 3 gives

\begin{aligned} 0-1+0+D &= 3 \\ D &= 4, \end{aligned}

so f ( x ) = sin x cos x + 3 x + 4 .


Find f if f''(x) = 6x+2,   f ( 0 ) = 3 ,   and f ( 1 ) = 1 .

Answer

f ( x ) = x 3 + x 2 4 x + 3

Solution

Here both conditions are values of f itself, so neither constant can be found until after the second integration. Carry both constants along.


Step 1. \begin{aligned} f'(x) &= \int\left(6x+2\right)dx \\ &= 3x^{2}+2x+C. \end{aligned}
Step 2. Integrating again, and remembering that the term C integrates to C x , \begin{aligned} f(x) &= \int\left(3x^{2}+2x+C\right)dx \\ &= x^{3}+x^{2}+Cx+D. \end{aligned}
Step 3: impose the two conditions. From f ( 0 ) = 3 , 0 + 0 + 0 + D = 3 D = 3.

From f ( 1 ) = 1 ,

\begin{aligned} 1+1+C+3 &= 1 \\ C &= -4. \end{aligned}

Therefore f ( x ) = x 3 + x 2 4 x + 3 .


In each case, find the equation of the curve whose slope at every point ( x , y ) is the given expression and which passes through the given point:


(a) slope 4 x 3 , through ( 2 , 5 )

(b) slope 1 x 2 , through ( 1 , 2 )

(c) slope 3 x , through ( 4 , 10 )

Answer

(a) y = 2 x 2 3 x + 3

(b) y = 1 x + 3

(c) y = 2 x 3 / 2 6

Solution

The slope at every point is d y d x , so integrating the given slope produces the whole family of curves. The point then selects one member of that family.


(a) From d y d x = 4 x 3 , y = 2 x 2 3 x + C .

Substituting ( 2 , 5 ) :

\begin{aligned} 8-6+C &= 5 \\ C &= 3, \end{aligned}

so y = 2 x 2 3 x + 3 .


(b) From d y d x = x 2 , y = x 1 1 + C = 1 x + C .

Substituting ( 1 , 2 ) gives 1 + C = 2 , so C = 3 and

y = 1 x + 3.
(c) From d y d x = 3 x 1 / 2 , y = 3 x 3 / 2 3 / 2 + C = 2 x 3 / 2 + C .

Substituting ( 4 , 10 ) , and using 4 3 / 2 = 8 :

\begin{aligned} 2(8)+C &= 10 \\ C &= -6, \end{aligned}

so y = 2 x 3 / 2 6 .


Consider the family y = x 3 x 2 + C studied in this section.


(a) Which member of the family passes through ( 1 , 0 ) ?

(b) Show that any two members of the family have the same slope at each fixed value of x , and that their difference is constant.

(c) Is there a member of the family passing through both ( 1 , 0 ) and ( 2 , 5 ) ? Explain.

Answer

(a) y = x 3 x 2 + 2

(b) Every member has slope 3 x 2 2 x , and two members differ by the constant C 1 C 2 .

(c) No. The point ( 1 , 0 ) forces C = 0 , and that curve passes through ( 2 , 4 ) , not ( 2 , 5 ) .

Solution
(a) Substituting x = 1 , y = 0 : \begin{aligned} (-1)^{3}-(-1)^{2}+C &= 0 \\ -1-1+C &= 0 \\ C &= 2, \end{aligned}

so the curve is y = x 3 x 2 + 2 .


(b) Let y 1 = x 3 x 2 + C 1 and y 2 = x 3 x 2 + C 2 . Differentiating, the constants disappear: d y 1 d x = d y 2 d x = 3 x 2 2 x .

So at any fixed x the two curves have the same slope, meaning they are parallel in direction. Subtracting,

y 1 y 2 = C 1 C 2 ,

which does not depend on x . This is exactly the vertical shift described in the section: the curves are congruent, one lying a fixed distance above the other.


(c) The point ( 1 , 0 ) requires 1 1 + C = 0 C = 0 ,

so the only candidate is y = x 3 x 2 . At x = 2 this gives 8 4 = 4 , not 5 . Hence no member passes through both points. In general one point determines C completely, so a second point is one condition too many.


Each of the following contains a mistake. Identify it and correct the work:


(a) Given f''(x) = 6x, a student writes f'(x) = 3x^{2}+C and then f ( x ) = x 3 + C x + C .

(b) Given f'(x) = 2x+1 and f ( 0 ) = 3 , a student writes f ( x ) = x 2 + x , then says " f ( 0 ) = 0 , so C = 3 ", and reports f ( x ) = x 2 + x .

(c) Given f'(x) = 4x^{3} and f ( 1 ) = 2 , a student writes f ( x ) = x 4 + C and determines C from f'(1) = 4.

Answer

(a) The second integration needs a new constant: f ( x ) = x 3 + C x + D .

(b) The constant was found but never inserted: f ( x ) = x 2 + x + 3 .

(c) The condition must be applied to f , not to f': C = 1 , so f ( x ) = x 4 + 1 .

Solution
(a) Each integration introduces an arbitrary constant, and there is no reason for the two to be equal. Reusing the same letter silently imposes the extra relation D = C , which throws away one degree of freedom. The correct general form is f ( x ) = x 3 + C x + D ,

with C and D independent. Two conditions are then required to pin both of them down.


(b) The antiderivative was written without its constant, so there was nothing for the initial condition to adjust. Starting correctly, f ( x ) = x 2 + x + C .

Now f ( 0 ) = 0 + 0 + C = C , and the condition f ( 0 ) = 3 gives C = 3 . Hence

f ( x ) = x 2 + x + 3.
(c) The constant of integration lives in f , not in f'. Differentiating x 4 + C removes C entirely, so f'(1) carries no information about it. Using the condition that was actually given, \begin{aligned} f(1) = 1^{4}+C &= 2 \\ C &= 1, \end{aligned}

so f ( x ) = x 4 + 1 .


The initial condition need not be given at the origin. Find f in each case:


(a) f'(x) = \dfrac{1}{x},   f ( e ) = 0 ,   x > 0

(b) f'(x) = \dfrac{1}{1+x^{2}},   f ( 1 ) = 0

Answer

(a) f ( x ) = ln x 1

(b) f ( x ) = arctan x π 4

Solution
(a) Integrating, f ( x ) = ln x + C for x > 0 . Since ln e = 1 , the condition f ( e ) = 0 gives 1 + C = 0 C = 1 ,

so f ( x ) = ln x 1 .


(b) Integrating, f ( x ) = arctan x + C . Since arctan 1 = π 4 , the condition f ( 1 ) = 0 gives π 4 + C = 0 C = π 4 ,

so f ( x ) = arctan x π 4 .

In both parts the point chosen was one where the antiderivative takes a value we happen to know exactly. That is the only reason such points are convenient; any point in the domain would do.


Find f if f'''(x) = 24x,   f''(0) = 2,   f'(0) = -1,   and f ( 0 ) = 0 .

Answer

f ( x ) = x 4 + x 2 x

Solution

Three integrations, three constants, and three conditions. Determine each constant as soon as its condition becomes usable.


Step 1. f''(x) = \int 24x\,dx = 12x^{2}+A.

From f''(0) = 2 we get A = 2 , so f''(x) = 12x^{2}+2.


Step 2. \begin{aligned} f'(x) &= \int\left(12x^{2}+2\right)dx \\ &= 4x^{3}+2x+B. \end{aligned}

From f'(0) = -1 we get B = 1 , so f'(x) = 4x^{3}+2x-1.


Step 3. \begin{aligned} f(x) &= \int\left(4x^{3}+2x-1\right)dx \\ &= x^{4}+x^{2}-x+D. \end{aligned}

From f ( 0 ) = 0 we get D = 0 . Therefore

f ( x ) = x 4 + x 2 x .

In general, recovering f from its n -th derivative requires n conditions.


Let F ( x ) = sin 2 x and G ( x ) = 1 2 cos 2 x .


(a) Verify that F and G are both antiderivatives of sin 2 x .

(b) Find the constant by which they differ.

(c) In each family, find the member whose value at x = 0 is 1 , and check that the two answers describe the same function.

Answer

(a) F'(x) = G'(x) = \sin 2x.

(b) F ( x ) G ( x ) = 1 2 .

(c) sin 2 x + 1 and 1 2 cos 2 x + 3 2 , which are the same function.

Solution
(a) Using the Chain Rule and the double-angle identity 2 sin x cos x = sin 2 x , \begin{aligned} F'(x) &= 2\sin x\cos x = \sin 2x, \\ G'(x) &= -\tfrac{1}{2}\left(-2\sin 2x\right) = \sin 2x. \end{aligned}
(b) Using cos 2 x = 1 2 sin 2 x , \begin{aligned} F(x)-G(x) &= \sin^{2}x+\tfrac{1}{2}\cos 2x \\ &= \sin^{2}x+\tfrac{1}{2}\left(1-2\sin^{2}x\right) \\ &= \tfrac{1}{2}. \end{aligned}

The difference is constant, exactly as the theory predicts: two antiderivatives of the same function on an interval can differ only by a constant.


(c) For the first family, F ( 0 ) + C = 0 + C = 1 , so C = 1 and the member is sin 2 x + 1 . For the second, G ( 0 ) + C = 1 2 + C = 1 , so C = 3 2 and the member is 1 2 cos 2 x + 3 2 . These agree, since \begin{aligned} -\tfrac{1}{2}\cos 2x+\tfrac{3}{2} &= -\tfrac{1}{2}\left(1-2\sin^{2}x\right)+\tfrac{3}{2} \\ &= \sin^{2}x+1. \end{aligned}

The lesson is that two correct answers to the same integration problem may look different while describing the same family of curves.


A curve has slope 3 x 2 at every point and passes through ( 1 , 3 ) .


(a) Find its equation.

(b) Find the member of the same family that passes through the origin.

(c) State the vertical distance between the two curves, and explain why it does not depend on x .

Answer

(a) y = x 3 + 2

(b) y = x 3

(c) The vertical distance is 2 for every x , because the two curves differ only by the constant of integration.

Solution
(a) Integrating the slope, y = 3 x 2 d x = x 3 + C .

Substituting ( 1 , 3 ) gives 1 + C = 3 , so C = 2 and y = x 3 + 2 .


(b) The origin gives 0 = 0 + C , so C = 0 and y = x 3 .
(c) Subtracting the two equations, ( x 3 + 2 ) x 3 = 2.

The x 3 terms cancel because the two curves share the same antiderivative and differ only in C . This is the geometric meaning of the constant of integration: changing C slides the entire curve up or down without bending it, so the gap between two members is the same at every x .


A challenge on the fine print. On the interval ( 0 , ) the general antiderivative of 1 x is ln | x | + C . Explain why, on the domain of all x 0 , the function

F(x) = \begin{cases} \ln|x|+1, & x>0 \\ \ln|x|-5, & x<0 \end{cases}

is also an antiderivative of 1 x , and say what this means for the phrase "the constant of integration".

Answer

F'(x) = \dfrac{1}{x} on both pieces, because a constant differentiates to zero regardless of which constant it is. The result that two antiderivatives differ by a single constant requires an interval; the set x 0 is two separate intervals, so each piece carries its own independent constant.

Solution

Differentiate on each piece separately. For x > 0 ,

d d x ( ln x + 1 ) = 1 x ,

and for x < 0 , writing | x | = x ,

d d x ( ln ( x ) 5 ) = 1 x = 1 x .

So F'(x) = \dfrac{1}{x} at every point where F is defined, even though F is not of the form ln | x | + C for any single number C .


The reason is that the theorem behind the constant of integration, that two functions with the same derivative on an interval differ by a constant, is a consequence of the Mean Value Theorem, and the Mean Value Theorem needs the two points it compares to be joined by a path inside the domain. The set { x 0 } is not an interval; it is the union of the two separate intervals ( , 0 ) and ( 0 , ) . Nothing connects them, so the constant on one side is free of the constant on the other.


This is why the formulas in this chapter are always stated on an interval, and why writing d x x = ln | x | + C is understood to mean "on any interval not containing 0 ". In practice the initial condition tells you which side you are on, and that is the side you work with.