74.18.39 problem 45

Internal problem ID [16596]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Chapter 4 review exercises, page 219
Problem number : 45
Date solved : Tuesday, January 28, 2025 at 09:12:09 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

\begin{align*} y \left (0\right )&=0\\ y^{\prime }\left (0\right )&=0 \end{align*}

Solution by Maple

Time used: 0.007 (sec). Leaf size: 9

dsolve([diff(y(t),t$2)+y(t)=cos(t),y(0) = 0, D(y)(0) = 0],y(t), singsol=all)
 
\[ y = \frac {t \sin \left (t \right )}{2} \]

Solution by Mathematica

Time used: 0.023 (sec). Leaf size: 44

DSolve[{D[y[t],{t,2}]+y[t]==Cos[t],{y[0]==0,Derivative[1][y][0] ==0}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to -\frac {1}{4} \sin (t) \left (-4 \int _1^t\cos ^2(K[1])dK[1]+4 \int _1^0\cos ^2(K[1])dK[1]+\sin (2 t)\right ) \]