Internal problem ID [12493]
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 (h).
ODE order: 2.
ODE degree: 1.
CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {y^{\prime \prime }-4 y^{\prime }+5 y=\left \{\begin {array}{cc} x & 0\le x <1 \\ 1 & 1\le x \end {array}\right .} \] With initial conditions \begin {align*} [y \left (0\right ) = 1, y^{\prime }\left (0\right ) = 0] \end {align*}
✓ Solution by Maple
Time used: 0.219 (sec). Leaf size: 87
dsolve([diff(y(x),x$2)-4*diff(y(x),x)+5*y(x)=piecewise(0<=x and x<1,x,1<=x,1),y(0) = 1, D(y)(0) = 0],y(x), singsol=all)
\[ y \left (x \right ) = \frac {\left (\left \{\begin {array}{cc} \left (21 \cos \left (x \right )-47 \sin \left (x \right )\right ) {\mathrm e}^{2 x}+5 x +4 & x <1 \\ 10+\left (21 \cos \left (1\right )-47 \sin \left (1\right )\right ) {\mathrm e}^{2} & x =1 \\ \left (4 \cos \left (x -1\right )-3 \sin \left (x -1\right )\right ) {\mathrm e}^{2 x -2}+5+\left (21 \cos \left (x \right )-47 \sin \left (x \right )\right ) {\mathrm e}^{2 x} & 1<x \end {array}\right .\right )}{25} \]
✓ Solution by Mathematica
Time used: 0.052 (sec). Leaf size: 51
DSolve[{y''[x]-4*y'[x]+5*y[x]==Piecewise[{ {x,0<=x<1},{x,x>=1}}],{y[0]==1,y'[0]==0}},y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \begin {array}{cc} \{ & \begin {array}{cc} e^{2 x} (\cos (x)-2 \sin (x)) & x\leq 0 \\ \frac {1}{25} \left (5 x+21 e^{2 x} \cos (x)-47 e^{2 x} \sin (x)+4\right ) & \text {True} \\ \end {array} \\ \end {array} \]