Internal problem ID [12810]
Book: Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section: Chapter 5. The Laplace Transform Method. Exercises 5.4, page 265
Problem number: 4 (d).
ODE order: 2.
ODE degree: 1.
CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {y^{\prime \prime }-2 y^{\prime }+y=\left \{\begin {array}{cc} 0 & 0\le x <1 \\ x^{2}-2 x +3 & 1\le x \end {array}\right .} \] With initial conditions \begin {align*} [y \left (0\right ) = 0, y^{\prime }\left (0\right ) = 1] \end {align*}
✓ Solution by Maple
Time used: 7.61 (sec). Leaf size: 43
dsolve([diff(y(x),x$2)-2*diff(y(x),x)+y(x)=piecewise(0<=x and x<1,0,1<=x,x^2-2*x+3),y(0) = 0, D(y)(0) = 1],y(x), singsol=all)
\[ y \left (x \right ) = \left \{\begin {array}{cc} {\mathrm e}^{x} x & x <1 \\ {\mathrm e}+8 & x =1 \\ {\mathrm e}^{x} x +5+4 \left (-3+x \right ) {\mathrm e}^{-1+x}+x^{2}+2 x & 1<x \end {array}\right . \]
✓ Solution by Mathematica
Time used: 0.044 (sec). Leaf size: 39
DSolve[{y''[x]-2*y'[x]+y[x]==Piecewise[{ {0,0<=x<1},{x^2-2*x+3,x>=1}}],{y[0]==0,y'[0]==1}},y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \begin {array}{cc} \{ & \begin {array}{cc} e^x x & x\leq 1 \\ x^2+e^x x+2 x+4 e^{x-1} (x-3)+5 & \text {True} \\ \end {array} \\ \end {array} \]