82.4.16 problem 28-16

Internal problem ID [21834]
Book : The Differential Equations Problem Solver. VOL. II. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 28. Laplace transforms. Page 850
Problem number : 28-16
Date solved : Thursday, October 02, 2025 at 08:02:41 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-3 y^{\prime }+2 y&=\left \{\begin {array}{cc} 0 & t <6 \\ 1 & 6\le t \end {array}\right . \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=0 \\ y^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.048 (sec). Leaf size: 22
ode:=diff(diff(y(t),t),t)-3*diff(y(t),t)+2*y(t) = piecewise(t < 6,0,6 <= t,1); 
ic:=[y(0) = 0, D(y)(0) = 0]; 
dsolve([ode,op(ic)],y(t),method='laplace');
 
\[ y = \left \{\begin {array}{cc} 0 & t <6 \\ \frac {\left ({\mathrm e}^{t -6}-1\right )^{2}}{2} & 6\le t \end {array}\right . \]
Mathematica. Time used: 0.016 (sec). Leaf size: 30
ode=D[y[t],{t,2}]-3*D[y[t],t]+2*y[t]==Piecewise[{{0,t<6},{1,t>=6}}]; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \begin {array}{cc} \{ & \begin {array}{cc} 0 & t\leq 6 \\ \frac {\left (e^6-e^t\right )^2}{2 e^{12}} & \text {True} \\ \end {array} \\ \end {array} \end{align*}
Sympy. Time used: 0.800 (sec). Leaf size: 5
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-Piecewise((0, t < 6), (1, True)) + 2*y(t) - 3*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \begin {cases} 0 & \text {for}\: t < 6 \\\text {NaN} & \text {otherwise} \end {cases} \]