76.19.7 problem 7

Internal problem ID [17731]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 5. The Laplace transform. Section 5.4 (Solving differential equations with Laplace transform). Problems at page 327
Problem number : 7
Date solved : Tuesday, January 28, 2025 at 11:01:57 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 10.907 (sec). Leaf size: 27

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

Solution by Mathematica

Time used: 0.180 (sec). Leaf size: 28

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