4.26.3 \(y''(x)-3 y'(x)+2 y(x)=x e^{a x}\)

ODE
\[ y''(x)-3 y'(x)+2 y(x)=x e^{a x} \] ODE Classification

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

Mathematica
cpu = 0.20426 (sec), leaf count = 75

\[\left \{\left \{y(x)\to \frac {e^x \left (e^{(a-1) x} \left (a^2 x-a (3 x+2)+2 x+3\right )+\left (a^2-3 a+2\right )^2 c_2 e^x+\left (a^2-3 a+2\right )^2 c_1\right )}{(a-2)^2 (a-1)^2}\right \}\right \}\]

Maple
cpu = 0.173 (sec), leaf count = 94

\[\left [y \left (x \right ) = \left (\textit {\_C1} \,{\mathrm e}^{x}+\frac {\frac {a \left (\left (a -1\right ) x \,{\mathrm e}^{\left (a -1\right ) x}-{\mathrm e}^{\left (a -1\right ) x}\right )}{\left (a -1\right )^{2}}-\frac {{\mathrm e}^{a x -x}}{a -1}-\frac {2 \left (\left (a -1\right ) x \,{\mathrm e}^{\left (a -1\right ) x}-{\mathrm e}^{\left (a -1\right ) x}\right )}{\left (a -1\right )^{2}}}{a^{2}-4 a +4}+\textit {\_C2} \right ) {\mathrm e}^{x}\right ]\] Mathematica raw input

DSolve[2*y[x] - 3*y'[x] + y''[x] == E^(a*x)*x,y[x],x]

Mathematica raw output

{{y[x] -> (E^x*(E^((-1 + a)*x)*(3 + 2*x + a^2*x - a*(2 + 3*x)) + (2 - 3*a + a^2)
^2*C[1] + (2 - 3*a + a^2)^2*E^x*C[2]))/((-2 + a)^2*(-1 + a)^2)}}

Maple raw input

dsolve(diff(diff(y(x),x),x)-3*diff(y(x),x)+2*y(x) = x*exp(a*x), y(x))

Maple raw output

[y(x) = (_C1*exp(x)+1/(a^2-4*a+4)*(a/(a-1)^2*((a-1)*x*exp((a-1)*x)-exp((a-1)*x))
-exp(a*x-x)/(a-1)-2/(a-1)^2*((a-1)*x*exp((a-1)*x)-exp((a-1)*x)))+_C2)*exp(x)]