Skip to content
RMIT University Library - Learning Lab

IN3.4 Integration of trigonometric functions

 

This module deals with integration of trigonometric functions such as: \[\begin{align*} & \int\sin\left(2x+3\right)dx\\ & \int\cos\left(5x\right)dx\\ & \int_{1}^{2}\sec^{2}\left(x-2\right)dx. \end{align*}\]

Indefinite Integral (Antiderivative) of a Trigonometric Function

Recall that:

\[\begin{align*} \frac{d}{dx}\cos\left(x\right) & =-\sin\left(x\right)\\ \frac{d}{dx}\sin\left(x\right) & =\cos\left(x\right)\\ \frac{d}{dx}\tan\left(x\right) & =\sec^{2}\left(x\right). \end{align*}\] It follows that indefinite integrals (or antiderivatives) of \(\sin\left(x\right),\ \cos\left(x\right)\) and \(\sec^{2}\left(x\right)\) are of the form \[\begin{align*} \int\sin\left(x\right)dx & =-\cos\left(x\right)+c\\ \int\cos\left(x\right)dx & =\sin\left(x\right)+c\\ \int\sec^{2}\left(x\right)dx & =\tan\left(x\right)+c \end{align*}\] where \(c\) is a constant.

More general forms are: 1 These forms may be derived using integration by substitution. For example, let \(u=ax+b\) then \(du/dx=a.\) Noting \(\sin\left(ax+b\right)=1\times\sin\left(ax+b\right)\) and using substitution, \[\begin{align*} \int\sin\left(ax+b\right)dx & =\int\frac{1}{a}\sin\left(u\right)\frac{du}{dx}dx\\ & =\frac{1}{a}\int\sin\left(u\right)du\\ & =\frac{1}{a}\left(-\cos\left(u\right)\right)+c\\ & =-\frac{1}{a}\cos\left(ax+b\ \right)+c. \end{align*}\] \[\begin{align*} \int\sin\left(ax+b\right)dx & =-\frac{1}{a}\cos\left(ax+b\right)+c\\ \int\cos\left(ax+b\right)dx & =\frac{1}{a}\sin\left(ax+b\right)+c\\ \int\sec^{2}\left(ax+b\right)dx & =\frac{1}{a}\tan\left(ax+b\right)+c \end{align*}\] where \(a,\,b\) and \(c\) are constants.

Examples

  1. \(\int5\cos\left(x\right)dx=5\sin\left(x\right)+c,\ \left(a=1,\,b=0\right)\)

  2. \(\int3\cos\left(3-2x\right)dx=-\frac{3}{2}\sin\left(3-2x\right)+c\ \left(a=-2,\;b=3\right)\)

  3. \(\int3\sin\left(3-x\right)dx=3\cos\left(3-x\right)+c,\ \left(a=-1,\;b=3\right)\)

  4. \(\int\sec^{2}\left(\frac{x}{2}\right)dx=2\tan\left(\frac{x}{2}\right)+c\ \left(a=\frac{1}{2},\;b=0\right)\).

Definite Integral of a Trigonometric Function

Now that we know how to get an indefinite integral (or antiderivative) of a trigonometric function we can consider definite integrals. To evaluate a definite integral we determine an antiderivative and calculate the difference of the values of the antiderivatve at the limits defined in the definite integral. For example consider

\[\begin{align*} \int_{0}^{\pi/2}3\cos\left(x\right)dx. \end{align*}\] From the previous section we know an antiderivative is \(3\sin\left(x\right)+c\) where \(c\) is a constant. The limits of the integral are \(0\) and \(\pi/2\). So we have \[\begin{align*} \int_{0}^{\pi/2}3\cos\left(x\right)dx & =\left[3\sin\left(x\right)+c\right]_{x=0}^{x=\pi/2} & \left(1\right)\\ & =\left(3\sin\left(\frac{\pi}{2}\right)+c\right)-\left(3\sin\left(0\right)+c\right) & \left(2\right)\\ & =3+c-0-c & \left(3\right)\\ & =3. & \left(4\right) \end{align*}\]

Note that the notation in line \(\left(1\right)\) \[\begin{align*} \left[3\sin\left(x\right)+c\right]_{x=0}^{x=\pi/2} \end{align*}\] means substitute \(x=\pi/2\) in the expression in brackets and subtract the expression in brackets evaluated at \(x=0.\)

Note also that the constant \(c\) in lines \(\left(1\right)\) to \(\left(3\right)\) has no effect when evaluating a definite integral. Consequently we usually leave it out and write \[\begin{align*} \int_{0}^{\pi/2}3\cos\left(x\right)dx & =\left[3\sin\left(x\right)\right]_{x=0}^{x=\pi/2} & \left(1\right)\\ & =\left(3\sin\left(\frac{\pi}{2}\right)\right)-\left(3\sin\left(0\right)\right) & \left(2\right)\\ & =3-0 & \left(3\right)\\ & =3. & \left(4\right) \end{align*}\]

