Solving ODE with initial condition, one step wrong I have a step wrong while solving my IVP but I cannot find what. I will post my detailed solution in the hope someone sees where it goes awry:
The IVP: $$t^2 \frac{dy}{dt}−t=1+y+ty,y(1)=4.$$

*

*I start by moving all function of y on the RHS:
$$\displaystyle$$
$$\displaystyle t^2\frac{dy}{dt}-y-ty=1 +t$$
$$t^2\frac{dy}{dt}-(1+t)y=1 +t$$

*It is not in standard form so I continue by divinding by $t^2$:
$$\frac{dy}{dt}-\frac{(1+t)}{t^2}y=\frac{1 +t}{t^2}$$

*With $h(t) = -\frac{(1+t)}{t^2}$ I can use integrating factor $e^{\int h(t)}$ = $e^{H(t)}$. With $H(t) = \frac{1}{t} - ln(t)$, I get :

$$e^{\frac{1}{t} - ln(t)}\frac{dy}{dt}- e^{\frac{1}{t} - ln(t)}\frac{(1+t)}{t^2}y=\frac{1 +t}{t^2}e^{\frac{1}{t} - ln(t)}$$
Which can be rewritten as:
$$\frac{d}{dt}(e^{\frac{1}{t} - ln(t)} y) = \frac{1 +t}{t^2}e^{\frac{1}{t} - ln(t)}$$
$$\displaystyle e^{\frac{1}{t} - ln(t)} y = \int{ \frac{1 +t}{t^2}e^{\frac{1}{t} - ln(t)}} $$
$$\displaystyle e^{\frac{1}{t} - ln(t)} y =  -e^{\frac{1}{t} - ln(t)} + C $$
4. by multiplying with $e^-H(t)= e^{-\left(\frac{1}{t} - ln(t)\right)}$ we get:
$$ y(1) = 4 =  -1 + Ce^{-\left(\frac{1}{t} - ln(t)\right)} \\
C = 5e$$


*The initial value condition gives that C:

$$y(1) = 4 =  -1 + Ce^{-\left(\frac{1}{t} - ln(t)\right)} \\
C = 5e$$
$$y(t) = -1 + 5 e e^{-\left(\frac{1}{t} - ln(t)\right)}  \\ 
y(t) = -1 + 5 e^{-\left(\frac{1}{t} - ln(t) - 1\right)}$$
But this appears to be wrong. Is there some step I am doing wrong?
EDIT: fixed -1 in exponent as per the comments.
EDIT 2: trying to plug in in the original equation
Simplifying we get:
$$y(t) = -1 + 5 t e^{1-\frac{1}{t}}\\
y'(t) =  5  e^{1-\frac{1}{t}} + 5t \frac{1}{t^2}e^{1-\frac{1}{t}} \\
y'(t) =  5  e^{1-\frac{1}{t}} + 5 \frac{1}{t}e^{1-\frac{1}{t}}$$
$$t^2 \frac{dy}{dt}−t=1+y+ty \\
t^2 \left(5  e^{1-\frac{1}{t}} + 5t \frac{1}{t}e^{1-\frac{1}{t}} \right) -t = 1 -1 + 5 t e^{1-\frac{1}{t}}  -t + 5 t^2 e^{1-\frac{1}{t}} $$
Seems everything is disappearing, but I still get wrong on the automatic assessment.

Isolate the derivative on the left side
$$
t^2y'=1+t+y+yt=(1+t)(1+y).
$$
This is a separable first order DE, so that
$$
\ln(1+y)=\int\frac{dy}{1+y}=\int\frac{(1+t)dt}{t^2}=-\frac1t+\ln(t)+c
\\~\\
(1+y)=Cte^{-1/t}.
$$
Etc.
