27.3 Trigonometric Integrals

SL 5.10 AHL 5.16

In this section you will learn
  • how to integrate \(\sin x\), \(\cos x\) and \(\sec^2 x\), and the same functions of \(ax + b\)
  • how to integrate \(f'(x)\sin\big[f(x)\big]\) and similar products by inspection
  • how to integrate \(\sin^2 x\) and \(\cos^2 x\) using a double angle identity
  • how to integrate \(\tan^2 x\) and \(\cot^2 x\) using a Pythagorean identity
  • (Extension) how to integrate products such as \(\sin 3x\cos x\)

\(\sin x\) and \(\cos x\) are SL. The integrals of \(\sec^2 x\), \(\sec x\tan x\), \(\operatorname{cosec}^2 x\) and \(\operatorname{cosec} x\cot x\) come from the HL derivatives in AHL 5.15 and are marked AHL. Angles are always in radians.

Basic rules

Each rule below is a derivative read backwards. For example, \(\dfrac{\mathrm{d}}{\mathrm{d}x}(-\cos x) = \sin x\).

Integrals of sine, cosine and secant squared Partly in the formula booklet

\[ \int \sin x\,\mathrm{d}x = -\cos x + C, \qquad \int \cos x\,\mathrm{d}x = \sin x + C \]

In the booklet

\[ \int \sec^2 x\,\mathrm{d}x = \tan x + C. \]

With a linear expression inside (\(a \neq 0\)), divide by \(a\):

\[ \begin{gathered} \int \cos(ax + b)\,\mathrm{d}x = \frac{1}{a}\sin(ax + b) + C, \\ \int \sin(ax + b)\,\mathrm{d}x = -\frac{1}{a}\cos(ax + b) + C, \end{gathered} \]

\[ \int \sec^2(ax + b)\,\mathrm{d}x = \frac{1}{a}\tan(ax + b) + C. \]

  • \(C\): the constant of integration
  • \(a\): the coefficient of \(x\) (\(a \neq 0\))
  • \(b\): the constant term

\(\sec^2 x\) appears in the booklet only as the derivative of \(\tan x\) (HL 5.15).

Example 1 Find

(a) \(\displaystyle\int \left(\frac{\pi}{4} - 2\sin x\right)\mathrm{d}x\)

(b) AHL \(\displaystyle\int \frac{5 - 3\cos^2 x}{2\cos^2 x}\,\mathrm{d}x\)

(a) \(\dfrac{\pi}{4}\) is a constant. \(\displaystyle\int \left(\frac{\pi}{4} - 2\sin x\right)\mathrm{d}x = \frac{\pi}{4}x + 2\cos x + C\)

(b) Split the fraction: \(\dfrac{5}{2\cos^2 x} - \dfrac{3\cos^2 x}{2\cos^2 x} = \dfrac{5}{2}\sec^2 x - \dfrac{3}{2}\).

\[ \int \left(\frac{5}{2}\sec^2 x - \frac{3}{2}\right)\mathrm{d}x = \frac{5}{2}\tan x - \frac{3}{2}x + C \]

Example 2 Find

(a) \(\displaystyle\int \cos 5x\,\mathrm{d}x\)

(b) \(\displaystyle\int \sin\left(3x - \frac{\pi}{4}\right)\mathrm{d}x\)

(c) AHL \(\displaystyle\int \tan^2(3x - \pi)\,\mathrm{d}x\)

(a) \(\dfrac{1}{5}\sin 5x + C\)

(b) \(-\dfrac{1}{3}\cos\left(3x - \dfrac{\pi}{4}\right) + C\)

(c) There is no direct rule for \(\tan^2\). Use \(1 + \tan^2\theta = \sec^2\theta\), so \(\tan^2\theta = \sec^2\theta - 1\):

\[ \int \left[\sec^2(3x - \pi) - 1\right]\mathrm{d}x = \frac{1}{3}\tan(3x - \pi) - x + C. \]

(Since \(\tan\) has period \(\pi\), this is also \(\dfrac{1}{3}\tan 3x - x + C\).)

Further trigonometric integrals by inspection

The chain rule gives, for example, \(\dfrac{\mathrm{d}}{\mathrm{d}x}\cos\big[f(x)\big] = -f'(x)\sin\big[f(x)\big]\). Reading each trigonometric derivative backwards gives a pattern.

Trigonometric integrals by inspection Not in the formula booklet

Integral Result
\(\int f'(x)\sin\big[f(x)\big]\,\mathrm{d}x\) \(-\cos\big[f(x)\big] + C\)
\(\int f'(x)\cos\big[f(x)\big]\,\mathrm{d}x\) \(\sin\big[f(x)\big] + C\)
AHL \(\int f'(x)\sec^2\big[f(x)\big]\,\mathrm{d}x\) \(\tan\big[f(x)\big] + C\)
AHL \(\int f'(x)\sec\big[f(x)\big]\tan\big[f(x)\big]\,\mathrm{d}x\) \(\sec\big[f(x)\big] + C\)
AHL \(\int f'(x)\operatorname{cosec}\big[f(x)\big]\cot\big[f(x)\big]\,\mathrm{d}x\) \(-\operatorname{cosec}\big[f(x)\big] + C\)
AHL \(\int f'(x)\operatorname{cosec}^2\big[f(x)\big]\,\mathrm{d}x\) \(-\cot\big[f(x)\big] + C\)
  • \(f(x)\): a function of \(x\) (the inside function)
  • \(f'(x)\): the derivative of \(f(x)\)
  • \(C\): the constant of integration

The HL booklet lists the derivatives of \(\tan x\), \(\sec x\), \(\operatorname{cosec} x\) and \(\cot x\) (5.15).

Example 3 Find

(a) \(\displaystyle\int 4x\sin\left(x^2\right)\mathrm{d}x\)

(b) AHL \(\displaystyle\int x^3\sec^2\left(x^4\right)\mathrm{d}x\)

(a) \(f(x) = x^2\), \(f'(x) = 2x\), so \(4x = 2f'(x)\):

\[ \int 4x\sin\left(x^2\right)\mathrm{d}x = -2\cos\left(x^2\right) + C. \]

(b) \(f(x) = x^4\), \(f'(x) = 4x^3\), so \(x^3 = \dfrac{1}{4}f'(x)\):

\[ \int x^3\sec^2\left(x^4\right)\mathrm{d}x = \frac{1}{4}\tan\left(x^4\right) + C. \]

Squares of sine and cosine

There is no direct rule for \(\sin^2 x\) or \(\cos^2 x\). Rearrange the double angle identity \(\cos 2\theta = 2\cos^2\theta - 1 = 1 - 2\sin^2\theta\):

Lowering the power Not in the formula booklet

\[ \cos^2\theta = \frac{1}{2}\left(1 + \cos 2\theta\right), \qquad \sin^2\theta = \frac{1}{2}\left(1 - \cos 2\theta\right). \]

The power 2 becomes a double angle, which we can integrate.

  • \(\theta\): any angle
  • \(2\theta\): the double angle

Rearrange the \(\cos 2\theta\) double angle identities, which are in the booklet (SL 3.6).

Example 4 Find

(a) \(\displaystyle\int 4\cos^2 x\,\mathrm{d}x\)

(b) \(\displaystyle\int \sin^2 3x\,\mathrm{d}x\)

(a) \(4\cos^2 x = 2(1 + \cos 2x) = 2 + 2\cos 2x\).

\[ \int (2 + 2\cos 2x)\,\mathrm{d}x = 2x + \sin 2x + C \]

(b) With \(\theta = 3x\): \(\sin^2 3x = \dfrac{1}{2}(1 - \cos 6x)\).

\[ \int \frac{1}{2}(1 - \cos 6x)\,\mathrm{d}x = \frac{x}{2} - \frac{\sin 6x}{12} + C \]

Squares of tangent and cotangent

AHL For \(\tan^2(ax + b)\) and \(\cot^2(ax + b)\) use the Pythagorean identities

\[ \tan^2\theta = \sec^2\theta - 1, \qquad \cot^2\theta = \operatorname{cosec}^2\theta - 1, \]

because \(\sec^2\) and \(\operatorname{cosec}^2\) can be integrated directly.

\(1 + \tan^2\theta = \sec^2\theta\) and \(1 + \cot^2\theta = \operatorname{cosec}^2\theta\) are in the HL formula booklet (AHL 3.9).

Example 5 AHL Find \(\displaystyle\int \cot^2\left(\frac{x}{2} + \frac{\pi}{3}\right)\mathrm{d}x\).

\(\cot^2\theta = \operatorname{cosec}^2\theta - 1\), and \(\int \operatorname{cosec}^2(ax + b)\,\mathrm{d}x = -\dfrac{1}{a}\cot(ax + b) + C\). Here \(a = \dfrac{1}{2}\):

\[ \int \left[\operatorname{cosec}^2\left(\frac{x}{2} + \frac{\pi}{3}\right) - 1\right]\mathrm{d}x = -2\cot\left(\frac{x}{2} + \frac{\pi}{3}\right) - x + C. \]

Products of sine and cosine

Product-to-sum identities are not in the IB syllabus, but you can build them from the compound angle identities (HL formula booklet, AHL 3.10). Adding \(\sin(A + B) = \sin A\cos B + \cos A\sin B\) and \(\sin(A - B) = \sin A\cos B - \cos A\sin B\):

\[ \sin A\cos B = \frac{1}{2}\big[\sin(A + B) + \sin(A - B)\big]. \]

In the same way,

\[ \cos A\cos B = \frac{1}{2}\big[\cos(A + B) + \cos(A - B)\big], \qquad \sin A\sin B = \frac{1}{2}\big[\cos(A - B) - \cos(A + B)\big]. \]

A product becomes a sum, and a sum is easy to integrate.

Example B. Find \(\displaystyle\int \sin 3x\cos x\,\mathrm{d}x\).

With \(A = 3x\), \(B = x\): \(\;\sin 3x\cos x = \dfrac{1}{2}(\sin 4x + \sin 2x)\).

\[ \int \frac{1}{2}(\sin 4x + \sin 2x)\,\mathrm{d}x = -\frac{1}{8}\cos 4x - \frac{1}{4}\cos 2x + C. \]

Common errors

✗ Wrong ✓ Right Why
\(\int \sin x\,\mathrm{d}x = \cos x\) \(-\cos x + C\) \(\frac{\mathrm{d}}{\mathrm{d}x}\cos x = -\sin x\), so the sign changes.
\(\int \cos 4x\,\mathrm{d}x = 4\sin 4x\) \(\dfrac{1}{4}\sin 4x + C\) Divide by \(a\), do not multiply.
\(\int \sin^2 x\,\mathrm{d}x = \dfrac{\sin^3 x}{3}\) \(\dfrac{x}{2} - \dfrac{\sin 2x}{4} + C\) The power rule needs \(f'(x) = \cos x\) in front.
\(\int \cos^2 x\,\mathrm{d}x\) using \(\cos^2 x = 1 + \cos 2x\) \(\cos^2 x = \dfrac{1}{2}(1 + \cos 2x)\) Do not forget the \(\frac{1}{2}\).
Working in degrees Radians The rules come from derivatives, which need radians.

Exercises

1 Find \(\displaystyle\int (3\sin x - 2\cos x)\,\mathrm{d}x\).

\(-3\cos x - 2\sin x + C\).

2 Find \(\displaystyle\int \cos(4x + 1)\,\mathrm{d}x\).

\(\dfrac{1}{4}\sin(4x + 1) + C\).

3 Find \(\displaystyle\int 6\sin\left(\frac{\pi}{3} - 2x\right)\mathrm{d}x\).

\(a = -2\): \(\;6 \times \left(-\dfrac{1}{-2}\right)\cos\left(\dfrac{\pi}{3} - 2x\right) + C = 3\cos\left(\dfrac{\pi}{3} - 2x\right) + C\).

4 AHL Find \(\displaystyle\int \sec^2 5x\,\mathrm{d}x\).

\(\dfrac{1}{5}\tan 5x + C\).

5 Find \(\displaystyle\int 6x^2\sin\left(x^3\right)\mathrm{d}x\).

\(f(x) = x^3\), \(f'(x) = 3x^2\), so \(6x^2 = 2f'(x)\): \(\;-2\cos\left(x^3\right) + C\).

6 Find \(\displaystyle\int \cos^2 x\,\mathrm{d}x\).

\(\displaystyle\int \frac{1}{2}(1 + \cos 2x)\,\mathrm{d}x = \frac{x}{2} + \frac{\sin 2x}{4} + C\).

7 Find \(\displaystyle\int (\sin x + \cos x)^2\,\mathrm{d}x\).

\((\sin x + \cos x)^2 = \sin^2 x + \cos^2 x + 2\sin x\cos x = 1 + \sin 2x\).

\(\displaystyle\int (1 + \sin 2x)\,\mathrm{d}x = x - \frac{1}{2}\cos 2x + C\).

8 AHL Find \(\displaystyle\int \tan^2 2x\,\mathrm{d}x\).

\(\displaystyle\int (\sec^2 2x - 1)\,\mathrm{d}x = \frac{1}{2}\tan 2x - x + C\).

9 AHL Find \(\displaystyle\int \sec 3x\tan 3x\,\mathrm{d}x\).

\(\dfrac{\mathrm{d}}{\mathrm{d}x}\sec 3x = 3\sec 3x\tan 3x\), so the integral is \(\dfrac{1}{3}\sec 3x + C\).

10 Extension Find \(\displaystyle\int \cos 4x\cos 2x\,\mathrm{d}x\).

\(\cos 4x\cos 2x = \dfrac{1}{2}(\cos 6x + \cos 2x)\).

\(\displaystyle\int \frac{1}{2}(\cos 6x + \cos 2x)\,\mathrm{d}x = \frac{1}{12}\sin 6x + \frac{1}{4}\sin 2x + C\).