74.11.49 problem 61

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

\begin{align*} 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 . \end{align*}

With initial conditions

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

Solution by Maple

Time used: 1.283 (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 = \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.040 (sec). Leaf size: 37

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