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)$.
When I rederive your equations everything Iooks good until your last line. Then I find:
$3b+6(b-1)t^{-1}y^{-1}=(a+2)+3(a-1)t^{-3}y^2$
Initially you had $a+1$ instead of $a+2$ missing a factor of 2 in one of your terms; now corrected.
Now we argue that the terms with unlike powers of $t$ and $y$ on the left and right sides must be zeroed out, forcing $a=b=1$; then this must be checked by verifying the remaining terms are equal. Only if this checking step works do you have an integrating factor with the assumed form; if it doesn't work you need a different integrating factor. Here, $3b=a+2$ works. Thereby $ty$ is proved an integrating factor.