90.27.5 problem 5

Internal problem ID [25415]
Book : Ordinary Differential Equations. By William Adkins and Mark G Davidson. Springer. NY. 2010. ISBN 978-1-4614-3617-1
Section : Chapter 6. Discontinuous Functions and the Laplace Transform. Exercises at page 425
Problem number : 5
Date solved : Saturday, October 04, 2025 at 04:13:56 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }-4 y&=\left \{\begin {array}{cc} 12 \,{\mathrm e}^{t} & 0\le t <1 \\ 12 \,{\mathrm e} & 1\le t \end {array}\right . \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.079 (sec). Leaf size: 53
ode:=diff(y(t),t)-4*y(t) = piecewise(t < 1 and 0 <= t,12*exp(t),1 <= t,12*exp(1)); 
ic:=[y(0) = 2]; 
dsolve([ode,op(ic)],y(t),method='laplace');
 
\[ y = \left \{\begin {array}{cc} 6 \,{\mathrm e}^{4 t}-4 \,{\mathrm e}^{t} & t <1 \\ 6 \,{\mathrm e}^{4}-7 \,{\mathrm e} & t =1 \\ 6 \,{\mathrm e}^{4 t}-{\mathrm e}^{-3+4 t}-3 \,{\mathrm e} & 1<t \end {array}\right . \]
Mathematica. Time used: 0.063 (sec). Leaf size: 58
ode=D[y[t],{t,1}]-4*y[t]==Piecewise[{ {12*Exp[t], 0<=t<1}, {12*Exp[1],t>=1} }]; 
ic={y[0]==2}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \begin {array}{cc} \{ & \begin {array}{cc} 2 e^{4 t} & t\leq 0 \\ -4 e^t+6 e^{4 t} & 0<t\leq 1 \\ -3 e+6 e^{4 t}-e^{4 t-3} & \text {True} \\ \end {array} \\ \end {array} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-Piecewise((12*exp(t), (t >= 0) & (t < 1)), (12*E, t >= 1)) - 4*y(t) + Derivative(y(t), t),0) 
ics = {y(0): 2} 
dsolve(ode,func=y(t),ics=ics)