20.21.3 problem Problem 3

Internal problem ID [3930]
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 3
Date solved : Sunday, March 30, 2025 at 02:12:10 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+3 y&=2 \,{\mathrm e}^{-t} \end{align*}

Using Laplace method With initial conditions

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

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