Trigonometric Integrals

An odd power of sine or cosine gives way to a single substitution; an even power needs an identity first, and its area over one turn shows why. The substitution x = sin θ puts √(1 − x²) on a circle, where each term of the answer is a piece of the picture. Step through one, then try your own.

Even powers: halve the angle sin⁡2x=12(1−cos⁡2x)cos⁡2x=12(1+cos⁡2x)\begin{aligned}\sin^{2}x&=\tfrac12\left(1-\cos2x\right)\\ \cos^{2}x&=\tfrac12\left(1+\cos2x\right)\end{aligned}
An odd power: one factor becomes du sin⁡2k+1x=(1−cos⁡2x)ksin⁡xu=cos⁡x\begin{aligned}\sin^{2k+1}x&=\left(1-\cos^{2}x\right)^{k}\sin x\\ u&=\cos x\end{aligned}
A root of a² ± x² a2−x2: x=asin⁡θa2+x2: x=atan⁡θ\begin{aligned}\sqrt{a^{2}-x^{2}}&:\ x=a\sin\theta\\ \sqrt{a^{2}+x^{2}}&:\ x=a\tan\theta\end{aligned}
Loading interactive simulation...

Lesson

The theory — Trigonometric Integrals

Trigonometric integrals are integrals of products of powers of sin x and cos x, and trigonometric substitution turns the root of a quadratic into one of them: x = a sin θ for √(a² − x²), x = a tan θ for √(x² + a²) and x = a sec θ for √(x² − a²), each read off a right triangle. An odd power is integrated by peeling off one factor and substituting the other function. When every power is even, the half-angle identities sin²x = ½ − ½cos 2x and cos²x = ½ + ½cos 2x lower the powers first.

What each symbol means

θ
the angle of the substitution; for x = a sin θ it runs from −π/2 to π/2, where cos θ ≥ 0, so √(a² − x²) = a cos θ
c₀
the average of sinᵐx·cosⁿx over one turn: 0 if m or n is odd, and (m − 1)!!·(n − 1)!!/(m + n)!! if both are even, where n!! = n(n − 2)(n − 4)… down to 1 or 2, and 0!! = (−1)!! = 1

Where the formula comes from

  1. Why an even power climbs. For any antiderivative F of sinᵐx·cosⁿx, F(x + 2π) − F(x) is the area of one turn, 2π·c₀, whatever x is, so F(x) − c₀·x has period 2π. The substitutions u = cos x and u = sin x return a function of cos x or of sin x, which has period 2π itself, so they can give the whole answer only when c₀ = 0, that is, when some power is odd.
    F(x+2π)−F(x)=∫xx+2πsin⁡mtcos⁡nt dt=2πc0 ⇒ F(x)−c0x=F(x+2π)−c0(x+2π)F(x+2\pi)-F(x)=\int_{x}^{x+2\pi}\sin^{m}t\cos^{n}t\,dt=2\pi c_0\ \Rightarrow\ F(x)-c_0x=F(x+2\pi)-c_0(x+2\pi)

