11.49 problem 61

Internal problem ID [14567]

Book: INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section: Chapter 4. Higher Order Equations. Exercises 4.3, page 156
Problem number: 61.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

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

\[ y \left (t \right ) = \sin \left (2 t \right )+\left (\left \{\begin {array}{cc} 0 & t <\pi \\ \frac {5}{2}-\frac {5 \cos \left (2 t \right )}{2} & t <2 \pi \\ 0 & 2 \pi \le t \end {array}\right .\right ) \]

Solution by Mathematica

Time used: 0.037 (sec). Leaf size: 37

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

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} \sin (2 t) & t>2 \pi \lor t\leq \pi \\ -\frac {5}{2} \cos (2 t)+\sin (2 t)+\frac {5}{2} & \text {True} \\ \end {array} \\ \end {array} \]