26.3 Trigonometric Integrals

IB Math AA SL and HL: how to integrate sin x and cos x, and the same functions of ax + b; how to integrate f’(x)sinbig[f(x)big] and similar products… Worked examples and solutions.

SL 5.10

In this section you will learn
  • how to integrate \(\sin x\) and \(\cos 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
  • (Extension) how to integrate products such as \(\sin 3x\cos x\)

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 and cosine 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

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} \]

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

Example 1 Find \(\displaystyle\int \left(\frac{\pi}{4} - 2\sin x\right)\mathrm{d}x\).

\(\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\)

Example 2 Find

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

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

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

(b) \(-\dfrac{1}{3}\cos\left(3x - \dfrac{\pi}{4}\right) + 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\)
  • \(f(x)\): a function of \(x\) (the inside function)
  • \(f'(x)\): the derivative of \(f(x)\)
  • \(C\): the constant of integration

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

\(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. \]

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 \]

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. \]

HL students: continue with 26.4 Further Trigonometric Integrals.

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 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\).

3 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\).

4 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\).

5 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\).