Problems solved in full

  1. An odd power of sine 3 steps

    Find ∫sin³x dx.

    Open this problem in the tool

    1. Keep one sin x for du and turn the other two into cosines:

      sin⁡3x=(1−cos⁡2x)sin⁡x,u=cos⁡x,du=−sin⁡x dx\sin^{3}x=\left(1-\cos^{2}x\right)\sin x,\qquad u=\cos x,\quad du=-\sin x\,dx
    2. A polynomial in u:

      ∫(1−u2)(−du)=−u+u33\int\left(1-u^{2}\right)(-du)=-u+\frac{u^{3}}{3}
    3. Back to x:

      −cos⁡x+cos⁡3x3+C-\cos x+\frac{\cos^{3}x}{3}+C

    Answer

    −cos x + cos³x/3 + C. du = −sin x dx carries a minus sign, and losing it flips every term; the tool calls that answer a wrong sign.

    ∫sin⁡3x dx=−cos⁡x+cos⁡3x3+C\int\sin^{3}x\,dx=-\cos x+\frac{\cos^{3}x}{3}+C
  2. An odd power of cosine beside an even sine 2 steps

    Find ∫sin²x cos³x dx.

    Open this problem in the tool

    Show solution
    1. The odd power is the cosine, so keep one cos x for du and write the rest in sines:

      sin⁡2xcos⁡3x=sin⁡2x(1−sin⁡2x)cos⁡x,u=sin⁡x,du=cos⁡x dx\sin^{2}x\cos^{3}x=\sin^{2}x\left(1-\sin^{2}x\right)\cos x,\qquad u=\sin x,\quad du=\cos x\,dx
    2. A polynomial in u = sin x:

      ∫(u2−u4)du=u33−u55\int\left(u^{2}-u^{4}\right)du=\frac{u^{3}}{3}-\frac{u^{5}}{5}

    Answer

    sin³x/3 − sin⁵x/5 + C. Whichever power is odd decides the substitution; when both are odd, either works.

    ∫sin⁡2xcos⁡3x dx=sin⁡3x3−sin⁡5x5+C\int\sin^{2}x\cos^{3}x\,dx=\frac{\sin^{3}x}{3}-\frac{\sin^{5}x}{5}+C
  3. Both powers even: halve the angle twice 3 steps

    Find ∫sin²x cos²x dx.

    Open this problem in the tool

    Show solution
    1. No odd power to spend on du. First the double angle:

      sin⁡xcos⁡x=12sin⁡2x ⇒ sin⁡2xcos⁡2x=14sin⁡22x\sin x\cos x=\tfrac12\sin2x\ \Rightarrow\ \sin^{2}x\cos^{2}x=\tfrac14\sin^{2}2x
    2. Then the half-angle identity on sin²2x:

      14sin⁡22x=18(1−cos⁡4x)\tfrac14\sin^{2}2x=\tfrac18\left(1-\cos4x\right)
    3. Integrate term by term:

      ∫18(1−cos⁡4x)dx=x8−sin⁡4x32+C\int\tfrac18\left(1-\cos4x\right)dx=\frac{x}{8}-\frac{\sin4x}{32}+C

    Answer

    x/8 − sin 4x/32 + C. The x/8 is the climb of an even power, an eighth per unit of x. Leave it off and the tool reports a derivative short by 1/8 everywhere.

    ∫sin⁡2xcos⁡2x dx=x8−sin⁡4x32+C\int\sin^{2}x\cos^{2}x\,dx=\frac{x}{8}-\frac{\sin4x}{32}+C
  4. Two different frequencies: product to sum 3 steps

    Find ∫sin 3x cos x dx.

    Open this problem in the tool

    Show solution
    1. A product of sines and cosines of different multiples of x is a sum in disguise:

      sin⁡Acos⁡B=12[sin⁡(A+B)+sin⁡(A−B)]\sin A\cos B=\tfrac12\left[\sin(A+B)+\sin(A-B)\right]
    2. With A = 3x and B = x:

      sin⁡3xcos⁡x=12(sin⁡4x+sin⁡2x)\sin3x\cos x=\tfrac12\left(\sin4x+\sin2x\right)
    3. Integrate each sine:

      ∫12(sin⁡4x+sin⁡2x)dx=−cos⁡4x8−cos⁡2x4+C\int\tfrac12\left(\sin4x+\sin2x\right)dx=-\frac{\cos4x}{8}-\frac{\cos2x}{4}+C

    Answer

    −cos 4x/8 − cos 2x/4 + C. The ½ in the identity is the factor that goes missing; without it the answer is twice as big, which is what the tool reports.

    ∫sin⁡3xcos⁡x dx=−cos⁡4x8−cos⁡2x4+C\int\sin3x\cos x\,dx=-\frac{\cos4x}{8}-\frac{\cos2x}{4}+C
  5. An identity first 2 steps

    Find ∫tan²x dx.

    Open this problem in the tool

    Show solution
    1. tan²x has no direct antiderivative, but sec²x does:

      tan⁡2x=sec⁡2x−1\tan^{2}x=\sec^{2}x-1
    2. Integrate term by term:

      ∫(sec⁡2x−1)dx=tan⁡x−x+C\int\left(\sec^{2}x-1\right)dx=\tan x-x+C

    Answer

    tan x − x + C. Writing only tan x forgets the −1; the tool reports a derivative 1 too large at every point.

    ∫tan⁡2x dx=tan⁡x−x+C\int\tan^{2}x\,dx=\tan x-x+C
  6. √(1 − x²): put x on the circle 3 steps

    Find ∫x²/√(1 − x²) dx.

    Open this problem in the tool

    Show solution
    1. Substitute x = sin θ, which turns the root into cos θ:

      x=sin⁡θ,dx=cos⁡θ dθ,1−x2=cos⁡θx=\sin\theta,\quad dx=\cos\theta\,d\theta,\quad \sqrt{1-x^{2}}=\cos\theta
    2. The cosines cancel and an even power of sine is left:

      ∫sin⁡2θcos⁡θcos⁡θ dθ=∫sin⁡2θ dθ=θ2−sin⁡2θ4\int\frac{\sin^{2}\theta}{\cos\theta}\cos\theta\,d\theta=\int\sin^{2}\theta\,d\theta=\frac{\theta}{2}-\frac{\sin2\theta}{4}
    3. Back to x, with sin 2θ = 2 sin θ cos θ:

      sin⁡2θ=2sin⁡θcos⁡θ=2x1−x2 ⇒ arcsin⁡x2−x1−x22+C\sin2\theta=2\sin\theta\cos\theta=2x\sqrt{1-x^{2}}\ \Rightarrow\ \frac{\arcsin x}{2}-\frac{x\sqrt{1-x^{2}}}{2}+C

    Answer

    (arcsin x − x√(1 − x²))/2 + C. The arcsin is the sector and the other term the triangle, as in the insight block on the triangle and the sector; here the triangle is subtracted.

    ∫x21−x2 dx=arcsin⁡x−x1−x22+C\int\frac{x^{2}}{\sqrt{1-x^{2}}}\,dx=\frac{\arcsin x-x\sqrt{1-x^{2}}}{2}+C
  7. x² + a²: put x on a tangent 3 steps

    Find ∫dx/(x² + 4)3/2.

    Open this problem in the tool

    Show solution
    1. Substitute x = 2 tan θ, so that x² + 4 = 4 sec²θ:

      x=2tan⁡θ,dx=2sec⁡2θ dθ,x2+4=4sec⁡2θx=2\tan\theta,\quad dx=2\sec^{2}\theta\,d\theta,\quad x^{2}+4=4\sec^{2}\theta
    2. Most of it cancels:

      ∫2sec⁡2θ8sec⁡3θ dθ=14∫cos⁡θ dθ=sin⁡θ4\int\frac{2\sec^{2}\theta}{8\sec^{3}\theta}\,d\theta=\frac14\int\cos\theta\,d\theta=\frac{\sin\theta}{4}
    3. Back to x through the triangle with opposite x, adjacent 2 and hypotenuse √(x² + 4):

      tan⁡θ=x2 ⇒ sin⁡θ=xx2+4 ⇒ x4x2+4+C\tan\theta=\frac{x}{2}\ \Rightarrow\ \sin\theta=\frac{x}{\sqrt{x^{2}+4}}\ \Rightarrow\ \frac{x}{4\sqrt{x^{2}+4}}+C

    Answer

    x/(4√(x² + 4)) + C. The ¼ comes from 2/8; leave it out and the tool reports a derivative four times the integrand.

    ∫dx(x2+4)3/2=x4x2+4+C\int\frac{dx}{\left(x^{2}+4\right)^{3/2}}=\frac{x}{4\sqrt{x^{2}+4}}+C
  8. sin⁸x over a turn, by a formula that calls itself 4 steps

    The page's powers stop at 6. What is the area of sin⁸x over one turn, and what is the slope of the line its antiderivative climbs? Press sin⁴x, by reduction: the page gives 2.3562 for sin⁴x, with average 0.3750.

    Open this problem in the tool

    Show solution
    1. Write sinⁿx = sinⁿ⁻¹x·sin x and integrate by parts with u = sinⁿ⁻¹x. Over a whole turn the boundary term −sinⁿ⁻¹x cos x is 0, and writing cos²x = 1 − sin²x brings Iₙ back on the right, so it can be solved for:

      In=∫02πsin⁡nx dx=[−sin⁡n−1xcos⁡x]02π+(n−1)∫02πsin⁡n−2x(1−sin⁡2x)dx ⇒ In=n−1n In−2I_n=\int_{0}^{2\pi}\sin^{n}x\,dx=\Big[-\sin^{n-1}x\cos x\Big]_{0}^{2\pi}+(n-1)\int_{0}^{2\pi}\sin^{n-2}x\left(1-\sin^{2}x\right)dx\ \Rightarrow\ I_n=\frac{n-1}{n}\,I_{n-2}
    2. Start from I₀ = 2π, the area of the constant 1 over a turn, and step up two powers at a time. I₄ is the page's figure:

      I0=2π,I2=12⋅2π=π,I4=34⋅π=3π4=2.3562I_0=2\pi,\qquad I_2=\tfrac12\cdot2\pi=\pi,\qquad I_4=\tfrac34\cdot\pi=\tfrac{3\pi}{4}=2{.}3562
    3. Two more steps reach sin⁸x:

      I6=56⋅3π4=5π8=1.9635,I8=78⋅5π8=35π64=1.7181I_6=\tfrac56\cdot\tfrac{3\pi}{4}=\tfrac{5\pi}{8}=1{.}9635,\qquad I_8=\tfrac78\cdot\tfrac{5\pi}{8}=\tfrac{35\pi}{64}=1{.}7181
    4. The slope of the climb is the area per turn divided by 2π:

      c0=I82π=35128=0.2734c_0=\frac{I_8}{2\pi}=\frac{35}{128}=0{.}2734

    Answer

    35π/64 ≈ 1.7181 per turn, a slope of 35/128 ≈ 0.2734. Each step multiplies by (n − 1)/n, so the average keeps falling, roughly like √(2/(πn)): that gives 0.2821 at n = 8, against the true 0.2734. Run the same reduction over a quarter turn for the odd powers too, where it starts from 1 instead of from π/2, squeeze each even power between its odd neighbours, and the ratios multiply into John Wallis's product π/2 = (2·2·4·4·6·6…)/(1·3·3·5·5·7…). He found it in Arithmetica infinitorum (1656), trying to compute the quarter circle's area ∫₀¹√(1 − x²) dx.

    ∫02πsin⁡8x dx=35π64≈1.7181,c0=35128≈0.2734\int_{0}^{2\pi}\sin^{8}x\,dx=\tfrac{35\pi}{64}\approx1{.}7181,\qquad c_0=\tfrac{35}{128}\approx0{.}2734

