#### Answer

The solution of the initial value problem is
\[y = {t^{ - 2}}\left[ { - t\cos t + \sin t + {{\left( {\frac{\pi }{2}} \right)}^2} - 1} \right]\]

#### Work Step by Step

Consider the following initial value problem,
\[\begin{array}{c}
ty' + 2y = \sin t\\
y\left( {\frac{\pi }{2}} \right) = 1
\end{array}\]
First, find the integrating factor $\mu \left( t \right)$ of the above first order linear differential equation.
Since, the integrating factor $\mu \left( t \right)$ of the general first order linear differential equation $\frac{{dy}}{{dt}} + p\left( t \right)y = g\left( t \right)$ is evaluated as,
$\mu \left( t \right) = {e^{\int {p\left( t \right)dt} }}$
And the solution of the first order linear differential equation is evaluated as,\[y \cdot \mu \left( t \right) = \int {\mu \left( t \right) \cdot g\left( t \right)dt + c} \]
Where $c$ is constant of integration.
Now, write the given first order linear differential equation in standard form.
\[t\frac{{dy}}{{dt}} + 2y = \sin t\]
Divide both sides in the above equation by $t$, then
$\frac{{dy}}{{dt}} + \frac{2}{t}y = \frac{{\sin t}}{t}$
Now, compare the above differential equation with the general first order linear differential equation.
Then,
\[p\left( t \right) = \frac{2}{t},g\left( t \right) = \frac{{\sin t}}{t}\]
Therefore, the integrating factor of the first order differential equation is,
\[\begin{array}{c}
\mu \left( t \right) = {e^{\int {p\left( t \right)dt} }}\\
= {e^{\int {\frac{2}{t}dt} }}\\
= {e^{2\ln \left| t \right|}}\\
= {e^{\ln {{\left| t \right|}^2}}}\\
= {t^2}
\end{array}\]
Since, the solution of the first order differential is evaluated as,
\[y \cdot \mu \left( t \right) = \int {\mu \left( t \right) \cdot g\left( t \right)dt + c} \]
Now, put the value of integrating factor $\mu\left(t\right)$ and \[{g\left( t \right) = \frac{{\sin t}}{t}}\].
.
Then,
\[\begin{array}{c}
y \cdot \mu \left( t \right) = \int {\mu \left( t \right) \cdot g\left( t \right)dt + c} \\
y \cdot {t^2} = \int {{t^2} \cdot \frac{{\sin t}}{t}dt + c} \\
y \cdot {t^2} = \int {t \cdot \sin tdt + c} \\
y \cdot {t^2} = - t \cdot \cos t + \sin t + c
\end{array}\]
Then, the general solution of the first order differential equation is,
\[y \cdot {t^2} = - t\cos t + \sin t + c\]
Now, apply the initial condition\[y\left( {\frac{\pi }{2}} \right) = 1\] Then,
\[\begin{array}{c}
1 \cdot {\left( {\frac{\pi }{2}} \right)^2} = - \left( {\frac{\pi }{2}} \right)\cos \left( {\frac{\pi }{2}} \right) + \sin \left( {\frac{\pi }{2}} \right) + c\\
{\left( {\frac{\pi }{2}} \right)^2} = - \left( {\frac{\pi }{2}} \right) \cdot 0 + 1 + c\\
{\left( {\frac{\pi }{2}} \right)^2} = 1 + c\\
c = {\left( {\frac{\pi }{2}} \right)^2} - 1
\end{array}\]
Now, put the value of the constant $c$ in the general solution of the first order differential equation,
\[\begin{array}{c}
y \cdot {t^2} = - t\cos t + \sin t + c\\
y \cdot {t^2} = - t\cos t + \sin t + {\left( {\frac{\pi }{2}} \right)^2} - 1\\
y = {t^{ - 2}}\left[ { - t\cos t + \sin t + {{\left( {\frac{\pi }{2}} \right)}^2} - 1} \right]
\end{array}\]
Hence, the required solution of the initial value problem is
\[y = {t^{ - 2}}\left[ { - t\cos t + \sin t + {{\left( {\frac{\pi }{2}} \right)}^2} - 1} \right]\]