Integrating Trigonometric Functions

The trig derivatives, run in reverse.

Cosine integrates to sine

Integration undoes differentiation, so every derivative of a trigonometric function, read backwards, is an integral. Sine differentiates to cosine, so cosine integrates to sine: ∫ cos x dx = sin x + C.

Check by differentiating the answer. sin x + C differentiates to cos x, and the C, a constant, differentiates to 0. That returns the integrand exactly, so the integral is right.

xy

The gold curve is y = sin x and the plain curve is y = cos x, with x in radians. At x = 0, sine climbs with gradient 1, and cos 0 = 1. At x = π/2, sine is at its top and has gradient 0, and cos(π/2) = 0. At x = π, sine falls with gradient −1, and cos π = −1. The height of the cosine is the gradient of the sine everywhere.

Walking the ring backwards

Differentiating four times brings sine back to itself: sin x goes to cos x, cos x goes to −sin x, −sin x goes to −cos x, and −cos x goes back to sin x. Written in a ring, differentiation is one step forwards.

Integration is one step backwards. The step before sin x on the ring is −cos x, so ∫ sin x dx = −cos x + C. That is where the minus sign comes from: cos x differentiates to −sin x, so it is −cos x that differentiates to sin x. Check: −cos x differentiates to −(−sin x) = sin x.

The other two follow the same way. The step before −sin x is cos x, so ∫ (−sin x) dx = cos x + C, and the step before −cos x is −sin x, so ∫ (−cos x) dx = −sin x + C. Each one checks by differentiating, and the minus signs land where the ring puts them.

Radians only

These results hold when x is in radians. Only there does sin x differentiate to exactly cos x. Measured in degrees, an angle of x° is πx/180 radians, so by the chain rule the derivative of sin(x°) is (π/180) cos(x°), and every integral would carry the factor 180/π the other way.

So in every integral of sine or cosine, the limits and the angles are in radians: π for half a turn, π/2 for a quarter.

A multiple of x inside

When the angle is 3x rather than x, the chain rule makes sin 3x differentiate to 3 cos 3x, three times too much. So divide by the 3: ∫ cos 3x dx = (sin 3x)/3 + C. Check: (sin 3x)/3 differentiates to (3 cos 3x)/3 = cos 3x.

Any linear bracket works the same way, dividing by the multiplier of x: ∫ sin(2x + 1) dx = −(cos(2x + 1))/2 + C. Check: −(cos(2x + 1))/2 differentiates to −(−2 sin(2x + 1))/2 = sin(2x + 1).

One arch of sine

From x = 0 to x = π, the curve y = sin x makes one arch above the x-axis. Its area is the definite integral of sin x from 0 to π, and the antiderivative −cos x gives it at once: [−cos x]₀^π = (−cos π) − (−cos 0).

Now cos π = −1, so −cos π = 1, and cos 0 = 1, so −cos 0 = −1. The area is 1 − (−1) = 2, exactly.

The picture agrees. The arch sits inside a rectangle π wide and 1 tall, of area π ≈ 3.14, and it contains the triangle with the same base and a peak at (π/2, 1), of area π/2 ≈ 1.57. The area 2 lies between the two.

xy

One arch of y = sin x, shaded from x = 0 to x = π, with its top at (π/2, 1). The shaded area is [−cos x]₀^π = 1 − (−1) = 2.

Other limits

The area under y = cos x from 0 to π/2 is one quarter-wave: [sin x]₀^(π/2) = sin(π/2) − sin 0 = 1 − 0 = 1.

With the multiple inside, the integral of cos 3x from 0 to π/6 is [(sin 3x)/3]₀^(π/6). At π/6 the angle 3x is π/2, so the value is 1/3 − 0 = 1/3. This quarter-wave of cos 3x is three times narrower than the quarter-wave of cos x from 0 to π/2, and its area is a third as much.

Over a whole wave, from 0 to 2π, the integral of sin x is [−cos x]₀^(2π) = (−1) − (−1) = 0. The second arch lies below the x-axis, so it counts as −2, and it cancels the first.

xy

A whole wave of y = sin x, shaded from x = 0 to x = 2π. The arch above the axis counts as 2 and the arch below it as −2, so the integral over the wave is 0.

The usual mistakes

The minus on the wrong function. ∫ cos x dx = sin x + C has no minus; it is ∫ sin x dx = −cos x + C that carries one. Differentiating the answer settles it every time.

Taking a function as its own integral. cos x differentiates to −sin x, not to cos x, so ∫ cos x dx is not cos x + C. Only eˣ is its own derivative.

Forgetting to divide by the multiplier. ∫ cos 3x dx is (sin 3x)/3 + C, not sin 3x + C, which differentiates to 3 cos 3x.

Working in degrees. The integral of cos x from 0 to 90 is not 1; 90 radians is not a right angle. Use π/2.

Practice Integrating Trigonometric Functions in the app