Type a command or search the notes. Tab cycles completions. Up and down recall history when blank. Escape dismisses, then leaves the prompt.
MATH
[1251]

Trigonometric integrals

Powers and products of sine, cosine, tangent and secant.

This page integrates powers and products of sine, cosine, tangent and secant. Each case is recognised by the shape of the integrand:

  • One power odd in ∫cos⁡mxsin⁡nx dx\int \cos^m x \sin^n x \, dx: peel one factor and substitute u=sin⁡xu=\sin x or u=cos⁡xu=\cos x.
  • Both powers even: use the double-angle identities to lower the powers.
  • Different frequencies, such as ∫cos⁡(mx)sin⁡(nx) dx\int \cos(mx)\sin(nx) \, dx: use a product-to-sum identity.
  • Powers of tan⁡x\tan x and sec⁡x\sec x: use 1+tan⁡2x=sec⁡2x1+\tan^2 x=\sec^2 x with ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x=\sec^2 x and ddxsec⁡x=tan⁡xsec⁡x\frac{d}{dx}\sec x=\tan x\sec x.

For high powers that recur with a lower index, reduction formulae organise the repeated integration by parts. A quadratic surd calls for trigonometric and hyperbolic substitutions instead.

Throughout, mm and nn are non-negative integers. An indefinite antiderivative involving tan⁡x\tan x or sec⁡x\sec x holds on an interval that does not cross a zero of cos⁡x\cos x.

Odd powers of sine or cosine

[METHOD]

Odd power of sine or cosine

To evaluate ∫cos⁡mxsin⁡nx dx\int \cos^m x \sin^n x \, dx when at least one of m,nm,n is odd:

  1. If mm is odd, factor out cos⁡x\cos x to obtain ∫cos⁡m−1xsin⁡nxcos⁡x dx\int \cos^{m-1} x \sin^n x \cos x \, dx. If nn is odd, factor out sin⁡x\sin x to obtain ∫cos⁡mxsin⁡n−1xsin⁡x dx\int \cos^m x \sin^{n-1} x \sin x \, dx.
  2. The leftover power is even. Replace it using sin⁡2x+cos⁡2x=1\sin^2 x+\cos^2 x=1.
  3. Substitute u=sin⁡xu=\sin x or u=cos⁡xu=\cos x. The binomial expansion (a+b)k(a+b)^k is usually needed before the powers of uu can be integrated.

Always peel from an odd power. Peeling from an even power leaves an odd remainder, which 1=sin⁡2x+cos⁡2x1=\sin^2 x+\cos^2 x cannot turn into a polynomial in the substitution variable. If both mm and nn are odd, either factor works, although the two antiderivatives need not look the same.

[EXAMPLE]

∫cos⁡4xsin⁡3x dx\int \cos^4 x \sin^3 x \, dx

Here mm is even and nn is odd. Peel sin⁡x\sin x and replace sin⁡2x=1−cos⁡2x\sin^2 x=1-\cos^2 x:

∫cos⁡4xsin⁡3x dx=∫cos⁡4xsin⁡2xsin⁡x dx=∫cos⁡4x(1−cos⁡2x)sin⁡x dx=∫(cos⁡4x−cos⁡6x)sin⁡x dx.\begin{aligned} \int \cos^4 x \sin^3 x \, dx &=\int \cos^4 x \sin^2 x \sin x \, dx \\ &=\int \cos^4 x (1-\cos^2 x) \sin x \, dx \\ &=\int (\cos^4 x-\cos^6 x) \sin x \, dx. \end{aligned}

Let u=cos⁡xu=\cos x, so du=−sin⁡x dxdu=-\sin x \, dx. The integral is

−∫(u4−u6) du=−u55+u77+C=−cos⁡5x5+cos⁡7x7+C.-\int (u^4-u^6) \, du=-\frac{u^5}{5}+\frac{u^7}{7}+C=-\frac{\cos^5 x}{5}+\frac{\cos^7 x}{7}+C.
[EXAMPLE]

∫cos⁡5xsin⁡4x dx\int \cos^5 x \sin^4 x \, dx

