Answer
$y = \frac{\sin t - t\cos t}{t^2} + \frac{C}{t^2}$
Work Step by Step
$$ty' + 2y = \sin t$$
We solve this by the integrating factor method:
$$\mu(t) = e^{\int P(t),dt}$$
Here, $P(t) = \frac{2}{t}$
Therefore,
$$\mu(t) = e^{\int \frac{2}{t}dt} = e^{2\ln t} = e^{\ln t^2} = t^2$$
Now, multiplying both sides of the equation by $\mu(t)$:
$$t^2(y' + \tfrac{2}{t}y) = t^2 \cdot \tfrac{\sin t}{t}$$
$$t^2y' + 2ty = t\sin t$$
Notice the left-hand side of the equation:
$$(t^2y)' = t\sin t$$
Then, integrating on both sides:
$$\int (t^2y)',dt = \int t\sin t,dt$$
On the right-hand side:
$$\int t\sin t,dt = -t\cos t + \sin t + C$$
Therefore:
$$t^2y = -t\cos t + \sin t + C$$
Dividing both sides by $t^2$:
$$y = \frac{\sin t}{t^2} - \frac{\cos t}{t} + \frac{C}{t^2}$$