## Problem Statement

Calculate the definite integral:

$$
\int_{0}^{\frac{\pi}{2}} \frac{\cos x - \sin x}{(1 + \sin x)^{2}} d x
$$
## Solution

We will use the universal substitution:

$$
t=\operatorname{tg} \frac{x}{2}
$$

From which:

$$
\begin{aligned}
& \sin x=\frac{2 t}{1+t^{2}}, \cos x=\frac{1-t^{2}}{1+t^{2}}, d x=\frac{2 d t}{1+t^{2}} \\
& x=0 \Rightarrow t=\operatorname{tg} \frac{0}{2}=\operatorname{tg} 0=0 \\
& x=\frac{\pi}{2} \Rightarrow t=\operatorname{tg} \frac{\left(\frac{\pi}{2}\right)}{2}=\operatorname{tg} \frac{\pi}{4}=1
\end{aligned}
$$

Substitute:

$$
\begin{aligned}
& \int_{0}^{\frac{\pi}{2}} \frac{\cos x-\sin x}{(1+\sin x)^{2}} d x=\int_{0}^{1} \frac{\left(\frac{1-t^{2}}{1+t^{2}}-\frac{2 t}{1+t^{2}}\right) \cdot \frac{2 d t}{1+t^{2}}}{\left(1+\frac{2 t}{1+t^{2}}\right)^{2}}=\int_{0}^{1} \frac{2\left(1-2 t-t^{2}\right) d t}{\left(1+t^{2}\right)^{2}\left(\frac{1+2 t+t^{2}}{1+t^{2}}\right)^{2}}= \\
& =2 \int_{0}^{1} \frac{1-2 t-t^{2}}{(1+t)^{4}} d t=
\end{aligned}
$$

Decompose the proper rational fraction into partial fractions using the method of undetermined coefficients:

$$
\begin{aligned}
& \frac{1-2 t-t^{2}}{(1+t)^{4}}=\frac{A_{1}}{1+t}+\frac{A_{2}}{(1+t)^{2}}+\frac{A_{3}}{(1+t)^{3}}+\frac{A_{4}}{(1+t)^{4}}= \\
& =\frac{A_{1}(1+t)^{3}+A_{2}(1+t)^{2}+A_{3}(1+t)+A_{4}}{(1+t)^{4}}= \\
& =\frac{A_{1}\left(t^{3}+3 t^{2}+3 t+1\right)+A_{2}\left(t^{2}+2 t+1\right)+A_{3}(t+1)+A_{4}}{(1+t)^{4}}=
\end{aligned}
$$

$$
\begin{aligned}
& =\frac{A_{1} t^{3}+\left(3 A_{1}+A_{2}\right) t^{2}+\left(3 A_{1}+2 A_{2}+A_{3}\right) t+\left(A_{1}+A_{2}+A_{3}+A_{4}\right)}{(1+t)^{4}}= \\
& \left\{\begin{array}{l}
A_{1}=0 \\
3 A_{1}+A_{2}=-1 \\
3 A_{1}+2 A_{2}+A_{3}=-2 \\
A_{1}+A_{2}+A_{3}+A_{4}=1
\end{array}\right. \\
& \left\{\begin{array}{l}
A_{1}=0 \\
A_{2}=-1 \\
2 A_{2}+A_{3}=-2 \\
A_{2}+A_{3}+A_{4}=1
\end{array}\right. \\
& \left\{\begin{array}{l}
A_{1}=0 \\
A_{2}=-1 \\
A_{3}=0 \\
A_{3}+A_{4}=2
\end{array}\right. \\
& \left\{\begin{array}{l}
A_{1}=0 \\
A_{2}=-1 \\
A_{3}=0 \\
A_{4}=2 \\
\frac{1-2 t-t^{2}}{(1+t)^{4}}=-\frac{1}{(1+t)^{2}}+\frac{2}{(1+t)^{4}} \\
=2 \int_{0}^{1}\left(-\frac{1}{(1+t)^{2}}+\frac{2}{(1+t)^{4}}\right) d t=\left.2\left(\frac{1}{1+t}-\frac{2}{3(1+t)^{3}}\right)\right|_{0} ^{1}= \\
\left.=2\left(\frac{1}{1+1}-\frac{2}{3(1+1)^{3}}\right)-\left(\frac{1}{1+0}-\frac{2}{3(1+0)^{3}}\right)\right)= \\
\left.=2\left(\frac{1}{2}-\frac{2}{3 \cdot 2^{3}}\right)-\left(1-\frac{2}{3}\right)\right)=1-\frac{1}{6}-2+\frac{4}{3}=\frac{1}{6}
\end{array}\right. \\
& =2
\end{aligned}
$$

Source — «http://pluspi.org/wiki/index.php/\�\�\�\�\�\�\�\�\�\�\�\� \%D0\%9A\%D1\%83\%D0\%B7\%D0\%BD\%D0\%B5\%D1\%86\%D0\%BE\%D0\%B2_\%D0\%98\%D0\%BD $\% \mathrm{D} 1 \% 82 \% \mathrm{D} 0 \% \mathrm{~B} 5 \% \mathrm{D} 0 \% \mathrm{~B} 3 \% \mathrm{D} 1 \% 80 \% \mathrm{D} 0 \% \mathrm{~B} 0 \% \mathrm{D} 0 \% \mathrm{BB} \% \mathrm{D} 1 \% 8 \mathrm{~B}+8-5$ "

Categories: Kuznetsov's Problem Book Integrals Problem 8 | Integrals

Ukrainian Banner Network

- Last edited: 15:17, 26 April 2009.
- Content is available under CC-BY-SA 3.0.