48.2.5 problem Example 3.22

Internal problem ID [7521]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.3 SECOND ORDER ODE. Page 147
Problem number : Example 3.22
Date solved : Monday, January 27, 2025 at 03:04:22 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 26

dsolve(diff(y(x),x$2)-3*diff(y(x),x)+2*y(x)=x*exp(2*x),y(x), singsol=all)
 
\[ y = \frac {{\mathrm e}^{x} \left (\left (x^{2}+2 c_{1} -2 x +2\right ) {\mathrm e}^{x}+2 c_{2} \right )}{2} \]

Solution by Mathematica

Time used: 0.027 (sec). Leaf size: 33

DSolve[D[y[x],{x,2}]-3*D[y[x],x]+2*y[x]==x*Exp[2*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{2} e^x \left (e^x \left (x^2-2 x+2+2 c_2\right )+2 c_1\right ) \]