23.3.65 problem 67

Internal problem ID [5779]
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 : 67
Date solved : Tuesday, September 30, 2025 at 02:02:58 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y-2 y^{\prime }+y^{\prime \prime }&=8 \,{\mathrm e}^{3 x} x^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 30
ode:=y(x)-2*diff(y(x),x)+diff(diff(y(x),x),x) = 8*exp(3*x)*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (2 x^{2}-4 x +3\right ) {\mathrm e}^{2 x}+{\mathrm e}^{x} \left (c_1 x +c_2 \right ) \]
Mathematica. Time used: 0.011 (sec). Leaf size: 32
ode=y[x] - 2*D[y[x],x] + D[y[x],{x,2}] == 8*E^(3*x)*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (e^{2 x} \left (2 x^2-4 x+3\right )+c_2 x+c_1\right ) \end{align*}
Sympy. Time used: 0.168 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-8*x**2*exp(3*x) + y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} - 4 e^{2 x}\right ) + \left (2 x^{2} + 3\right ) e^{2 x}\right ) e^{x} \]