14.16.8 problem 24

Internal problem ID [2678]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.9, The method of Laplace transform. Excercises page 232
Problem number : 24
Date solved : Sunday, March 30, 2025 at 12:13:54 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using Laplace method With initial conditions

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

Maple. Time used: 0.153 (sec). Leaf size: 47
ode:=diff(diff(y(t),t),t)-3*diff(y(t),t)+2*y(t) = exp(-t); 
ic:=y(t__0) = 1, D(y)(t__0) = 0; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = -{\mathrm e}^{2 t -2 t_{0}}+2 \,{\mathrm e}^{t -t_{0}}+\frac {{\mathrm e}^{-t}}{6}+\frac {{\mathrm e}^{2 t -3 t_{0}}}{3}-\frac {{\mathrm e}^{-2 t_{0} +t}}{2} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 38
ode=D[y[t],{t,2}]-3*D[y[t],t]+2*y[t]==Exp[-t]; 
ic={y[t0]==0,Derivative[1][y][t0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{6} e^{-t-3 \text {t0}} \left (e^t-e^{\text {t0}}\right )^2 \left (2 e^t+e^{\text {t0}}\right ) \]
Sympy. Time used: 0.276 (sec). Leaf size: 44
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(2*y(t) - 3*Derivative(y(t), t) + Derivative(y(t), (t, 2)) - exp(-t),0) 
ics = {y(t__0): 1, Derivative(y(t__0), t__0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {\left (1 - 3 e^{t^{0}}\right ) e^{2 t} e^{- 3 t^{0}}}{3} + \frac {\left (4 e^{t^{0}} - 1\right ) e^{t} e^{- 2 t^{0}}}{2} + \frac {e^{- t}}{6} \]