From an answer on this question, I got the differential equation
$$\frac{d}{dt} f(t) = \frac{2t}{1-t} f(t) + \frac{1}{(1-t)^2}$$
and I was even given the solution $$f(t) = \frac{1-e^{-2t}}{2(1-t)^2}.$$ It seems to be correct, however, I have trouble understanding how the solution was achieved. I tried building a power series $f(t) = \sum_{n=0}^\infty a_n t^n$ out of $f$ and finding the coefficients for it like in this tutorial, but I ended up in a huge ugly sum term
$$ a_n = \frac{(2t)^n}{n!(1-t)^n} a_0 + \sum_{k=1}^n \frac{(2t)^{n-k}}{n!/k! (1-t)^{n-k}}. $$
Not fully shure if this is right. Somehow, the taylor series of the $e$-function sticks in there, but I don't think that this will lead to the solution above. So I am stuck here and any help would be appreciated.
$$y=f(t)$$ $$\frac {dy}{dt} -\frac {2ty}{(1-t)}=\frac{1}{(1-t)^2} $$ $$\text{I.F}=e^{2t}(t-1)^2$$ $$y\cdot e^{2t}(t-1)^2=e^{2t}dt $$ $$y\cdot e^{2t}(t-1)^2=\frac12e^{2t} + c$$ Given $f(0)=0$ $\implies c=-\frac12$ $$f(t)=\frac{1-e^{-2t}}{2(t-1)^2} $$
Explanation for fourth line : $$\frac{dy}{dx} +Py =Q $$ where $P $ and $Q $ are function of $x $.
Multiply both sides by $e^{\int Pdx} $, we get $$\frac{dy}{dx}e^{\int Pdx} +Pye^{\int Pdx} =Qe^{\int Pdx} $$ $$\implies \frac {d}{dx}{(ye^{\int Pdx})}=Qe^{\int Pdx}$$ $$\implies {d}{(ye^{\int Pdx})}=Qe^{\int Pdx}dx$$ Integrating both sides $$(ye^{\int Pdx})=Qe^{\int Pdx}+k$$ The factor $e^{\int Pdx}$ which makes it possible for the left hand side to be integrable is called an Integrating factor.