Solve the following differential equation: $ty' + 2y = \sin(t)$ An exercise from the book:

Solve the following differential equation: $ty' + 2y = \sin(t)$

This is the first time I approch a differential equation, and the book doesn't provide an example how to solve an differential equation,
So I need your help to show me how to solve this differential equation.
It's not a homework. Thanks in advance!

Hint:
Consider the following ODE:
$$y'(t) + p(t) y(t) = F(t).$$
Suppose you are interested in rewriting this equation as follows:
$$ \frac{d}{dt}(I y) = I F,$$
for some function $I(t)\neq 0$ (called integrating factor). Expand the product of derivatives to find:
$$y' + \frac{I'}{I} y = F, $$
so it must hold:
$$\frac{I'}{I} = p(t) \iff I(t) =e^{\int p(t) dt},$$ being the constant of integration set to 1 since it's not relevant (both sides of the equation are multiplied by $I$). This leads you to the solution:
$$Iy = \int IF \, dt + A,$$ 
with $A$ a constant of integration.
Identify $p(t) = 2/t$ and $F(t) = \sin t/t$ in order to achieve the solution.
Cheers!
