Integration of trigonometric functions.

Literature: Collection of problems in mathematics. Part 1. Edited by A. V. Efimov, B. P. Demidovich.

1. Integrals of the form $\int\cos^m x\sin ^n x,dx$ are found depending on the parity of the exponents $m$ and $n$ as follows:

a) If either $m$ or $n$ is odd, then a variable substitution is used:

$t=\sin x,$ for odd $m$;

$t=\cos x,$ for odd $n,$

along with the identity $\sin^2 x+\cos^2 x=1;$

b) If both $m$ and $n$ are even, then reduction formulas are used:$$\sin^2 x=\frac{1-\cos 2x}{2},\quad \cos^2 x=\frac{1+\cos 2x}{2},\quad \sin x\cos x=\frac{\sin 2x}{2};$$

c) If $m+n=-2k,,,, k\in \mathbb{N}$, i.e., $m+n$ is an even negative integer, then it is convenient to use substitutions

$\tan x=t$ and $\cot x=t.$

2. Integrals of the form $\int\sin mx\cos n x, dx,$ $ \int\cos mx\cos nx,dx,$ $\int\sin mx\sin nx, dx$ are computed using transformations of the integrand according to the following formulas: $$\sin mx\cos nx=\frac{1}{2}(\sin(m-n)x+\sin(m+n)x),$$ $$\sin mx\sin nx=\frac{1}{2}(\cos(m-n)x-\cos(m+n)x),$$ $$\cos mx\cos nx=\frac{1}{2}(\cos(m-n)x+\cos(m+n)x).$$

3. Integrals of the form $\int \tan^m x, dx$ and $\int \cot^m x, dx$ are found using the formulas: $$tg^2 x=\frac{1}{\cos^2 x}-1,\qquad ctg^2 x=\frac{1}{\sin^2 x}-1.$$

4. Integrals of the form $R(\sin x, \cos x), dx$, where $R(u, v)$ is a rational function of two variables, are transformed into integrals of rational functions of a new variable $t$ by substituting $t=\tan\frac{x}{2}$. In this case, the following formulas are used: $$dx=\frac{2dt}{1+t^2},\quad \sin x=\frac{2t}{1+t^2},\quad \cos x=\frac{1-t^2}{1+t^2}.$$ If $\sin x$ and $\cos x$ under the integral contain only even powers, it is more convenient to use the substitution $t=\tan x$.

5. Integration of hyperbolic functions is carried out similarly to the integration of trigonometric functions, and the following formulas are used: $$ch^2 x-sh^2 x=1,\quad sh xch x=\frac{1}{2}sh 2x,$$ $$ch^2 x=\frac{1}{2}(ch 2x+1),\quad sh^2 x=\frac{1}{2}(ch 2x-1),$$ $$1-th^2=\frac{1}{ch^2 x},\quad cth^2 x-1=\frac{1}{sh^2 x}.$$

If $th\frac{x}{2}=t,$ then

$$sh x=\frac{2t}{1-t^2};\quad ch t=\frac{1+t^2}{1-t^2};\qquad dx=\frac{2dt}{1-t^2}.$$

Examples.

Find the integrals of trigonometric functions.

6.190. $\int\sin^3 x,dx.$

Solution.

$$\int\sin^3 x\,dx=\int\sin^2x\cdot\sin x\,dx=\int(1-\cos^2 x)\sin x\,dx=\left[\begin{array}{lcl}t=\cos x\\dt=-\sin x\,dx\end{array}\right]=$$ $$=-\int(1-t^2)\,dt=-(t-\frac{t^3}{3})+C=-\cos x+\frac{\cos^3 x}{3}+C.$$

Answer: $-\cos x+\frac{\cos^3 x}{3}+C.$

6.194. $\int\sin^2 x\cos^2 x\, dx.$

Solution.

$$\int\sin^2 x\cos^2 x\,dx=\int\frac{1-\cos 2x}{2}\cdot\frac{1+\cos2x}{2}\,dx=\int\frac{1-\cos^2 2x}{4}\,dx=\frac{1}{4}\int\sin^22x\,dx=$$ $$=\frac{1}{4}\int\frac{1-\cos 4x}{2}\,dx=\frac{1}{8}\left(x-\frac{1}{4}\sin 4x\right)+C.$$

Answer: $\frac{1}{8}\left(x-\frac{1}{4}\sin 4x\right)+C.$

6.204. $\int\frac{dx}{\sqrt{\cos x\sin^3 x}}.$

Solution.

