74.12.51 problem 60

Internal problem ID [16358]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.4, page 163
Problem number : 60
Date solved : Tuesday, January 28, 2025 at 09:06:50 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

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

Solution by Maple

Time used: 0.349 (sec). Leaf size: 47

dsolve([diff(y(t),t$2)+4*y(t)=f(t),y(0) = 0, D(y)(0) = 2],y(t), singsol=all)
 
\[ y = \sin \left (2 t \right )+\frac {\left (\int _{0}^{t}\cos \left (2 \textit {\_z1} \right ) f \left (\textit {\_z1} \right )d \textit {\_z1} \right ) \sin \left (2 t \right )}{2}-\frac {\left (\int _{0}^{t}\sin \left (2 \textit {\_z1} \right ) f \left (\textit {\_z1} \right )d \textit {\_z1} \right ) \cos \left (2 t \right )}{2} \]

Solution by Mathematica

Time used: 0.058 (sec). Leaf size: 106

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