14.6 problem Problem 32

Internal problem ID [2872]

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

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

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

Solution by Maple

Time used: 3.703 (sec). Leaf size: 61

dsolve([diff(y(t),t)-3*y(t)=piecewise(0<=t and t<Pi/2,sin(t),t>=Pi/2,1),y(0) = 2],y(t), singsol=all)
 

\[ y \left (t \right ) = \frac {\left (\left \{\begin {array}{cc} 21 \,{\mathrm e}^{3 t}-\cos \left (t \right )-3 \sin \left (t \right ) & t <\frac {\pi }{2} \\ -\frac {19}{3}+21 \,{\mathrm e}^{\frac {3 \pi }{2}} & t =\frac {\pi }{2} \\ 21 \,{\mathrm e}^{3 t}+\frac {{\mathrm e}^{3 t -\frac {3 \pi }{2}}}{3}-\frac {10}{3} & \frac {\pi }{2}<t \end {array}\right .\right )}{10} \]

Solution by Mathematica

Time used: 0.1 (sec). Leaf size: 68

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

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 2 e^{3 t} & t\leq 0 \\ \frac {1}{30} \left (-10+63 e^{3 t}+e^{3 t-\frac {3 \pi }{2}}\right ) & 2 t>\pi \\ \frac {1}{10} \left (-\cos (t)+21 e^{3 t}-3 \sin (t)\right ) & \text {True} \\ \end {array} \\ \end {array} \]