23.3.95 problem 97

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

\begin{align*} 20 y-9 y^{\prime }+y^{\prime \prime }&={\mathrm e}^{3 x} x^{2} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 32
ode:=20*y(x)-9*diff(y(x),x)+diff(diff(y(x),x),x) = exp(3*x)*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{3 x} \left (4 c_1 \,{\mathrm e}^{2 x}+4 \,{\mathrm e}^{x} c_2 +2 x^{2}+6 x +7\right )}{4} \]
Mathematica. Time used: 0.012 (sec). Leaf size: 40
ode=20*y[x] - 9*D[y[x],x] + D[y[x],{x,2}] == E^(3*x)*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} e^{3 x} \left (2 x^2+6 x+4 c_1 e^x+4 c_2 e^{2 x}+7\right ) \end{align*}
Sympy. Time used: 0.179 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(3*x) + 20*y(x) - 9*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} e^{x} + C_{2} e^{2 x} + \frac {x^{2}}{2} + \frac {3 x}{2} + \frac {7}{4}\right ) e^{3 x} \]