Examples

  1. Evaluate \(\int_{0}^{\,\pi/4}5\cos\left(x\right)dx.\)
    Solution: 2 Remember that \(\sin\left(\frac{\pi}{4}\right)=\frac{1}{\sqrt{2}}.\) \[\begin{align*} \int_{0}^{\,\pi/4}5\cos\left(x\right)dx & =\left[5\sin\left(x\right)\right]_{x=0}^{x=\pi/4}\\ & =5\sin\left(\frac{\pi}{4}\right)-5\sin\left(0\right)\\ & =\frac{5}{\sqrt{2}} \end{align*}\]

  2. Evaluate \(\int_{-\pi/4}^{\pi/4}3\cos\left(\pi-2x\right)dx\).
    Solution: 3 Remember that \(\sin\left(\pi/2\right)=1\) and \(\sin\left(3\pi/2\right)=-1.\) \[\begin{align*} \int_{-\pi/4}^{\pi/4}3\cos\left(\pi-2x\right)dx & =\left[-\frac{3}{2}\sin\left(\pi-2x\right)\right]_{x=-\pi/4}^{x=\pi/4}\\ & =\left(-\frac{3}{2}\sin\left(\pi-\frac{\pi}{2}\right)\right)-\left(-\frac{3}{2}\sin\left(\pi-2\left(-\frac{\pi}{4}\right)\right)\right)\\ & =\left(-\frac{3}{2}\sin\left(\frac{\pi}{2}\right)\right)-\left(-\frac{3}{2}\sin\left(\pi+\frac{\pi}{2}\right)\right)\\ & =-\frac{3}{2}-\left(-\frac{3}{2}\left(-1\right)\right)\\ & =-\frac{3}{2}-\frac{3}{2}\\ & =-3. \end{align*}\]

  3. Evaluate \(\int_{0}^{\pi/6}3\sin\left(\pi-2x\right)dx\).
    Solution: 4 Remember that \(\cos\left(2\pi/3\right)=-1/2\) and \(\cos\left(\pi\right)=-1.\) \[\begin{align*} \int_{0}^{\pi/6}3\sin\left(\pi-2x\right)dx & =\left[\frac{3}{2}\cos\left(\pi-2x\right)\right]_{x=0}^{x=\pi/6}\\ & =\left(\frac{3}{2}\cos\left(\pi-2\left(\frac{\pi}{6}\right)\right)\right)-\left(\frac{3}{2}\cos\left(\pi\right)\right)\\ & =\left(\frac{3}{2}\cos\left(\pi-\frac{\pi}{3}\right)\right)-\left(\frac{3}{2}\left(-1\right)\right)\\ & =\left(\frac{3}{2}\cos\left(\frac{2\pi}{3}\right)\right)+\frac{3}{2}\\ & =\frac{3}{2}\left(-\frac{1}{2}\right)+\frac{3}{2}\\ & =\frac{3}{4}\\ & =0.75 \end{align*}\]

  4. Evaluate \(\int_{0}^{2\pi/3}\sec^{2}\left(\frac{x}{2}\right)dx.\)
    Solution: 5 Remember that \(\tan\left(0\right)=0\) and \(\tan\left(\pi/3\right)=\sqrt{3}\). \[\begin{align*} \int_{0}^{2\pi/3}\sec^{2}\left(\frac{x}{2}\right)dx & =\left[2\tan\left(\frac{x}{2}\right)\right]_{x=0}^{x=2\pi/3}\\ & =\left(2\tan\left(\frac{1}{2}\times\frac{2\pi}{3}\right)\right)-\left(2\tan\left(0\right)\right)\\ & =2\tan\left(\frac{\pi}{3}\right)\\ & =2\sqrt{3}. \end{align*}\]

Exercises

  1. Calculate:
    \(\begin{aligned}a) & \int\sec^{2}\left(4x\right)dx & b) & \int2\cos\left(1-x\right)dx & c) & 2\sin\left(\frac{5-3x}{4}\right)dx\text{ }\end{aligned}\)

  2. Evaluate:
    \(\begin{aligned}a) & \intop_{0}^{\pi/2}3\cos\left(2x+\pi\right)dx & b) & \int_{-\pi}^{0}5\sin\left(x/2\right)dx & c) & \int_{0}^{\pi/2}2\sec^{2}\left(x/3\right)\end{aligned} dx\)

\[\begin{array}{llllllllll} a) & \frac{1}{4}\tan\left(4x\right)+c & & & b) & -2\sin\left(1-x\right)+c & & & c) & \frac{8}{3}\cos\left(\frac{5-3x}{4}\right)+c\end{array}\]

\[\begin{array}{llllllllll} a) & 0 & & & b) & -10 & & & c) & 2\sqrt{3}\end{array}\]

Download this page, IN3.4 Integration of trigonometric functions (PDF 162 KB)

What's next... IN4 Definite integrals

Keywords: