2.1 p. 40, #18
\begin{gather}
ty' + 2y = \sin t,\\
y(Ï€/2) = 1
\end{gather}
First, change the equation by dividing every term by $t$.
\begin{equation}
y' + (2/t)y = (\sin (t))/t
\end{equation}
Then, solve for the integrating factor.
\begin{equation}
μ = e^{\int (2/t)\,dt} = e^{2\ln(t)\,} = t^2
\end{equation}
Multiply every term in equation by μ.
\begin{equation}
t^2y' + 2ty = t\sin(t)
\end{equation}
Integrate both sides of the equation.
\begin{gather}
\int[t^2y]' = \int{t\sin(t)}dt\implies
t^2y = −t\cos(t) − \int{-\cos(t)}dt= −t\cos(t) + \sin(t) + C\implies y = (−t \cos(t) +\sin (t) + C)/t^2
\end{gather}
Substitute the initial value to solve for C.
\begin{gather}
C = (Ï€/2)^2-1
\end{gather}
Therefore, the solution is:
\begin{gather}
y = (−t \cos(t) +\sin (t) + (π/2)^2-1)/t^2
\end{gather}