73.21.7 problem 30.10 (b)

Internal problem ID [15626]
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 (b)
Date solved : Tuesday, January 28, 2025 at 08:03:18 AM
CAS classification : [[_2nd_order, _quadrature]]

\begin{align*} y^{\prime \prime }&=\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: 9.574 (sec). Leaf size: 27

dsolve([diff(y(t),t$2)=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 = \left \{\begin {array}{cc} 0 & t <1 \\ \frac {\left (t -1\right )^{2}}{2} & t <3 \\ 2 t -4 & 3\le t \end {array}\right . \]

Solution by Mathematica

Time used: 0.007 (sec). Leaf size: 33

DSolve[{D[y[t],{t,2}]==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} 0 & t\leq 1 \\ \frac {1}{2} (t-1)^2 & 1<t\leq 3 \\ 2 (t-2) & \text {True} \\ \end {array} \\ \end {array} \]