20.7.13 problem Problem 38

Internal problem ID [3728]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.3, The Method of Undetermined Coefficients. page 525
Problem number : Problem 38
Date solved : Monday, January 27, 2025 at 07:56:24 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+\omega ^{2} y&=\frac {F_{0} \cos \left (\omega t \right )}{m} \end{align*}

With initial conditions

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

Solution by Maple

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

dsolve([diff(y(t),t$2)+omega^2*y(t)=F__0/m*cos(omega*t),y(0) = 1, D(y)(0) = 0],y(t), singsol=all)
 
\[ y = \cos \left (\omega t \right )+\frac {F_{0} \sin \left (\omega t \right ) t}{2 \omega m} \]

Solution by Mathematica

Time used: 0.068 (sec). Leaf size: 26

DSolve[{D[y[t],{t,2}]+\[Omega]^2*y[t]==F0/m*Cos[\[Omega]*t],{y[0]==1,Derivative[1][y][0] ==0}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \frac {\text {F0} t \sin (t \omega )}{2 m \omega }+\cos (t \omega ) \]