20.22.6 problem Problem 32

Internal problem ID [3961]
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
Date solved : Monday, January 27, 2025 at 08:05:03 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} 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 . \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=2 \end{align*}

Solution by Maple

Time used: 4.657 (sec). Leaf size: 63

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 = \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.105 (sec). Leaf size: 68

DSolve[{D[y[t],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} \]