28.1.2 problem 2

Internal problem ID [7161]
Book : A treatise on ordinary and partial differential equations by William Woolsey Johnson. 1913
Section : Chapter 1, Nature and meaning of a differential equation between two variables. page 12
Problem number : 2
Date solved : Tuesday, September 30, 2025 at 04:24:06 PM
CAS classification : [[_Emden, _Fowler], [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

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