Here mm is odd and nn is even. Peel cos⁡x\cos x and replace cos⁡2x=1−sin⁡2x\cos^2 x=1-\sin^2 x:

∫cos⁡5xsin⁡4x dx=∫cos⁡4xsin⁡4xcos⁡x dx=∫(1−sin⁡2x)2sin⁡4xcos⁡x dx=∫(sin⁡4x−2sin⁡6x+sin⁡8x)cos⁡x dx.\begin{aligned} \int \cos^5 x \sin^4 x \, dx &=\int \cos^4 x \sin^4 x \cos x \, dx \\ &=\int (1-\sin^2 x)^2 \sin^4 x \cos x \, dx \\ &=\int \bigl(\sin^4 x-2\sin^6 x+\sin^8 x\bigr) \cos x \, dx. \end{aligned}

Let u=sin⁡xu=\sin x, so du=cos⁡x dxdu=\cos x \, dx. The integral is

∫(u4−2u6+u8) du=u55−2u77+u99+C=sin⁡5x5−2sin⁡7x7+sin⁡9x9+C.\int (u^4-2u^6+u^8) \, du=\frac{u^5}{5}-\frac{2u^7}{7}+\frac{u^9}{9}+C=\frac{\sin^5 x}{5}-\frac{2\sin^7 x}{7}+\frac{\sin^9 x}{9}+C.
[EXAMPLE]

∫cos⁡5xsin⁡5x dx\int \cos^5 x \sin^5 x \, dx

Both mm and nn are odd. Factoring out cos⁡x\cos x and substituting u=sin⁡xu=\sin x (so du=cos⁡x dxdu=\cos x \, dx),

∫cos⁡5xsin⁡5x dx=∫cos⁡4xsin⁡5xcos⁡x dx=∫(1−sin⁡2x)2sin⁡5xcos⁡x dx=∫(sin⁡5x−2sin⁡7x+sin⁡9x)cos⁡x dx=∫(u5−2u7+u9) du=u66−2u88+u1010+C=sin⁡6x6−sin⁡8x4+sin⁡10x10+C.\begin{aligned} \int \cos^5 x \sin^5 x \, dx &=\int \cos^4 x \sin^5 x \cos x \, dx \\ &=\int (1-\sin^2 x)^2 \sin^5 x \cos x \, dx \\ &=\int \bigl(\sin^5 x-2\sin^7 x+\sin^9 x\bigr) \cos x \, dx \\ &=\int (u^5-2u^7+u^9) \, du \\ &=\frac{u^6}{6}-\frac{2u^8}{8}+\frac{u^{10}}{10}+C \\ &=\frac{\sin^6 x}{6}-\frac{\sin^8 x}{4}+\frac{\sin^{10} x}{10}+C. \end{aligned}

Factoring out sin⁡x\sin x instead produces a different-looking formula. Both formulas have derivative cos⁡5xsin⁡5x\cos^5x\sin^5x, so on any interval they differ by a constant.

Even powers of sine and cosine

[METHOD]

Both powers even

To evaluate ∫cos⁡mxsin⁡nx dx\int \cos^m x \sin^n x \, dx when both mm and nn are even, use

cos⁡2α=1+cos⁡2α2,sin⁡2α=1−cos⁡2α2\cos^2\alpha=\frac{1+\cos 2\alpha}{2},\qquad \sin^2\alpha=\frac{1-\cos 2\alpha}{2}

to rewrite the integrand as a sum of integrals of the form ∫cos⁡k(2x) dx\int \cos^k(2x) \, dx. Integrate any odd kk by the odd-power substitution in 2x2x; apply the double-angle identities again to any remaining even kk.

After expanding, the constant and cos⁡2x\cos 2x terms integrate immediately. Because the argument is 2x2x, the odd-power substitution is u=sin⁡2xu=\sin 2x, with du=2cos⁡2x dxdu=2\cos 2x\, dx.

[EXAMPLE]

∫cos⁡2x dx\int \cos^2 x \, dx and ∫sin⁡2x dx\int \sin^2 x \, dx

When one of mm or nn is zero the identities are the whole calculation:

