14.17.5 problem 23

Internal problem ID [2683]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.10, Some useful properties of Laplace transform. Excercises page 238
Problem number : 23
Date solved : Sunday, March 30, 2025 at 12:14:01 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using Laplace method With initial conditions

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

Maple. Time used: 0.175 (sec). Leaf size: 38
ode:=diff(diff(y(t),t),t)+diff(y(t),t)+y(t) = 1+exp(-t); 
ic:=y(0) = 3, D(y)(0) = -5; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = -\frac {7 \,{\mathrm e}^{-\frac {t}{2}} \sqrt {3}\, \sin \left (\frac {\sqrt {3}\, t}{2}\right )}{3}+{\mathrm e}^{-\frac {t}{2}} \cos \left (\frac {\sqrt {3}\, t}{2}\right )+{\mathrm e}^{-t}+1 \]
Mathematica. Time used: 0.76 (sec). Leaf size: 56
ode=D[y[t],{t,2}]+D[y[t],t]+y[t]==1+Exp[-t]; 
ic={y[0]==3,Derivative[1][y][0] ==-5}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-t}-\frac {7 e^{-t/2} \sin \left (\frac {\sqrt {3} t}{2}\right )}{\sqrt {3}}+e^{-t/2} \cos \left (\frac {\sqrt {3} t}{2}\right )+1 \]
Sympy. Time used: 0.233 (sec). Leaf size: 42
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(y(t) + Derivative(y(t), t) + Derivative(y(t), (t, 2)) - 1 - exp(-t),0) 
ics = {y(0): 3, Subs(Derivative(y(t), t), t, 0): -5} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (- \frac {7 \sqrt {3} \sin {\left (\frac {\sqrt {3} t}{2} \right )}}{3} + \cos {\left (\frac {\sqrt {3} t}{2} \right )}\right ) e^{- \frac {t}{2}} + 1 + e^{- t} \]