<s>[INST] Finding an integrating factor for $(3t + \frac{6}{y})dt + (\frac{t^2}{y} + \frac{3y}{t})dy = 0$ I want to solve the differential equation 
$$
\begin{equation}
(3t + \frac{6}{y})dt + (\frac{t^2}{y} + \frac{3y}{t})dy = 0\
\end{equation}
$$
using an integrating factor of the form $t^a y^b$ in order to make it exact, where
$$
M(t, y) = 3t + \frac{6}{y},\\
N(t, y) = \frac{t^2}{y} + \frac{3y}{t}.
$$
So we want 
$$
\begin{align}
\frac{\partial}{\partial y} (t^ay^bM) &= \frac{\partial}{\partial t} (t^ay^bN)\\
b t^a y^{b-1} M+ t^ay^b \frac{\partial}{\partial y}M  &= at^{a-1}y^bN + t^a y^b \frac{\partial}{\partial t}N.
\end{align}
$$
By susbtituting 
$$
\begin{align}
\frac{\partial}{\partial y}M &= -\frac{6}{y^2} \\
\frac{\partial}{\partial t}N &= \frac{2t}{y} - \frac{3y}{t^2},
\end{align}
$$
I arrived at
$$
3b + 6(b-1)t^{-1}y^{-1} = (a+2) + 3(a-1)t^{-3}y^{2}.
$$
But how do I find the values of $a$ and $b$ from here?
(Also, if my calculations could be verified, I'd really appreciate it!)
Edit #1: Apparently, on the last line, I had arrived at $(a+1)$, when in fact it should have been $(a+2)$.
 [/INST] Here is a different approach to this problem. In the first place, notice that
\begin{align*}
3t + \frac{6}{y} + \left(\frac{t^{2}}{y} + \frac{3y}{t}\right)y^{\prime} = 0
\end{align*}
As suggested by Moo, multiply it by $ty$ in order to obtain
\begin{align*}
3t^{2}y + 6t + (t^{3} + 3y^{2})y^{\prime} = 0
\end{align*}
Then we can rearrange it as
\begin{align*}
(3t^{2}y + t^{3}y^{\prime}) + 3y^{2}y^{\prime} + 6t = 0 \Longleftrightarrow (t^{3}y)^{\prime} + (y^{3})^{\prime} + 6t = 0
\end{align*}
After integration, it becomes
\begin{align*}
t^{3}y + y^{3} + 3t^{2} + k =0
\end{align*}
which is a cubic in the dependent variable $y$.
</s>