89.33.21 problem 23

Internal problem ID [25005]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 17. Special Equations of order Two. Exercises at page 251
Problem number : 23
Date solved : Thursday, October 02, 2025 at 11:46:46 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} -x^{2} y^{\prime }+x^{3} y^{\prime \prime }&=-x^{2}+3 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=x^3*diff(diff(y(x),x),x)-x^2*diff(y(x),x) = -x^2+3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \,x^{2}}{2}+\frac {1}{x}+x +c_2 \]
Mathematica. Time used: 0.024 (sec). Leaf size: 21
ode=x^3*D[y[x],{x,2}]-x^2*D[y[x],x]==3-x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {c_1 x^2}{2}+x+\frac {1}{x}+c_2 \end{align*}
Sympy. Time used: 0.192 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**3*Derivative(y(x), (x, 2)) - x**2*Derivative(y(x), x) + x**2 - 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} x^{2} + x + \frac {1}{x} \]