$$\int\frac{dx}{\sqrt{\cos x\sin^3 x}}=\int\frac{1}{\cos^{1/2}x\sin^{3/2}x}\,dx=\int\frac{\cos^{3/2}x}{\cos^2 x\sin^{3/2}x}\,dx=$$ $$=\int\frac{1}{tg^{3/2}x\cos^2 x}=\left[\begin{array}{lcl}t=tg x\\dt=\frac{1}{\cos^2 x}\,dx\end{array}\right]=\int\frac{1}{t^{3/2}}\,dt=\int t^{-3/2}dt=$$ $$=\frac{t^{-1/2}}{-1/2}+C=-\frac{2}{\sqrt{tg x}}+C=-2\sqrt{ctg x}+C.$$

Answer: $-{2}{\sqrt{ctg x}}+C.$

6.214. $\int\cos\frac{x}{2}\cos\frac{x}{3}.$

Solution.

$$\int\cos\frac{x}{2}\cos\frac{x}{3}=\int\frac{1}{2}\left(\cos\left(\frac{1}{2}-\frac{1}{3}\right)x+\cos\left(\frac{1}{2}+\frac{1}{3}\right)x\right)\,dx=$$ $$=\frac{1}{2}\int\left(\cos\frac{1}{6}x+\cos\frac{5}{6}x\right)\,dx=\frac{6}{2}\sin\frac{1}{6}x+\frac{6}{10}\sin\frac{5}{6}x+C=$$ $$=3\sin\frac{x}{6}+0,6\sin\frac{5x}{6}+C.$$

Answer: $3\sin\frac{x}{6}+0,6\sin\frac{5x}{6}+C.$

6.215. $\int\sin \frac{x}{3}\cos\frac{2x}{3}\,dx.$

Solution.

$$\int\sin\frac{x}{3}\cos\frac{2x}{3}=\int\frac{1}{2}\left(\sin\left(\frac{1}{3}-\frac{2}{3}\right)x+\sin\left(\frac{1}{3}+\frac{2}{3}\right)x\right)\,dx=$$ $$=\frac{1}{2}\int\left(\sin\frac{-x}{3}+\sin x\right)\,dx=\frac{3}{2}\cos\frac{1}{3}x-\frac{1}{2}\cos x+C.$$

Answer: $\frac{3}{2}\cos\frac{x}{3}-\frac{1}{2}\cos x+C.$

6.218. $\int\frac{dx}{3\cos x+2}.$

Solution.

$$\int\frac{dx}{3\cos x+2}=\left[\begin{array}{lcl}t=tg \frac{x}{2}\\\cos x=\frac{1-t^2}{1+t^2}\\dx=\frac{2dt}{1+t^2}\end{array}\right]=\int\frac{2dt}{(3\frac{1-t^2}{1+t^2}+2)(1+t^2)}=$$ $$=\int\frac{2dt}{3-3t^2+2+2t^2}=2\int\frac{dt}{5-t^2}=-2\frac{1}{2\sqrt 5}\ln\left|\frac{t-\sqrt 5}{t+\sqrt 5}\right|=$$ $$=\frac{1}{\sqrt 5}\ln\left|\frac{tg\frac{x}{2}+\sqrt 5}{tg\frac{x}{2}-\sqrt 5}\right|.$$

Answer: $\frac{1}{\sqrt 5}\ln\left|\frac{tg\frac{x}{2}+\sqrt 5}{tg\frac{x}{2}-\sqrt 5}\right|.$

6.220. $\int\frac{\sin x}{1+\sin x}dx.$

Solution.

$$\int\frac{\sin x }{1+\sin x}\,dx=\left[\begin{array}{lcl}t=tg \frac{x}{2}\\\sin x=\frac{2t}{1+t^2}\\dx=\frac{2dt}{1+t^2}\end{array}\right]=\int\frac{\frac{2t}{1+t^2}}{1+\frac{2t}{1+t^2}}\frac{2dt}{1+t^2}=$$ $$=\int\frac{4tdt}{(1+t^2)(1+2t+t^2)}=4\int\frac{tdt}{(1+t^2)(1+t)^2}$$ We obtained an integral of a rational function. Let's decompose the integrand into partial fractions. $$\frac{t}{(1+t^2)(1+t)^2}=\frac{At+B}{1+t^2}+\frac{C}{1+t}+\frac{D}{(1+t)^2}=$$ $$=\frac{(At+B)(1+2t+t^2)+C(1+t^2)(1+t)+D(1+t^2)}{(1+t^2)(1+t)^2}=$$ $$=\frac{t^3(A+C)+t^2(2A+B+C+D)+t(A+2B+C)+(B+C+D)}{(1+t^2)(1+t)^2}.$$ Next, by equating coefficients of like powers of $t$, we find $A$, $B$, $C$, and $D$.

