7.18.6 problem 6

Internal problem ID [535]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 4. Laplace transform methods. Section 4.2 (Transformation of initial value problems). Problems at page 287
Problem number : 6
Date solved : Wednesday, February 05, 2025 at 03:42:21 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 0.226 (sec). Leaf size: 16

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

Solution by Mathematica

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

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