For the ODE
![ty'+2y=\sin t](https://img.qammunity.org/2021/formulas/mathematics/college/x6pp196zt12hn075k8s18k02x6xsknsjis.png)
multiply both sides by t so that the left side can be condensed into the derivative of a product:
![t^2y'+2ty=t\sin t](https://img.qammunity.org/2021/formulas/mathematics/college/8lv0lfvnx6t0edhczn57gk4d3xsl71r8tq.png)
![\implies(t^2y)'=t\sin t](https://img.qammunity.org/2021/formulas/mathematics/college/rmsx8mzfhk6r5fuxb7j6pld3i2lewev2r0.png)
Integrate both sides with respect to t :
![t^2y=\displaystyle\int t\sin t\,\mathrm dt=\sin t-t\cos t+C](https://img.qammunity.org/2021/formulas/mathematics/college/5049bj4of3qiyrpyywswu5wktlnypw5kof.png)
Divide both sides by
to solve for y :
![y(t)=(\sin t)/(t^2)-\frac{\cos t}t+\frac C{t^2}](https://img.qammunity.org/2021/formulas/mathematics/college/y10k7y0su21atjntfn6ylfndc6g1k9gqek.png)
Now use the initial condition to solve for C :
![y\left(\frac\pi2\right)=9\implies9=\frac{\sin\frac\pi2}{\frac{\pi^2}4}-(\cos\frac\pi2)/(\frac\pi2)+\frac C{\frac{\pi^2}4}](https://img.qammunity.org/2021/formulas/mathematics/college/nibl0x0j3adqm2ht5bgaxb7jbh7vxzaeun.png)
![\implies9=\frac4{\pi^2}(1+C)](https://img.qammunity.org/2021/formulas/mathematics/college/a0b2arm2gngopa4tqhzrxjd7gansmk5ms9.png)
![\implies C=\frac{9\pi^2}4-1](https://img.qammunity.org/2021/formulas/mathematics/college/83ywvlrh903r1axe46at93nj3xvynxnibi.png)
So the particular solution to the IVP is
![y(t)=(\sin t)/(t^2)-\frac{\cos t}t+\frac{\frac{9\pi^2}4-1}{t^2}](https://img.qammunity.org/2021/formulas/mathematics/college/8jcbkl5cxxnep46kyhshksibshavtsfgxr.png)
or
![y(t)=(4\sin t-4t\cos t+9\pi^2-4)/(4t^2)](https://img.qammunity.org/2021/formulas/mathematics/college/rysian1fimufgnf472shhwl1qmefxlt50j.png)