75.18.11 problem 600

Internal problem ID [17099]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Initial value problem. Exercises page 140
Problem number : 600
Date solved : Tuesday, January 28, 2025 at 09:52:27 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+5 y&=2 x^{2} {\mathrm e}^{x} \end{align*}

With initial conditions

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

Solution by Maple

Time used: 0.043 (sec). Leaf size: 25

dsolve([diff(y(x),x$2)-4*diff(y(x),x)+5*y(x)=2*x^2*exp(x),y(0) = 2, D(y)(0) = 3],y(x), singsol=all)
 
\[ y = \left (-2 \sin \left (x \right )+\cos \left (x \right )\right ) {\mathrm e}^{2 x}+\left (x +1\right )^{2} {\mathrm e}^{x} \]

Solution by Mathematica

Time used: 0.022 (sec). Leaf size: 28

DSolve[{D[y[x],{x,2}]-4*D[y[x],x]+5*y[x]==2*x^2*Exp[x],{y[0]==2,Derivative[1][y][0] ==3}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^x \left ((x+1)^2-2 e^x \sin (x)+e^x \cos (x)\right ) \]