20.23.1 problem Problem 1

Internal problem ID [3973]
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.8. page 710
Problem number : Problem 1
Date solved : Tuesday, March 04, 2025 at 05:21:52 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+y&=\delta \left (t -5\right ) \end{align*}

Using Laplace method With initial conditions

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

Maple. Time used: 3.096 (sec). Leaf size: 22
ode:=diff(y(t),t)+y(t) = Dirac(t-5); 
ic:=y(0) = 3; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = \operatorname {Heaviside}\left (t -5\right ) {\mathrm e}^{-t +5}+3 \,{\mathrm e}^{-t} \]
Mathematica. Time used: 0.032 (sec). Leaf size: 21
ode=D[y[t],t]+y[t]==DiracDelta[t-5]; 
ic={y[0]==3}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-t} \left (e^5 \theta (t-5)+3\right ) \]
Sympy. Time used: 0.613 (sec). Leaf size: 36
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-Dirac(t - 5) + y(t) + Derivative(y(t), t),0) 
ics = {y(0): 3} 
dsolve(ode,func=y(t),ics=ics)
 
\[ - \int \operatorname {Dirac}{\left (t - 5 \right )} e^{t}\, dt + \int y{\left (t \right )} e^{t}\, dt = - \int \limits ^{0} \operatorname {Dirac}{\left (t - 5 \right )} e^{t}\, dt + \int \limits ^{0} y{\left (t \right )} e^{t}\, dt \]