19.8 problem 34

Internal problem ID [13230]

Book: DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section: Chapter 6. Laplace transform. Section 6.3 page 600
Problem number: 34.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 7.829 (sec). Leaf size: 83

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

\[ y \left (t \right ) = 2 \cos \left (\sqrt {3}\, t \right )-\frac {\sqrt {3}\, \sin \left (\sqrt {3}\, t \right )}{9}+\frac {\left (\left \{\begin {array}{cc} t & t <1 \\ 1+\frac {\sqrt {3}\, \sin \left (\sqrt {3}\, \left (t -1\right )\right )}{3} & 1\le t \end {array}\right .\right )}{3} \]

Solution by Mathematica

Time used: 0.079 (sec). Leaf size: 108

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

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 2 \cos \left (\sqrt {3} t\right ) & t\leq 0 \\ \frac {1}{9} \left (3 t+18 \cos \left (\sqrt {3} t\right )-\sqrt {3} \sin \left (\sqrt {3} t\right )\right ) & 0<t\leq 1 \\ \frac {1}{9} \left (18 \cos \left (\sqrt {3} t\right )+\sqrt {3} \sin \left (\sqrt {3} (t-1)\right )-\sqrt {3} \sin \left (\sqrt {3} t\right )+3\right ) & \text {True} \\ \end {array} \\ \end {array} \]