14.5 problem Problem 31

Internal problem ID [2362]

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 31.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [[_linear, class A]]

Solve \begin {gather*} \boxed {y^{\prime }+3 y-\left (\left \{\begin {array}{cc} 1 & 0\le t <1 \\ 0 & 1\le t \end {array}\right .\right )=0} \end {gather*} With initial conditions \begin {align*} [y \relax (0) = 1] \end {align*}

Solution by Maple

Time used: 0.156 (sec). Leaf size: 41

dsolve([diff(y(t),t)+3*y(t)=piecewise(0<=t and t<1,1,t>=1,0),y(0) = 1],y(t), singsol=all)
 

\[ y \relax (t ) = \left \{\begin {array}{cc} {\mathrm e}^{-3 t} & t <0 \\ \frac {2 \,{\mathrm e}^{-3 t}}{3}+\frac {1}{3} & t <1 \\ \frac {2 \,{\mathrm e}^{-3 t}}{3}+\frac {{\mathrm e}^{-3 t +3}}{3} & 1\le t \end {array}\right . \]

Solution by Mathematica

Time used: 0.075 (sec). Leaf size: 47

DSolve[{y'[t]+3*y[t]==Piecewise[{{1,0<=t<1},{0,t >= 1}}],{y[0]==1}},y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to {cc} \{ & {cc} e^{-3 t} & t\leq 0 \\ \frac {1}{3} e^{-3 t} \left (2+e^3\right ) & t>1 \\ \frac {1}{3}+\frac {2 e^{-3 t}}{3} & \text {True} \\ \\ \\ \\ \\ \end{align*}