80.10.6 problem 29

Internal problem ID [21401]
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 : 29
Date solved : Thursday, October 02, 2025 at 07:30:49 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} x^{\prime }-x&=\operatorname {Heaviside}\left (t -a \right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.095 (sec). Leaf size: 38
ode:=diff(x(t),t)-x(t) = Heaviside(t-a); 
ic:=[x(0) = 0]; 
dsolve([ode,op(ic)],x(t),method='laplace');
 
\[ x = \left (\operatorname {Heaviside}\left (a \right )+\operatorname {Heaviside}\left (t -a \right )-1\right ) {\mathrm e}^{t -a}-{\mathrm e}^{t} \operatorname {Heaviside}\left (a \right )+{\mathrm e}^{t}-\operatorname {Heaviside}\left (t -a \right ) \]
Mathematica. Time used: 0.028 (sec). Leaf size: 42
ode=D[x[t],t]-x[t]==UnitStep[t-a]; 
ic={x[0] ==0}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to e^{-a} \left (\left (e^a-1\right ) e^t \theta (-a)-\left (e^a-e^t\right ) \theta (t-a)\right ) \end{align*}
Sympy. Time used: 0.281 (sec). Leaf size: 41
from sympy import * 
t = symbols("t") 
a = symbols("a") 
x = Function("x") 
ode = Eq(-x(t) - Heaviside(-a + t) + Derivative(x(t), t),0) 
ics = {x(0): 0} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (\theta \left (- a\right ) - e^{- a} \theta \left (- a\right )\right ) e^{t} + e^{- a + t} \theta \left (- a + t\right ) - \theta \left (- a + t\right ) \]