72.19.8 problem 34

Internal problem ID [14966]
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
Date solved : Tuesday, January 28, 2025 at 07:25:45 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y&=\left \{\begin {array}{cc} t & 0\le t <1 \\ 1 & 1\le t \end {array}\right . \end{align*}

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 14.878 (sec). Leaf size: 49

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 = 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.050 (sec). Leaf size: 108

DSolve[{D[y[t],{t,2}]+3*y[t]==Piecewise[{{t,0<=t<1},{1,t>=1}}],{y[0]==2,Derivative[1][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} \]