Integration of Trigonometric Functions
Basic Examples
We saw in the wiki Derivative of Trigonometric Functions the derivatives of \(\sin x\) and \(\cos x:\)
\[\frac{\mathrm{d}}{\mathrm{d}x} \sin ax = a \cos ax, \quad \frac{\mathrm{d}}{\mathrm{d}x} \cos ax = - a \sin ax,\]
where \(a\) is an arbitrary constant.
Since indefinite integration is the anti-derivative, we can say that
\[ \int \cos ax \, \mathrm{d}x= \frac1a \sin ax + C, \quad \int \sin ax \, \mathrm{d}x= - \frac1a \cos ax + C,\]
where \(a\) is an arbitrary constant and \(C\) is the constant of integration.
Intermediate Examples
We also have that
\[\begin{align} \frac{\mathrm{d}}{\mathrm{d}x} \tan ax &= a \sec^2 ax \\ \frac{\mathrm{d}}{\mathrm{d}x} \cot ax &= - a \csc^2 ax\\ \frac{\mathrm{d}}{\mathrm{d}x} \sec ax &= a \sec ax \tan ax\\ \frac{\mathrm{d}}{\mathrm{d}x} \csc ax &= - a \csc ax \cot ax, \end{align}\]
where \(a\) is an arbitrary constant.
In this case, the anti-derivative is still indefinite integration, and we can say that
\[\begin{align} \int \sec^2 ax \, \mathrm{d}x &= \frac1a \tan ax + C\\ \int \csc^2 ax \, \mathrm{d}x &= - \frac1a \cot ax + C\\ \int \sec ax \tan ax \, \mathrm{d}x &= \frac1a \sec ax + C\\ \int \csc ax \cot ax \, \mathrm{d}x &= - \frac1a \csc ax + C, \end{align}\]
where \(a\) is an arbitrary constant and \(C\) is the constant of integration.
The next set of indefinite integrals are the result of trigonometric identities and \(u\)-substitution:
\[\begin{align} \int \tan ax \, \mathrm{d}x &= \frac1a \ln |\sec ax| + C\\ \int \cot ax \, \mathrm{d}x &= \frac1a \ln|\sin ax| + C\\ \int \sec ax \, \mathrm{d}x &= \frac1a \ln|\sec ax + \tan ax| + C\\ \int \csc ax \, \mathrm{d}x &= \frac1a \ln|\csc ax - \cot ax| + C, \end{align}\]
where \(a\) is an arbitrary constant and \(C\) is the constant of integration.
Typical Cases
Now, we'll investigate typical cases of trigonometric integrations.
Case 1: Suppose our integration is of the form
\[\begin{array} &\int \cos mx \cos nx \, dx &\text{or} &\int \sin mx \sin nx \, dx &\text{or} &\int \sin mx \cos nx \, dx. \end{array}\]
In these cases, we can use trigonometric product to sum identities:
\[\cos A \cos B = \frac{1}{2}\big[\cos(A-B) + \cos(A+B)\big],\] and likewise for the other two.
Find the integral
\[\int \sin 3x \cos 2x \, dx.\]
Since \(\sin 3x \cos 2x = \frac12\big[\sin(3x+2x) + \sin(3x-2x) \big] =\frac12\left(\sin 5x + \sin x \right), \) the given expression is
\[\begin{align} \int \sin 3x \cos 2x \, dx&= \frac12\left(\int\sin 5x \, dx + \int\sin x \,dx \right)\\ &=-\frac12\left(\frac{\cos 5x}5 + \cos x \right) + C. \ _\square \end{align}\]
Case 2: Suppose our integration is of the form
\[\int \sin^m(x) \cos^n(x)dx,\] where \(m\) and \(n\) belong to integers.
In this case, we can solve it using \(u\)-substitution:
- If \(m\) is odd, put \(\cos(x) = t\) and proceed.
- If \(n\) is odd, put \(\sin(x) = t\) and proceed.
- If both \(m\) and \(n\) are odd, put \(\sin(x)=t \text{ if } m \geq n\) and \(\cos(x)=t\) otherwise.
- If both \(m\) and \(n\) are even, use power reducing formulae: \[\sin^2(x) = \frac{1}{2}\big(1-\cos(2x)\big)\ \text{ and }\ \cos^2(x) = \frac{1}{2}\big(1+\cos(2x)\big).\]
- If \(m+n\) is a negative integer, put \(\tan(x) = t\) and proceed.
Find the integral
\[\int \sin^2(x) \cos^3(x)\, dx.\]
We have
\[\begin{align} \int \sin^2(x) \cos^3(x)\, dx &=\int \sin^2(x) \cos^2(x) \cos(x)\, dx\\ &=\int\sin^2(x) \big(1-\sin^2(x)\big) \cos(x)\, dx. \end{align}\]
Substituting \(\sin(x) = t\) and \(\cos(x)dx = dt,\) the above is equal to
\[\begin{align} \int t^2 \big(1-t^2\big)\, dt &=\int t^2 dt - \int t^4 dt\\ &= \frac{t^3}{3} - \frac{t^5}{5} + C\\ &=\frac{\sin^3(x)}{3} - \frac{\sin^5(x)}{5} + C, \end{align}\]
where \(C\) is the constant of integration. \(_\square\)
Case 3: Suppose our integration is of the form
\[\int \dfrac{a\sin(x) + b\cos(x) + c}{p\sin(x) + q\cos(x) + r}\, dx.\]
In this case, express \(\text{NUM} = \alpha \text{(DEN)} + \beta \frac{d}{dx}\text{(DEN)} + \gamma\) and then integrate as usual.
Note that NUM means the numerator of the integrand and DEN means the denominator of the integrand.
Find the integral
\[\int \frac{3\sin(x) + 5\cos(x) + 3}{\sin(x) + 2\cos(x) + 1}\, dx.\]
Express \(3\sin(x) + 5\cos(x) + 3 = \alpha\big(\sin(x) + 2\cos(x) + 1\big) + \beta\big(\cos(x) - 2\sin(x)\big) + \gamma.\) Then comparing the coefficients of \(\sin(x), \cos(x)\) gives
\[\alpha - 2\beta = 3, \quad 2\alpha + \beta = 5, \quad \alpha + \gamma = 3.\]
So, \(\alpha = \frac{13}5 , \beta = -\frac15, \gamma = \frac25,\) which gives
\[\begin{align} \int \frac{3\sin(x) + 5\cos(x) + 3}{\sin(x) + 2\cos(x) + 1}\, dx &=\alpha\int dx + \beta\int \frac{\cos(x) - 2\sin(x)}{\sin(x) + 2\cos(x) + 1}\, dx + \int \frac{\gamma}{\sin(x) + 2\cos(x) + 1}\,dx\\ &=\alpha\int dx + \beta\int \frac{\big(\sin(x) + 2\cos(x) + 1\big)'}{\sin(x) + 2\cos(x) + 1}\, dx + \gamma\int \frac{1}{\sin(x) + 2\cos(x) + 1}\,dx\\ &=\frac{13x}{5} - \frac15 \ln \big|\sin(x)+2\cos(x)+1\big| + \frac15\bigg(\ln\left(\sin\frac x2 + \cos \frac x2\right) - 3\ln\left(3\cos \frac x2 - \sin \frac x2\right)\bigg) + C, \end{align}\]
where the last integral was done by Case 6 mentioned below. \(_\square\)
Case 4: Suppose our integration is of the form
\[\int \frac{a\tan(x) + b}{p\tan(x) + q}\, dx.\]
In this case, change the integration to the form
\[\int \dfrac{a\sin(x) + b\cos(x)}{p\sin(x) + q\cos(x)}\, dx\]
and proceed as in Case 3.
Find the integral
\[\int \frac{\tan(x) + 2}{5\tan(x) -3}\, dx.\]
Case 5: Suppose our integration is of the form
\[\int \frac{1}{a\sin(x) \pm b\cos(x)}\, dx.\]
In this case, use \(a= r\cos(\alpha)\) and \(b= r\sin(\alpha)\) to put the integration in the form
\[\frac{1}{r} \int \frac{dx}{\sin(x \pm \alpha)}\]
and integrate it using the formula for \(\displaystyle \int \csc(x)\, dx\).
Find the integral
\[\int \frac{1}{2\sin(x) - 5\cos(x)}\, dx.\]
Case 6:: Suppose our integration is of the form
\[\int \frac{dx}{a\sin(x)+b\cos(x)+c}.\]
In this case, convert the integral into the form
\[\int \frac{\sec^2\left(\frac x2\right)}{2a\tan\left(\frac x2\right) + (c-b)\tan^2\left(\frac x2\right) +(c+b)}\, dx\]
and then put \(\tan\left(\frac x2\right)=t\) and proceed.
Find the integral
\[\int \frac{dx}{\sin(x)+2\cos(x)+1}.\]
Case 7: In general, if the integrate is of the form
\[\int R (\sin x, \cos x)\, dx,\]
where \(R\) is a rational function, then the universal substitution is to put \(\tan\left(\frac x2\right)=t\).
Now, three special cases arise:
- If \(R\big(-\sin(x), \cos(x)\big) = -R\big(\sin(x), \cos(x)\big),\) then put \(\cos(x)=t\) and proceed.
- If \(R\big(\sin(x), -\cos(x)\big) = -R\big(\sin(x), \cos(x)\big),\) then put \(\sin(x)=t\) and proceed.
- If \(R\big(-\sin(x), -\cos(x)\big) = -R\big(\sin(x), \cos(x)\big),\) then put \(\tan(x)=t\) and proceed.
Case 8: If the integration is of the form
\[\int \frac{\pm\sin(x)\pm \cos(x)}{f\big(\sin(2x)\big)}\, dx,\]
then substitute \(\displaystyle \int \big(\pm\sin(x)\pm \cos(x)\big) = t\) and proceed.
Find the integral
\[\int \frac{\cos(x) -\sin(x)}{1 + \sin(2x)}\,dx.\]