Finding the Constant of Integration

One known point pins the whole curve down.

A family of curves

Integrating f'(x) = 2x gives f(x) = x² + C. That is not one function but a family: x² − 2, x², x² + 3 and every other choice of C. Each member is the curve y = x² slid up or down, and every member has gradient 2x.

Through any point there passes exactly one member. For the curve to pass through (a, b), the height a² + C must equal b, so C = b − a², one number. Knowing a single point on the curve is therefore enough to pick it out.

xy

Three members of the family y = x² + C: C = 3 in gold, C = 0 and C = −2. At x = 1 they stand at heights 4, 1 and −1. Only the gold curve, y = x² + 3, passes through (1, 4).

Substitute the point

Suppose the curve passes through (1, 4). That means f(1) = 4. Put x = 1 into f(x) = x² + C and set the result equal to 4: 4 = 1² + C. Subtract the 1, and C = 3.

So f(x) = x² + 3. Check both facts. The point lies on it, because 1² + 3 = 4. Its derivative is 2x, the gradient that was given. The family has collapsed to the one member that fits.

xy(1, 3)C = −2y(1) = 1 + C = −1−2−112−4−2246

y(1) = 1 + C = −1, not 3: this member of the family misses the point, so the initial condition rules it out

Drag C until the curve passes through (1, 3)

The family y = x² + C drawn faint, with the curve for C = −2 picked out and a ring at (1, 3). At x = 1 that curve stands at 1 + C = −1, below the ring. Drag C until the curve passes through the ring: 3 = 1 + C, so C = 2.

Longer examples

A cubic. f'(x) = 6x² − 4x + 1, and the curve passes through (2, 9). Integrate term by term: f(x) = 2x³ − 2x² + x + C. At x = 2 this is 16 − 8 + 2 + C = 10 + C, which must be 9, so C = −1 and f(x) = 2x³ − 2x² + x − 1. Check: f(2) = 16 − 8 + 2 − 1 = 9.

A negative power. dy/dx = 1/x², and y = 3 when x = 1. Integrate x⁻²: y = −1/x + C. At x = 1 this is −1 + C = 3, so C = 4 and y = 4 − 1/x. Check: at x = 1, 4 − 1 = 3. At x = 2 the same curve gives 4 − ½ = 3.5.

xy

The gold curve is y = 4 − 1/x, the member of the family −1/x + C that passes through (1, 3). The plain curve is y = −1/x, the member with C = 0, through (1, −1). The gold curve is 4 above it at every x.

Different constants, the same curve

The value of C depends on how the integral was written. Take f'(x) = 2x + 2 with f(0) = 5. Written as x² + 2x + C, the condition gives 0 + C = 5, so C = 5 and f(x) = x² + 2x + 5.

Written as (x + 1)² + C, which is also correct, the condition gives 1 + C = 5, so C = 4 and f(x) = (x + 1)² + 4. Multiply out: x² + 2x + 1 + 4 = x² + 2x + 5, the same function. The constants differ because the two forms differ by 1, but the curve through the point is the same.

This also shows that C is the starting value f(0) only when every other term is 0 at x = 0. In (x + 1)² + C the bracket is 1 at x = 0, so there C is f(0) − 1.

Two constants need two facts

When the second derivative is given, integrating twice brings in two constants. Suppose d²y/dx² = 6x. Integrating once: dy/dx = 3x² + A. Integrating again: y = x³ + Ax + B.

One point fixes only one of them, so two facts are needed. If y = 1 when x = 0, then B = 1. If also y = 4 when x = 1, then 1 + A + 1 = 4, so A = 2 and y = x³ + 2x + 1. Check: at x = 0 this is 1, at x = 1 it is 1 + 2 + 1 = 4, and differentiating twice gives 6x.

The usual mistakes

Putting the point into the derivative. f'(1) = 2 says nothing about where the curve is; the point goes into f(x) = x² + C, after integrating.

Taking the y-value as C. For the point (1, 4), x² already contributes 1 at x = 1, so C is 4 − 1 = 3, not 4.

Subtracting the wrong way round. 4 = 1 + C gives C = 4 − 1 = 3; writing C = 1 − 4 = −3 puts the curve through (1, −2) instead.

Dropping the C and then finding nothing to adjust. Integrate with + C first, then use the point.

A counting loop

In the application below, a loop in a motorway counts vehicles. The flow rate past it is given, integrating it gives the count up to a constant, and the counter's reading at 7:00 fixes the constant.

Worked example: A Motorway Counting Loop: The Traffic Recovered From the Flow Rate Past It

Question A counting loop set into a motorway carriageway records every vehicle that passes over it. From 7:00 the flow past the loop is dNdm = 6 + 0.9m − 0.015m2 vehicles per minute, where m is the number of minutes after 7:00 and N is the loop's running count. The counter read 8000 at 7:00. (a) What does the counter read at 7:20? (b) How many vehicles pass the loop between 7:00 and 8:00?

  1. 1.The count is an antiderivative of the flow rate. Integrating term by term with the power rule, N = ∫ (6 + 0.9m − 0.015m2)dm = 6m + 0.45m2 − 0.005m3 + C.

    051015200204060m, minutes after 7:00vehicles per minuteN = 6m + 0.45m2− 0.005m3+ C
    051015200204060m, minutes after 7:00vehicles per minuteN = 6m + 0.45m2− 0.005m3+ C
    The count is an antiderivative of the flow rate: N = 6m + 0.45m2 − 0.005m3 + C.
  2. 2.Fix the constant from the reading at a known time. At m = 0 every term in m vanishes, so N = C there, and the counter read 8000. Hence C = 8000 and N = 8000 + 6m + 0.45m2 − 0.005m3.

    051015200204060m, minutes after 7:00vehicles per minuteN = 6m + 0.45m2− 0.005m3+ Cat m = 0 the counter read 8000, so C = 8000
    051015200204060m, minutes after 7:00vehicles per minuteN = 6m + 0.45m2− 0.005m3+ Cat m = 0 the counter read 8000, so C = 8000
    At m = 0 every term in m vanishes, so the reading of 8000 gives C = 8000.
  3. 3.(a) At 7:20, m = 20. Then 6 × 20 = 120, 0.45 × 400 = 180 and 0.005 × 8000 = 40, so N = 8000 + 120 + 180 − 40 = 8260. The counter reads 8260, which is 260 vehicles in the twenty minutes.

    051015200204060m, minutes after 7:00vehicles per minute260N = 6m + 0.45m2− 0.005m3+ Cat m = 0 the counter read 8000, so C = 8000(a) N(20) = 8000 + 120 + 180 − 40 = 8260
    051015200204060m, minutes after 7:00vehicles per minute260N = 6m + 0.45m2− 0.005m3+ Cat m = 0 the counter read 8000, so C = 8000(a) N(20) = 8000 + 120 + 180 − 40 = 8260
    (a) N(20) = 8000 + 120 + 180 − 40 = 8260: the shaded area is the 260 vehicles of the twenty minutes.
  4. 4.(b) The traffic in the hour is the change in the count, N(60) − N(0), and the 8000 cancels in the difference. With 6 × 60 = 360, 0.45 × 3600 = 1620 and 0.005 × 216000 = 1080, the change is 360 + 1620 − 1080 = 900 vehicles. Check: the flow is 6 a minute at each end of the hour and 19.5 a minute at its busiest, at m = 30; a mean of 15 a minute for 60 minutes is 900, which agrees.

    051015200204060m, minutes after 7:00vehicles per minute260900 in the hourN = 6m + 0.45m2− 0.005m3+ Cat m = 0 the counter read 8000, so C = 8000(a) N(20) = 8000 + 120 + 180 − 40 = 8260(b) 360 + 1620 − 1080 = 900 vehicles
    051015200204060m, minutes after 7:00vehicles per minute260900 in the hourN = 6m + 0.45m2− 0.005m3+ Cat m = 0 the counter read 8000, so C = 8000(a) N(20) = 8000 + 120 + 180 − 40 = 8260(b) 360 + 1620 − 1080 = 900 vehicles
    (b) Over the hour the count rises by 360 + 1620 − 1080 = 900, the whole area under the rate curve.

Answer: (a) the counter reads 8260, which is 260 vehicles in the twenty minutes; (b) 900 vehicles between 7:00 and 8:00

Common mistakes

  • Dropping the constant of integration because the question asks for a total. Without C the formula gives the traffic SINCE 7:00, not the counter's reading, and part (a) comes out as 260 instead of 8260. A reading at one known time is exactly what fixes the constant, and here it is the 8000 at m = 0.
  • Putting m = 1 in for one hour. The rate is given in vehicles per minute, so m must be counted in minutes and an hour is m = 60. Using m = 1 gives 6.435 vehicles, which is the traffic in the first minute alone.

More techniques of integration problems, worked step by step →

Practice Finding the Constant of Integration in the app