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.0153091 (sec), leaf count = 75

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

Maple
cpu = 0.024 (sec), leaf count = 59

\[ \left \{ y \left ( x \right ) ={\frac {{{\rm e}^{x}} \left ( \left ( {a}^{2}x+ \left ( -3\,x-2 \right ) a+2\,x+3 \right ) {{\rm e}^{ \left ( a-1 \right ) x}}+ \left ( a-1 \right ) ^{2} \left ( a-2 \right ) ^{2} \left ( {{\rm e}^{x}}{\it \_C1}+{\it \_C2} \right ) \right ) }{ \left ( a-1 \right ) ^{2} \left ( a-2 \right ) ^{2}}} \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),'implicit')

Maple raw output

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