∫cos⁡2x dx=∫1+cos⁡2x2 dx=x2+sin⁡2x4+C,\int \cos^2 x \, dx=\int \frac{1+\cos 2x}{2} \, dx=\frac{x}{2}+\frac{\sin 2x}{4}+C,∫sin⁡2x dx=∫1−cos⁡2x2 dx=x2−sin⁡2x4+C.\int \sin^2 x \, dx=\int \frac{1-\cos 2x}{2} \, dx=\frac{x}{2}-\frac{\sin 2x}{4}+C.
[EXAMPLE]

∫cos⁡2xsin⁡4x dx\int \cos^2 x \sin^4 x \, dx

Both powers are even, so

∫cos⁡2xsin⁡4x dx=∫1+cos⁡2x2(1−cos⁡2x2)2 dx=18∫(1+cos⁡2x)(1−cos⁡2x)2 dx.\int \cos^2 x \sin^4 x \, dx=\int \frac{1+\cos 2x}{2}\left(\frac{1-\cos 2x}{2}\right)^2 \, dx=\frac{1}{8}\int (1+\cos 2x)(1-\cos 2x)^2 \, dx.

Expanding and cancelling −cos⁡2x-\cos 2x against +cos⁡2x+\cos 2x gives

(1+cos⁡2x)(1−2cos⁡2x+cos⁡22x)=1−cos⁡2x−cos⁡22x+cos⁡32x,(1+\cos 2x)(1-2\cos 2x+\cos^2 2x)=1-\cos 2x-\cos^2 2x+\cos^3 2x,

so the integral is

18(∫1 dx−∫cos⁡2x dx−∫cos⁡22x dx+∫cos⁡32x dx).\frac{1}{8}\left(\int 1 \, dx-\int\cos 2x \, dx-\int\cos^2 2x \, dx+\int\cos^3 2x \, dx\right).

The first two integrals evaluate to xx and 12sin⁡2x\frac{1}{2}\sin 2x. For the even square, cos⁡22x=1+cos⁡4x2\cos^2 2x=\frac{1+\cos 4x}{2}. For the odd cube, cos⁡32x=(1−sin⁡22x)cos⁡2x\cos^3 2x=(1-\sin^2 2x)\cos 2x. Thus the integral equals

18[x−sin⁡2x2−∫1+cos⁡4x2 dx+∫(1−sin⁡22x)cos⁡2x dx].\frac{1}{8}\left[x-\frac{\sin 2x}{2}-\int\frac{1+\cos 4x}{2} \, dx+\int(1-\sin^2 2x)\cos 2x \, dx\right].

The remaining cosine-square integral is x2+sin⁡4x8\frac{x}{2}+\frac{\sin 4x}{8}. For the last integral, let u=sin⁡2xu=\sin 2x, so du=2cos⁡2x dxdu=2\cos 2x \, dx and cos⁡2x dx=12 du\cos 2x \, dx=\tfrac12 \, du. Collecting factors,

x8−sin⁡2x16−x16−sin⁡4x64+116∫(1−u2) du=x16−sin⁡2x16−sin⁡4x64+116(u−u33)+C.\frac{x}{8}-\frac{\sin 2x}{16}-\frac{x}{16}-\frac{\sin 4x}{64}+\frac{1}{16}\int (1-u^2) \, du =\frac{x}{16}-\frac{\sin 2x}{16}-\frac{\sin 4x}{64}+\frac{1}{16}\left(u-\frac{u^3}{3}\right)+C.

Back-substituting u=sin⁡2xu=\sin 2x yields

x16−sin⁡2x16−sin⁡4x64+sin⁡2x16−sin⁡32x48+C=x16−sin⁡4x64−sin⁡32x48+C.\frac{x}{16}-\frac{\sin 2x}{16}-\frac{\sin 4x}{64}+\frac{\sin 2x}{16}-\frac{\sin^3 2x}{48}+C=\frac{x}{16}-\frac{\sin 4x}{64}-\frac{\sin^3 2x}{48}+C.

Products at distinct frequencies

