52.6.9 problem 29

Internal problem ID [8344]
Book : DIFFERENTIAL EQUATIONS with Boundary Value Problems. DENNIS G. ZILL, WARREN S. WRIGHT, MICHAEL R. CULLEN. Brooks/Cole. Boston, MA. 2013. 8th edition.
Section : CHAPTER 7 THE LAPLACE TRANSFORM. 7.3.1 TRANSLATION ON THE s-AXIS. Page 297
Problem number : 29
Date solved : Wednesday, March 05, 2025 at 05:35:31 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&={\mathrm e}^{t} \cos \left (t \right ) \end{align*}

Using Laplace method With initial conditions

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

Maple. Time used: 0.733 (sec). Leaf size: 24
ode:=diff(diff(y(t),t),t)-y(t) = exp(t)*cos(t); 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = \frac {{\mathrm e}^{-t}}{5}+\frac {{\mathrm e}^{t} \left (-\cos \left (t \right )+2 \sin \left (t \right )\right )}{5} \]
Mathematica. Time used: 0.031 (sec). Leaf size: 29
ode=D[y[t],{t,2}]-y[t]==Exp[t]*Cos[t]; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{5} \left (e^{-t}+2 e^t \sin (t)-e^t \cos (t)\right ) \]
Sympy. Time used: 0.149 (sec). Leaf size: 24
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-y(t) - exp(t)*cos(t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (\frac {2 \sin {\left (t \right )}}{5} - \frac {\cos {\left (t \right )}}{5}\right ) e^{t} + \frac {e^{- t}}{5} \]