73.21.8 problem 30.10 (c)

Internal problem ID [15627]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 30. Piecewise-defined functions and periodic functions. Additional Exercises. page 553
Problem number : 30.10 (c)
Date solved : Tuesday, January 28, 2025 at 08:03:19 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 13.490 (sec). Leaf size: 40

dsolve([diff(y(t),t$2)+9*y(t)=piecewise(t<1,0,1<t and t<3,1,t>3,0),y(0) = 0, D(y)(0) = 0],y(t), singsol=all)
 
\[ y = -\frac {\left (\left \{\begin {array}{cc} 0 & t <1 \\ -1+\cos \left (3 t -3\right ) & t <3 \\ \cos \left (3 t -3\right )-\cos \left (3 t -9\right ) & 3\le t \end {array}\right .\right )}{9} \]

Solution by Mathematica

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

DSolve[{D[y[t],{t,2}]+9*y[t]==Piecewise[{ {0,t<1},{1,1<t<3},{0,t>3}}],{y[0]==0,Derivative[1][y][0] ==0}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} \frac {2}{9} \sin ^2\left (\frac {3}{2}-\frac {3 t}{2}\right ) & 1<t\leq 3 \\ -\frac {2}{9} \sin (3) \sin (6-3 t) & t>3 \\ \end {array} \\ \end {array} \]