The methods above treat powers of sin⁡x\sin x and cos⁡x\cos x at a single argument. The integrals ∫cos⁡(mx)sin⁡(nx) dx\int \cos(mx)\sin(nx) \, dx, ∫cos⁡(mx)cos⁡(nx) dx\int \cos(mx)\cos(nx) \, dx and ∫sin⁡(mx)sin⁡(nx) dx\int \sin(mx)\sin(nx) \, dx mix two frequencies and a product-to-sum identity separates them.

[METHOD]

Product-to-sum

Convert the product to a sum, then integrate term by term:

sin⁡Acos⁡B=12(sin⁡(A+B)+sin⁡(A−B))\sin A\cos B=\tfrac12\bigl(\sin(A+B)+\sin(A-B)\bigr)cos⁡Acos⁡B=12(cos⁡(A+B)+cos⁡(A−B))\cos A\cos B=\tfrac12\bigl(\cos(A+B)+\cos(A-B)\bigr)sin⁡Asin⁡B=−12(cos⁡(A+B)−cos⁡(A−B))\sin A\sin B=-\tfrac12\bigl(\cos(A+B)-\cos(A-B)\bigr)

The minus sign on sin⁡Asin⁡B\sin A\sin B is the one most often dropped.

[EXAMPLE]

∫sin⁡3xsin⁡2x dx\int \sin 3x \sin 2x \, dx

With A=3xA=3x and B=2xB=2x,

∫sin⁡3xsin⁡2x dx=−12∫(cos⁡5x−cos⁡x) dx=−12(sin⁡5x5−sin⁡x)+C=−sin⁡5x10+sin⁡x2+C.\begin{aligned} \int \sin 3x \sin 2x \, dx &=-\frac{1}{2}\int \bigl(\cos 5x-\cos x\bigr) \, dx \\ &=-\frac{1}{2}\left(\frac{\sin 5x}{5}-\sin x\right)+C \\ &=-\frac{\sin 5x}{10}+\frac{\sin x}{2}+C. \end{aligned}

[exam]

  1. [1]:Product-to-sum

Powers of tangent and secant

[DEFINITION]

Tangent and secant

The identities used to integrate ∫tan⁡mxsec⁡nx dx\int \tan^m x \sec^n x \, dx are

1+tan⁡2x=sec⁡2x,ddxtan⁡x=sec⁡2x,ddxsec⁡x=tan⁡xsec⁡x.1+\tan^2 x=\sec^2 x,\qquad \frac{d}{dx}\tan x=\sec^2 x,\qquad \frac{d}{dx}\sec x=\tan x\sec x.

The two derivative identities are why u=tan⁡xu=\tan x and u=sec⁡xu=\sec x match a leftover factor of sec⁡2x\sec^2 x or tan⁡xsec⁡x\tan x\sec x.

[EXAMPLE]

∫tan⁡x dx\int \tan x \, dx and ∫sec⁡x dx\int \sec x \, dx

Writing tan⁡x=sin⁡xcos⁡x\tan x=\frac{\sin x}{\cos x},

∫tan⁡x dx=∫sin⁡xcos⁡x dx=−ln⁡∣cos⁡x∣+C.\int \tan x \, dx=\int \frac{\sin x}{\cos x} \, dx=-\ln|\cos x|+C.

For the secant integral, multiply numerator and denominator by sec⁡x+tan⁡x\sec x+\tan x:

∫sec⁡x dx=∫sec⁡x(sec⁡x+tan⁡x)sec⁡x+tan⁡x dx=∫sec⁡2x+sec⁡xtan⁡xsec⁡x+tan⁡x dx=ln⁡∣sec⁡x+tan⁡x∣+C,\int \sec x \, dx=\int \frac{\sec x(\sec x+\tan x)}{\sec x+\tan x} \, dx=\int \frac{\sec^2 x+\sec x\tan x}{\sec x+\tan x} \, dx=\ln|\sec x+\tan x|+C,

since the numerator is then the derivative of the denominator.

[routine]

  1. [1]:Tangent and secant
[DEFINITION]

Tangent and secant

The identities used to integrate ∫tan⁡mxsec⁡nx dx\int \tan^m x \sec^n x \, dx are

