How to solve $(1-t)^2dy+(ty-y+3)dt=0$ I want to solve this differential equation: $(1-t)^2dy+(ty-y+3)dt=0$
I tried to use separation method:
$$(1-t)^2dy+y(t-1)dt+3dt=0$$
$$\frac{dy}{y}+\frac{dt}{t-1}+\frac{3}{y(t-1)^2}dt=0$$
But in the last fraction I still have $t$ and $y$. I don't know how to separate it.
 A: Note that your ODE is a linear equation. So we have
$$(1-x)^{2}dy+(xy-y+3)dx=0 \iff \frac{dy}{dx}+\frac{y}{x-1}=-\frac{3}{(x-1)^{2}}$$
Let the integrant factor $\displaystyle \mu(x)=\exp\left[ \int \frac{1}{x-1}dx \right]=x-1$.
Now, multiply both sides by $\mu$ we have $$(x-1)\frac{dy}{dx}+y=-\frac{3}{x-1}$$
Solving this part $$ \int \frac{d}{dx}((x-1)y)dx=-\int \frac{3}{x-1}dx\implies (x-1)y=-2\ln|x-1|+c $$
So, we have $$\boxed{y=\frac{-3\ln|x-1|+c}{x-1}}$$

Note: If you have a ODE of the form $$y'+P(x)y=Q(x)$$
So, the integrant factor is the form $$\mu(x)=\exp\left[\int P(x)dx \right]$$
Then, you can multiply both sides of the ODE and you can get $$\frac{d}{dx}(y\mu)=Q(x)\mu(x)dx$$
So, we have $$y\mu(x)=\int Q(x)\mu(x)dx+C$$
So, the general solution for the ODE linear equation of first order is $$\boxed{y(x)=\frac{1}{\mu(x)}\left[\int Q(x)\mu(x)dx+c \right]}$$
A: Hint
With all these $(1-t)$'s, let $y=\frac z{1-t}$ and it will be very simple.
A: $$(1-t)^2dy+(ty-y+3)dt=0$$
$$(1-t)^2dy+y(t-1)dt+3dt=0$$
$$u^2dy+yudu+3du=0$$
$$u(udy+ydu)+3du=0$$
$$d(yu)+\dfrac 3udu=0$$
Where $u=t-1$.
The differential equation is now exact.  Integrate:
$$yu+ 3\ln  |u|=C$$
$$\boxed {y(t-1)+ 3\ln  |t-1|=C}$$
