23.3.77 problem 79

Internal problem ID [5791]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 79
Date solved : Tuesday, September 30, 2025 at 02:03:25 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 2 y-3 y^{\prime }+y^{\prime \prime }&={\mathrm e}^{a x} x \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 60
ode:=2*y(x)-3*diff(y(x),x)+diff(diff(y(x),x),x) = exp(a*x)*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (a^{2} x +\left (-3 x -2\right ) a +2 x +3\right ) {\mathrm e}^{a x}+\left (a -1\right )^{2} \left (a -2\right )^{2} \left ({\mathrm e}^{2 x} c_1 +{\mathrm e}^{x} c_2 \right )}{\left (a -1\right )^{2} \left (a -2\right )^{2}} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 54
ode=2*y[x] - 3*D[y[x],x] + D[y[x],{x,2}] == E^(a*x)*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{a x} \left (a^2 x-a (3 x+2)+2 x+3\right )}{\left (a^2-3 a+2\right )^2}+c_1 e^x+c_2 e^{2 x} \end{align*}
Sympy. Time used: 0.188 (sec). Leaf size: 82
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-x*exp(a*x) + 2*y(x) - 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x} + C_{2} e^{2 x} - \frac {2 a e^{a x}}{a^{4} - 6 a^{3} + 13 a^{2} - 12 a + 4} + \frac {x e^{a x}}{a^{2} - 3 a + 2} + \frac {3 e^{a x}}{a^{4} - 6 a^{3} + 13 a^{2} - 12 a + 4} \]