Supplementary problems, answers only

  1. Find ∫ sin²x dx.

    Show answer

    x/2 − sin 2x/4 + C, from sin²x = (1 − cos 2x)/2.

    x2−sin⁡2x4+C\frac{x}{2}-\frac{\sin2x}{4}+C
  2. Find ∫ tan³x sec²x dx.

    Show answer

    tan⁴x/4 + C, with u = tan x, because sec²x is its derivative.

    14tan⁡4x+C\tfrac14\tan^{4}x+C
  3. Find ∫ sin 5x sin 2x dx.

    Show answer

    sin 3x/6 − sin 7x/14 + C, from sin A sin B = ½(cos(A − B) − cos(A + B)).

    sin⁡3x6−sin⁡7x14+C\frac{\sin3x}{6}-\frac{\sin7x}{14}+C
  4. Find ∫ √(4 − x²) dx.

    Show answer

    2 arcsin(x/2) + x√(4 − x²)/2 + C, with x = 2 sin θ.

    2arcsin⁡x2+x4−x22+C2\arcsin\frac{x}{2}+\frac{x\sqrt{4-x^{2}}}{2}+C
  5. Evaluate ∫0π/2 cos³x dx.

    Show answer

    2/3. Write cos³x = (1 − sin²x) cos x and put u = sin x.

    ∫0π/2cos⁡3x dx=23\int_{0}^{\pi/2}\cos^{3}x\,dx=\tfrac23

