14.18.9 problem 9

Internal problem ID [2693]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.11, Differential equations with discontinuous right-hand sides. Excercises page 243
Problem number : 9
Date solved : Monday, January 27, 2025 at 06:09:28 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+y&=\left \{\begin {array}{cc} 0 & 0\le t <1 \\ t & 1\le t <2 \\ 0 & 2\le t \end {array}\right . \end{align*}

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 1.398 (sec). Leaf size: 80

dsolve([diff(y(t),t$2)-2*diff(y(t),t)+y(t)=piecewise(0<=t and t<1,0,t>=1 and t<2,t,t>=2,0 ),y(0) = 0, D(y)(0) = 1],y(t), singsol=all)
 
\[ y = \left \{\begin {array}{cc} t \,{\mathrm e}^{t} & t <1 \\ {\mathrm e}+1 & t =1 \\ \left (2 t -5\right ) {\mathrm e}^{-1+t}+t \,{\mathrm e}^{t}+t +2 & t <2 \\ -{\mathrm e}+2+2 \,{\mathrm e}^{2} & t =2 \\ \left (2 t -5\right ) {\mathrm e}^{-1+t}+\left (-3 t +10\right ) {\mathrm e}^{t -2}+t \,{\mathrm e}^{t} & 2<t \end {array}\right . \]

Solution by Mathematica

Time used: 0.045 (sec). Leaf size: 62

DSolve[{D[y[t],{t,2}]-2*D[y[t],t]+y[t]==Piecewise[{{0,0<=t<1},{t,1<=t<2},{0,t>=2}}],{y[0]==0,Derivative[1][y][0] ==1}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} e^t t & t\leq 1 \\ e^{t-2} \left (e^2 t-3 t+e (2 t-5)+10\right ) & t>2 \\ e^t t+t+e^{t-1} (2 t-5)+2 & \text {True} \\ \end {array} \\ \end {array} \]