1+tan⁡2x=sec⁡2x,ddxtan⁡x=sec⁡2x,ddxsec⁡x=tan⁡xsec⁡x.1+\tan^2 x=\sec^2 x,\qquad \frac{d}{dx}\tan x=\sec^2 x,\qquad \frac{d}{dx}\sec x=\tan x\sec x.
[METHOD]

Powers of tangent and secant

To evaluate ∫tan⁡mxsec⁡nx dx\int \tan^m x \sec^n x \, dx:

  • If nn is a positive even integer, factor out sec⁡2x\sec^2 x and substitute u=tan⁡xu=\tan x. Convert remaining powers of sec⁡\sec by 1+tan⁡2x=sec⁡2x1+\tan^2 x=\sec^2 x.
  • If n=0n=0, use tan⁡2x=sec⁡2x−1\tan^2 x=\sec^2 x-1 to lower the power of tan⁡\tan by two, with ∫dx\int dx and ∫tan⁡x dx\int\tan x\,dx as base cases.
  • If nn is odd:
    • If mm is odd, factor out tan⁡xsec⁡x\tan x\sec x and substitute u=sec⁡xu=\sec x. Convert remaining powers of tan⁡\tan by tan⁡2x=sec⁡2x−1\tan^2 x=\sec^2 x-1.
    • If mm is even, write tan⁡mx=(sec⁡2x−1)m/2\tan^m x=(\sec^2 x-1)^{m/2} and expand into powers of sec⁡x\sec x. Reduce odd secant powers by parts until only ∫sec⁡x dx\int\sec x\,dx remains.

The first rule needs nn even: factoring out sec⁡2x\sec^2 x when nn is odd leaves an unmatched sec⁡x\sec x, so u=tan⁡xu=\tan x does not absorb the whole integrand.

For the odd secant powers Sℓ=∫sec⁡ℓx dxS_\ell=\int\sec^\ell x\,dx, the integration by parts used below for S3S_3 gives the reduction formula

Sℓ=sec⁡ℓ−2xtan⁡xℓ−1+ℓ−2ℓ−1Sℓ−2,ℓ≥3.S_\ell=\frac{\sec^{\ell-2}x\tan x}{\ell-1}+\frac{\ell-2}{\ell-1}S_{\ell-2},\qquad \ell\ge3.

To derive it, split sec⁡ℓx=sec⁡ℓ−2xsec⁡2x\sec^\ell x=\sec^{\ell-2}x\sec^2x to get Sℓ=sec⁡ℓ−2xtan⁡x−(ℓ−2)∫sec⁡ℓ−2xtan⁡2x dxS_\ell=\sec^{\ell-2}x\tan x-(\ell-2)\int\sec^{\ell-2}x\tan^2x\,dx, substitute tan⁡2x=sec⁡2x−1\tan^2x=\sec^2x-1 and collect the resulting copy of SℓS_\ell. Stop at S1=ln⁡∣sec⁡x+tan⁡x∣S_1=\ln|\sec x+\tan x| and add one arbitrary constant at the end.

[EXAMPLE]

∫sec⁡3x dx\int \sec^3 x \, dx

Write I=∫sec⁡3x dxI=\int \sec^3 x \, dx. Split the integrand as sec⁡x⋅sec⁡2x\sec x\cdot\sec^2 x and integrate by parts with u=sec⁡xu=\sec x and dv=sec⁡2x dxdv=\sec^2 x \, dx, so du=sec⁡xtan⁡x dxdu=\sec x\tan x \, dx and v=tan⁡xv=\tan x. Then

I=sec⁡xtan⁡x−∫sec⁡xtan⁡2x dx.I=\sec x\tan x-\int \sec x\tan^2 x \, dx.

Replace tan⁡2x=sec⁡2x−1\tan^2 x=\sec^2 x-1:

I=sec⁡xtan⁡x−∫sec⁡x(sec⁡2x−1) dx=sec⁡xtan⁡x−∫sec⁡3x dx+∫sec⁡x dx.I=\sec x\tan x-\int \sec x(\sec^2 x-1) \, dx=\sec x\tan x-\int \sec^3 x \, dx+\int \sec x \, dx.

