Integrating factor Can anyone give me some hints as to how to solve the following question?

I have to show that the equation below has an integrating factor of the form $t^2\theta^c$ where $c$ is an integer.
$\theta(\theta^2 + 2t) + 2t(\theta^2+t)\frac{d\theta}{dt} = 0$

I started off by multiplying the integrating factor $t^2\theta^c$ through to obtain

$t^2\theta^{c+3} + 2t^3\theta^{c+1} + (2t^3\theta^{c+2} + 2t^4\theta^c)\frac{d\theta}{dt} = 0 $

and here's where I got a bit stuck-tried a few things and got c = -2 which is not the right answer. I've also tried transforming the equation into a linear one but its not panning out right. Any help would be much appreciated.

Write your equation as $$t^2\theta^{c+3} + 2t^3\theta^{c+1} +  2t^3\theta^{c+2} \theta'+ 2t^4\theta^c \theta' = \frac 13 (t^3)'\theta^{c+3} + \frac 24 (t^4)'\theta^{c+1} +  \frac{2}{c+3} t^3(\theta^{c+3})' + \frac{2}{c+1}t^4(\theta^{c+1})'.$$ Now we want to group the terms with same powers of $t$ and $\theta$. We want to put, of course, $\frac 13 = \frac {2}{c+3}$ and $\frac {2}{4}=\frac{2}{c+1}$. These two conditions are consistent and have a solution $c=3$. we can continue with
$$\frac 13 (t^3 \theta^{6})' + \frac 12 (t^4  \theta^{4})' =0.$$In other words, $t^2\theta^c$ is indeed an integrating factor for $c=3$.
