## Problem 2

Let $f:(0, \pi) \rightarrow \mathbf{R}, f(x)=\frac{\cos ^{2} x}{\sin ^{3} x} \cdot e^{-x}$. Determine the primitive $F$ of $f$ for which $F\left(\frac{\pi}{4}\right)=0$.

Matlab
## Problem 2.

Let $f:(0, \pi) \rightarrow \mathbf{R}, f(x)=\frac{\cos ^{2} x}{\sin ^{3} x} \cdot e^{-x}$.

Determine the primitive $F$ of $f$ for which $F\left(\frac{\pi}{4}\right)=0$.

Matlab

## Solution

We integrate by parts

$$
u(x)=e^{-x} \cdot \cos x, \quad u^{\prime}(x)=-e^{-x} \cdot(\sin x+\cos x)
$$

NOTE: Any other correct solution is evaluated with maximum points.

$$
v^{\prime}(x)=\frac{\cos x}{\sin ^{3} x}, \quad v(x)=-\frac{1}{2 \sin ^{2} x}
$$

$F(x)=-\frac{\cos x}{2 \sin ^{2} x} \cdot e^{-x}-\frac{1}{2} \int \frac{e^{-x}}{\sin x} d x-\frac{1}{2} \int \frac{\cos x}{\sin ^{2} x} \cdot e^{-x} d x$

Let $I=\int \frac{\cos x}{\sin ^{2} x} \cdot e^{-x} d x$. We integrate by parts

$$
\begin{aligned}
& g(x)=e^{-x}, \quad u^{\prime}(x)=-e^{-x} \\
& h^{\prime}(x)=\frac{\cos x}{\sin ^{2} x}, \quad h(x)=-\frac{1}{\sin x}
\end{aligned}
$$

Thus, $I=-\frac{e^{-x}}{\sin x}--\int \frac{e^{-x}}{\sin x} d x$

Therefore, $F(x)=-\frac{\cos x}{2 \sin ^{2} x} \cdot e^{-x}-\frac{1}{2} \int \frac{e^{-x}}{\sin x} d x+\frac{1}{2} \cdot \frac{e^{-x}}{\sin x}+\frac{1}{2} \int \frac{e^{-x}}{\sin x} d x=\frac{\sin x-\cos x}{2 \sin ^{2} x} \cdot e^{-x}+C$ (1p)

Using the condition $F\left(\frac{\pi}{4}\right)=0$ we get $C=0$.

Thus, the function we are looking for is $F(x)=\frac{\sin x-\cos x}{2 \sin ^{2} x} \cdot e^{-x}$