The problem: $x' - \cot(t) \cdot x = 1 - \cos^2(t), x\left(\frac{\pi}{2}\right)=0$
The solving part:
$$e^{-\int \cot(t)dt}=\frac{1}{\sin(t)}$$
$$\frac{x'}{\sin(t)}-\frac{\cos(t)}{\sin^2(t)}\cdot x = \frac{1-\cos^2(t)}{\sin(t)}$$
$$\frac{x}{\sin(t)}= -\cos(t)+C$$
$$x(t)=-\cos(t)\sin(t)+C \cdot \sin(t)$$
$$x\left(\frac{\pi}{2}\right)=0 \Rightarrow C=0$$
$$x(t)=-\cos(t)\sin(t)$$
Is my solution correct?