The first integral on the right is II again, so

2I=sec⁡xtan⁡x+∫sec⁡x dx=sec⁡xtan⁡x+ln⁡∣sec⁡x+tan⁡x∣+C.2I=\sec x\tan x+\int \sec x \, dx=\sec x\tan x+\ln|\sec x+\tan x|+C.

After dividing by 22 (and absorbing the factor into the arbitrary constant),

I=12sec⁡xtan⁡x+12ln⁡∣sec⁡x+tan⁡x∣+C.I=\frac{1}{2}\sec x\tan x+\frac{1}{2}\ln|\sec x+\tan x|+C.
[EXAMPLE]

∫sec⁡4xtan⁡2x dx\int \sec^4 x \tan^2 x \, dx

The power of sec⁡\sec is even, so factor out sec⁡2x\sec^2 x:

∫sec⁡4xtan⁡2x dx=∫sec⁡2xtan⁡2xsec⁡2x dx.\int \sec^4 x \tan^2 x \, dx=\int \sec^2 x \tan^2 x \sec^2 x \, dx.

Let u=tan⁡xu=\tan x, so du=sec⁡2x dxdu=\sec^2 x \, dx. The remaining sec⁡2x\sec^2 x is 1+tan⁡2x1+\tan^2 x and the integral becomes

∫(1+tan⁡2x)tan⁡2xsec⁡2x dx=∫(1+u2)u2 du=∫(u2+u4) du=u33+u55+C=tan⁡3x3+tan⁡5x5+C.\int (1+\tan^2 x)\tan^2 x \sec^2 x \, dx=\int (1+u^2)u^2 \, du=\int (u^2+u^4) \, du=\frac{u^3}{3}+\frac{u^5}{5}+C=\frac{\tan^3 x}{3}+\frac{\tan^5 x}{5}+C.
[EXAMPLE]

∫sec⁡xtan⁡3x dx\int \sec x \tan^3 x \, dx

Here mm and nn are both odd, so factor out tan⁡xsec⁡x\tan x\sec x:

∫sec⁡xtan⁡3x dx=∫tan⁡2x (tan⁡xsec⁡x) dx.\int \sec x \tan^3 x \, dx=\int \tan^2 x\,(\tan x\sec x) \, dx.

Let u=sec⁡xu=\sec x, so du=sec⁡xtan⁡x dxdu=\sec x\tan x \, dx. Replace tan⁡2x=sec⁡2x−1\tan^2 x=\sec^2 x-1:

∫(sec⁡2x−1)tan⁡xsec⁡x dx=∫(u2−1) du=u33−u+C=sec⁡3x3−sec⁡x+C.\int (\sec^2 x-1)\tan x\sec x \, dx=\int (u^2-1) \, du=\frac{u^3}{3}-u+C=\frac{\sec^3 x}{3}-\sec x+C.
[EXAMPLE]

∫sec⁡xtan⁡2x dx\int \sec x \tan^2 x \, dx

Here nn is odd and mm is even. Replace tan⁡2x=sec⁡2x−1\tan^2 x=\sec^2 x-1:

∫sec⁡xtan⁡2x dx=∫sec⁡x(sec⁡2x−1) dx=∫sec⁡3x dx−∫sec⁡x dx.\int \sec x \tan^2 x \, dx=\int \sec x(\sec^2 x-1) \, dx=\int \sec^3 x \, dx-\int \sec x \, dx.

The antiderivatives of sec⁡x\sec x and sec⁡3x\sec^3 x found above give

12sec⁡xtan⁡x+12ln⁡∣sec⁡x+tan⁡x∣−ln⁡∣sec⁡x+tan⁡x∣+C=12sec⁡xtan⁡x−12ln⁡∣sec⁡x+tan⁡x∣+C.\frac{1}{2}\sec x\tan x+\frac{1}{2}\ln|\sec x+\tan x|-\ln|\sec x+\tan x|+C=\frac{1}{2}\sec x\tan x-\frac{1}{2}\ln|\sec x+\tan x|+C.

On this page