Odd powers cancel over a turn, even powers pile up

Press sin³x: one turn. Between π and 2π, sin³x is the shape it had between 0 and π turned upside down, so the area over the turn is 0.0000. Its antiderivative, cos³x/3 − cos x, returns to its starting value every 2π, and that is the only kind of answer u = cos x or u = sin x can produce: a function of cos x, or of sin x, repeats every 2π. Now press sin²x: the missing x. sin²x is never negative, every turn adds π = 3.1416, and its antiderivative has to climb by π each turn, along the line x/2. No function of cos x does that, so no such substitution can find it. The half-angle identity sin²x = ½ − ½cos 2x can, because its constant ½ integrates to exactly the x/2 the climb needs. The trainer has −sin(2x)/4 typed for it, the half-angle answer with the x/2 left off, and the verdict finds it short by ½ at every point. The table gives the climb per turn for every power up to 6: 0 for each odd one, and π, 3π/4 and 5π/8 for the even.

The two terms of ∫√(1 − x²) are a triangle and a sector

Press Triangle and sector. √(1 − x²) is the top of the unit circle, so its area from 0 to x is a piece of the disc, and the radius to the point (x, √(1 − x²)) cuts that piece in two. Under the radius is a right triangle with legs x and √(1 − x²), area x√(1 − x²)/2. Beside it is a sector of angle θ = arcsin x, area θ/2. At x = 0.6 they hold 0.2400 and 0.3218, and the area is their sum, 0.5618. The antiderivative, (x√(1 − x²) + arcsin x)/2, is those two pieces, term for term. In θ the integrand is cos²θ, an even power: the strip below the dashed line at ½ is θ/2, the sector, and the rest of cos²θ integrates to sin 2θ/4, the triangle. Drag X to 1. The triangle flattens to nothing and the sector becomes a quarter of the disc, π/4 = 0.7854: a π out of an integrand that has none, because arcsin 1 is an angle.

π appears in ∫₀¹ xᵏ√(1 − x²) dx exactly when k is even

Press No angle needed. x√(1 − x²) from 0 to 1 is 0.3333, which is 1/3, and the angle term in the lower panel is 0.0000. The x in front is −½ times the derivative of 1 − x², so u = 1 − x² does the whole job, and the answer the trainer accepts, −(1 − x²)^(3/2)/3, contains no arcsin. Step through the integrand buttons: π appears in the area for k = 0, 2 and 4 (π/4, π/16, π/32) and never for k = 1, 3 and 5 (1/3, 2/15, 8/105). This is the first block's parity, moved onto the circle. Under x = sin θ, xᵏ√(1 − x²) dx becomes sinᵏθ·cos²θ dθ. An odd k leaves an odd power of sine, whose average over a turn is 0, so there is no θ term, and the θ term is the only place an arcsin x, or a π at x = 1, can come from. A √(1 − x²) beside an odd power of x never needs the triangle.

Learning path

Techniques of integration

References (3)