Linear differential equations, integrating factor Solve the following differential equation:
$$ dr+(2r \cot\theta+\sin 2\theta)d\theta=0$$
I have tried like this:
$$ \frac{dr}{d\theta}+2r\cot\theta=-\sin{2\theta}$$
\begin{align}
I.F. &=e^{\int{2\cot\theta d\theta}}\\
& =e^{-2\log\sin\theta}\\
& =\frac 1{\sin^2\theta}\\
\end{align}
$$\therefore\frac r{\sin^2\theta}=-\int\frac{\sin 2\theta d\theta}{\sin^2\theta}\\
\implies \frac r{\sin^2\theta}=-2\int{\cot\theta d\theta}\\
\implies \frac r{\sin^2\theta}=2\log\sin\theta+c $$
But in my book the answer is:
$$2r{\sin^2\theta}+{\sin^4\theta}=c$$
Please check out which is correct..
 A: HINT...your error is in calculating the IF, which should be $\sin^2\theta$ due to the fact that the integral of $\cot\theta$ is $\log\sin\theta$ not $-\log\sin\theta$
A: $$dr+(2r \cot\theta+\sin 2\theta)d\theta=0$$
$$\sin \theta dr+(2r \cos\theta+2\sin^2 \theta\cos\theta )d\theta=0$$
Multiply by $2\sin \theta$:
$$2\sin^2 \theta dr+(4r \cos\theta\sin \theta+4\sin^3 \theta\cos\theta )d\theta=0$$
$$2\sin^2 \theta dr+2r d\sin^2 \theta+ d\sin^4 \theta=0$$
$$2(\sin^2 \theta dr+r d\sin^2 \theta)+ d\sin^4 \theta=0$$
$$2 dr\sin^2 \theta+ d\sin^4 \theta=0$$
Integrate:
$$2 r\sin^2 \theta+ \sin^4 \theta=C$$
A: You messed up with your multiplication. Multiplying the integral factor to both sides should yield:
$$\dfrac{d}{d\theta}\left(\dfrac{r}{\sin^2\theta}\right)=\left(\dfrac{1}{\sin\theta}\right)^2\dfrac{dr}{d\theta}+2\cot\theta\left(\dfrac{1}{\sin\theta}\right)^2 r=-\sin2\theta\left(\dfrac{1}{\sin\theta}\right)^2=-2\cot\theta$$
and so
$$\dfrac{r}{\sin^2\theta}=-2\int\cot\theta d\theta=-2\log(\sin\theta)+C$$
