7.8 problem 25

Internal problem ID [4948]

Book: ADVANCED ENGINEERING MATHEMATICS. ERWIN KREYSZIG, HERBERT KREYSZIG, EDWARD J. NORMINTON. 10th edition. John Wiley USA. 2011
Section: Chapter 6. Laplace Transforms. Problem set 6.3, page 224
Problem number: 25.
ODE order: 2.
ODE degree: 1.

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

Solve \begin {gather*} \boxed {y^{\prime \prime }+y-\left (\left \{\begin {array}{cc} t & 0<t <1 \\ 0 & 1<t \end {array}\right .\right )=0} \end {gather*} With initial conditions \begin {align*} [y \relax (0) = 0, y^{\prime }\relax (0) = 0] \end {align*}

Solution by Maple

Time used: 0.357 (sec). Leaf size: 34

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

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

Solution by Mathematica

Time used: 0.01 (sec). Leaf size: 45

DSolve[{y''[t]+y[t]==Piecewise[{{t,0<t<1},{0,t>1}}],{y[0]==0,y'[0]==0}},y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to {cc} \{ & {cc} t-\sin (t) & 0<t\leq 1 \\ (\cos (1)-\sin (1)) \cos (t)+(-1+\cos (1)+\sin (1)) \sin (t) & t>1 \\ \\ \\ \\ \\ \end{align*}