$$I = \exp(-\int\frac{\cos t}{\sin t}dt)$$
$$I = \exp(-\int\frac{1}{\sin t}\cos tdt)$$
$$I = \exp(-\int\frac{1}{\sin^2 t}dt)$$
$$I = \exp(-\ln|\sin^2t|)$$
$$I = \sin t$$
but answer should be $$\color{red}{\frac{1}{\sin t}}$$
what did I do wrong?
$$I = \exp(-\int\frac{\cos t}{\sin t}dt)$$
$$I = \exp(-\int\frac{1}{\sin t}\cos tdt)$$
$$I = \exp(-\int\frac{1}{\sin^2 t}dt)$$
$$I = \exp(-\ln|\sin^2t|)$$
$$I = \sin t$$
but answer should be $$\color{red}{\frac{1}{\sin t}}$$
what did I do wrong?
How does $\frac 1{\sin t} \cos t$ become $\frac 1{\sin^2 t}$??
$-\int \frac {\cos t}{\sin t} dt\\ u = \sin t\\ du = \cos t\\ -\int \frac 1u du\\ -\ln u\\ -\ln \sin t\\ \ln (\sin t)^{-1}\\ \ln\frac {1}{\sin t}\\ e^{\ln\frac {1}{\sin t}} = \frac {1}{\sin t}$
The mistake lies on the third step $I = exp(-\int \dfrac{\cos t}{\sin t} d t $ From $u$-substition let $u = \sin t$ then $d u = \cos t d t$ hence we have $I = exp(-\int\dfrac{d u}{u} = exp(-\ln u) = \dfrac{1}{u} = \dfrac{1}{\sin t}$
May be this direct formula helps you
$$\int\frac{f'(x)}{f(x)}dx=\ln\lvert{f(x)}\rvert+c$$