20.21.8 problem Problem 8

Internal problem ID [3935]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 10, The Laplace Transform and Some Elementary Applications. Exercises for 10.4. page 689
Problem number : Problem 8
Date solved : Sunday, March 30, 2025 at 02:12:16 AM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+y^{\prime }-2 y&=0 \end{align*}

Using Laplace method With initial conditions

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

Maple. Time used: 0.101 (sec). Leaf size: 15
ode:=diff(diff(y(t),t),t)+diff(y(t),t)-2*y(t) = 0; 
ic:=y(0) = 1, D(y)(0) = 4; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = 2 \,{\mathrm e}^{t}-{\mathrm e}^{-2 t} \]
Mathematica. Time used: 0.014 (sec). Leaf size: 18
ode=D[y[t],{t,2}]+D[y[t],t]-2*y[t]==0; 
ic={y[0]==1,Derivative[1][y][0] ==4}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to 2 e^t-e^{-2 t} \]
Sympy. Time used: 0.136 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*y(t) + Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 1, Subs(Derivative(y(t), t), t, 0): 4} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = 2 e^{t} - e^{- 2 t} \]