76.2.18 problem 18

Internal problem ID [17354]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.2 (Linear equations: Method of integrating factors). Problems at page 54
Problem number : 18
Date solved : Tuesday, January 28, 2025 at 10:02:11 AM
CAS classification : [_linear]

\begin{align*} y^{\prime } t +2 y&=\sin \left (t \right ) \end{align*}

With initial conditions

\begin{align*} y \left (\frac {\pi }{2}\right )&=3 \end{align*}

Solution by Maple

Time used: 0.026 (sec). Leaf size: 22

dsolve([t*diff(y(t),t)+2*y(t)=sin(t),y(1/2*Pi) = 3],y(t), singsol=all)
 
\[ y = \frac {\sin \left (t \right )-t \cos \left (t \right )+\frac {3 \pi ^{2}}{4}-1}{t^{2}} \]

Solution by Mathematica

Time used: 0.043 (sec). Leaf size: 37

DSolve[{t*D[y[t],t]+2*y[t]==Sin[t],{y[Pi/2]==3}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \frac {4 \int _{\frac {\pi }{2}}^tK[1] \sin (K[1])dK[1]+3 \pi ^2}{4 t^2} \]