35.7.16 problem 19

Internal problem ID [6198]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 7. Other second-Order equations. page 435
Problem number : 19
Date solved : Wednesday, March 05, 2025 at 12:24:25 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }-5 x y^{\prime }+9 y&=2 x^{3} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 18
ode:=x^2*diff(diff(y(x),x),x)-5*x*diff(y(x),x)+9*y(x) = 2*x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{3} \left (c_{2} +c_{1} \ln \left (x \right )+\ln \left (x \right )^{2}\right ) \]
Mathematica. Time used: 0.022 (sec). Leaf size: 22
ode=x^2*D[y[x],{x,2}]-5*x*D[y[x],x]+9*y[x]==2*x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^3 \left (\log ^2(x)+3 c_2 \log (x)+c_1\right ) \]
Sympy. Time used: 0.241 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**3 + x**2*Derivative(y(x), (x, 2)) - 5*x*Derivative(y(x), x) + 9*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{3} \left (C_{1} + C_{2} \log {\left (x \right )} + \log {\left (x \right )}^{2}\right ) \]