76.16.3 problem 17

Internal problem ID [17680]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.6 (Forced vibrations, Frequency response, and Resonance). Problems at page 272
Problem number : 17
Date solved : Tuesday, January 28, 2025 at 10:55:38 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=2 \cos \left (w 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.030 (sec). Leaf size: 23

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

Solution by Mathematica

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

DSolve[{D[y[t],{t,2}]+y[t]==2*Cos[w*t],{y[0]==0,Derivative[1][y][0] == 0}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \frac {2 (\cos (t)-\cos (t w))}{w^2-1} \]