21.4 problem 18

Internal problem ID [14912]

Book: INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section: Chapter 5. Applications of Higher Order Equations. Exercises 5.3, page 249
Problem number: 18.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

Time used: 2.516 (sec). Leaf size: 180

dsolve([diff(x(t),t$2)+4*diff(x(t),t)+13*x(t)=piecewise(0<=t and t<Pi,1,t>=Pi and t<2*Pi,1-t,t>=2*Pi,0),x(0) = 0, D(x)(0) = 0],x(t), singsol=all)
 

\[ x \left (t \right ) = -\frac {\left (\left \{\begin {array}{cc} 0 & t <0 \\ -3+\left (3 \cos \left (3 t \right )+2 \sin \left (3 t \right )\right ) {\mathrm e}^{-2 t} & t <\pi \\ \frac {\left (\left (39 \pi -12\right ) \cos \left (3 t \right )+\sin \left (3 t \right ) \left (26 \pi +5\right )\right ) {\mathrm e}^{-2 t +2 \pi }}{13}+3 \,{\mathrm e}^{-2 t} \cos \left (3 t \right )+2 \,{\mathrm e}^{-2 t} \sin \left (3 t \right )+3 t -\frac {51}{13} & t <2 \pi \\ \frac {\left (\left (78 \pi -51\right ) \cos \left (3 t \right )+\sin \left (3 t \right ) \left (52 \pi -21\right )\right ) {\mathrm e}^{4 \pi -2 t}}{13}+\frac {\left (\left (39 \pi -12\right ) \cos \left (3 t \right )+\sin \left (3 t \right ) \left (26 \pi +5\right )\right ) {\mathrm e}^{-2 t +2 \pi }}{13}+3 \,{\mathrm e}^{-2 t} \left (\cos \left (3 t \right )+\frac {2 \sin \left (3 t \right )}{3}\right ) & 2 \pi \le t \end {array}\right .\right )}{39} \]

Solution by Mathematica

Time used: 0.042 (sec). Leaf size: 60

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

\[ x(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 0 & t\leq 0 \\ 1-\cos (t) & 0<t\leq \pi \\ -t-(1+\pi ) \cos (t)-\sin (t)+1 & \pi <t\leq 2 \pi \\ -3 \pi \cos (t)-2 \sin (t) & \text {True} \\ \end {array} \\ \end {array} \]