50.11.19 problem 5(d)

Internal problem ID [8003]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Second-Order Linear Equations. Section 2.3. THE METHOD OF VARIATION OF PARAMETERS. Page 71
Problem number : 5(d)
Date solved : Monday, January 27, 2025 at 03:36:37 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x y^{\prime \prime }-\left (1+x \right ) y^{\prime }+y&=x^{2} {\mathrm e}^{2 x} \end{align*}

Solution by Maple

Time used: 0.008 (sec). Leaf size: 23

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

Solution by Mathematica

Time used: 0.058 (sec). Leaf size: 31

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