Internal problem ID [2882]
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.7. page 704
Problem number: Problem 46 part a.
ODE order: 1.
ODE degree: 1.
CAS Maple gives this as type [[_linear, `class A`]]
\[ \boxed {y^{\prime }-y=\left \{\begin {array}{cc} 2 & 0\le t <1 \\ -1 & 1\le t \end {array}\right .} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}
✓ Solution by Maple
Time used: 2.938 (sec). Leaf size: 38
dsolve([diff(y(t),t)-y(t)=piecewise(0<=t and t<1,2,t>=1,-1),y(0) = 1],y(t), singsol=all)
\[ y \left (t \right ) = \left \{\begin {array}{cc} -2+3 \,{\mathrm e}^{t} & t <1 \\ 1+3 \,{\mathrm e} & t =1 \\ 1+3 \,{\mathrm e}^{t}-3 \,{\mathrm e}^{t -1} & 1<t \end {array}\right . \]
✓ Solution by Mathematica
Time used: 0.072 (sec). Leaf size: 42
DSolve[{y'[t]-y[t]==Piecewise[{{2,0<=t<1},{-1,t>=1}}],{y[0]==1}},y[t],t,IncludeSingularSolutions -> True]
\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} e^t & t\leq 0 \\ -2+3 e^t & 0<t\leq 1 \\ 1-3 e^{t-1}+3 e^t & \text {True} \\ \end {array} \\ \end {array} \]