80.10.8 problem 31

Internal problem ID [21403]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 11. Laplace transform. Excercise 11.7 at page 248
Problem number : 31
Date solved : Thursday, October 02, 2025 at 07:30:51 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} x^{\prime }-x&=k \delta \left (t \right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=a \\ \end{align*}
Maple. Time used: 0.030 (sec). Leaf size: 10
ode:=diff(x(t),t)-x(t) = k*Dirac(t); 
ic:=[x(0) = a]; 
dsolve([ode,op(ic)],x(t),method='laplace');
 
\[ x = \left (a +k \right ) {\mathrm e}^{t} \]
Mathematica. Time used: 0.023 (sec). Leaf size: 20
ode=D[x[t],t]-x[t]==k*DiracDelta[t]; 
ic={x[0] ==a}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to e^t (a+k \theta (t)-\theta (0) k) \end{align*}
Sympy. Time used: 0.485 (sec). Leaf size: 39
from sympy import * 
t = symbols("t") 
a = symbols("a") 
k = symbols("k") 
x = Function("x") 
ode = Eq(-k*Dirac(t) - x(t) + Derivative(x(t), t),0) 
ics = {x(0): a} 
dsolve(ode,func=x(t),ics=ics)
 
\[ - k \int \operatorname {Dirac}{\left (t \right )} e^{- t}\, dt - \int x{\left (t \right )} e^{- t}\, dt = - k \int \limits ^{0} \operatorname {Dirac}{\left (t \right )} e^{- t}\, dt - \int \limits ^{0} x{\left (t \right )} e^{- t}\, dt \]