$$\left\{\begin{array}{lcl}A+C=0\\2A+B+C+D=0\\A+2B+C=1\\B+C+D=0\end{array}\right.\Rightarrow\left\{\begin{array}{lcl}A=-C\\2A=0\\2B=1\\B+C+D=0\end{array}\right.\Rightarrow\left\{\begin{array}{lcl}C=0\\A=0\\B=0,5\\D=-0,5\end{array}\right.$$

Thus,

$$\frac{t}{(1+t^2)(1+t)^2}=\frac{1}{2(1+t^2)}-\frac{1}{2(1+t)^2}$$ From here, we find

$$4\int\frac{tdt}{(1+t^2)(1+t)^2}=4\left(\frac{1}{2}\int\frac{1}{1+t^2}\,dt-\frac{1}{2}\int(1+t)^{-2}\,dt\right)=$$ $$=2arctg t-2\frac{(1+t)^{-1}}{-1}+C=2arctg t+\frac{2}{1+t}+C.$$

Making the reverse substitution, we finally obtain $$\int\frac{\sin x }{1+\sin x}\,dx=2arctg (tg\frac{x}{2})+\frac{2}{1+tg\frac{x}{2}}+C=2x+\frac{2}{1+tg\frac{x}{2}}+C.$$

Answer: $2x+\frac{2}{1+tg\frac{x}{2}}+C.$

6.226. $\int\frac{1+ctg x}{1-ctg x}dx.$

Solution.

$$\int\frac{1+ctg x }{1-ctg x}\,dx=\int\frac{1+\frac{\cos x}{\sin x}}{1-\frac{\cos x}{\sin x}}\,dx=\int\frac{\sin x+\cos x}{\sin x-\cos x}\,dx= $$ $$\left[\begin{array}{lcl}t=\sin x-\cos x\\dt=(\cos x+\sin x)\,dx\end{array}\right]=\int\frac{dt}{t}\,dt=\ln|t|+C=\ln|\sin x-\cos x|+C.$$

Answer: $\ln|\sin x-\cos x|+C.$

6.228. $\int ch^23x\,dx.$

Solution.

$$\int ch^2 3x\,dx=\frac{1}{2}\int(ch 6x+1)\,dx=\frac{1}{2}\left(\frac{1}{6}sh 6x+x\right)+C=\frac{1}{12}sh 6x+\frac{1}{2}x+C.$$

Answer: $\frac{1}{12}sh x+\frac{1}{2}x+C.$

6.235. $\int\sqrt{ch x+1}dx.$

Solution.

From the formula $ \cosh^2 x = \frac{1}{2}(\cosh 2x + 1)$, we have $$\sqrt{ch x+1}=\sqrt 2 ch\frac{x}{2}.$$ Therefore, $$\int \sqrt{ch x+1}\,dx=\sqrt {2}\int ch\frac{x}{2}\,dx=2\sqrt{2}sh\frac{x}{2}+C.$$

Answer: $2\sqrt{2}sh\frac{x}{2}+C.$

Homework.

6.191. $\int\frac{\sin^3 x}{\cos^8 x}\,dx.$

6.192. $\int\cos^7 x\,dx.$

6.195. $\int\cos^2 x\sin^4 x\,dx.$

6.199. $\int\frac{dx}{\sin^4 x\cos^2 x}.$

6.200. $\int\frac{\cos\left(x+\frac{\pi}{4}\right)}{\sin x\cos x}\,dx.$

6.202. $\int tg^3 x\,dx.$

6.209. $\int\frac{dx}{\cos\frac{x}{3}\sin^3 \frac{x}{3}}.$

6.212. $\int\sin 3x\cos 5x\,dx.$

6.213. $\int\sin 10c\sin 15 x\,dx.$

6.219. $\int\frac{dx}{3-2\sin x+\cos x}.$

6.221. $\int\frac{dx}{4\sin^2 x-7\cos^2 x}.$

6.225. $\int\frac{dx}{(\sin x+4)(\sin x-1)}.$

6.229. $\int sh^3 2x\,dx.$

6.232. $\int\frac{dx}{sh^2 x ch^2 x}.$

6.234. $\int\frac{dx}{ch x-1}.$

6.236. $\int cth^3 x\,dx.$