40.13.17 problem 38

Internal problem ID [6771]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 18. Linear equations with variable coefficients (Equations of second order). Supplemetary problems. Page 120
Problem number : 38
Date solved : Sunday, March 30, 2025 at 11:22:11 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (x^{2}+1\right ) y^{\prime \prime }-2 x y^{\prime }+2 y&=\frac {-x^{2}+1}{x} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 21
ode:=(x^2+1)*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+2*y(x) = (-x^2+1)/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,x^{2}+x \ln \left (x \right )+c_2 x -c_1 +x \]
Mathematica. Time used: 0.062 (sec). Leaf size: 27
ode=(1+x^2)*D[y[x],{x,2}]-2*x*D[y[x],x]+2*y[x]==(1-x^2)/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (\log (x)+1)-c_1 (x-i)^2+c_2 x \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*Derivative(y(x), x) + (x**2 + 1)*Derivative(y(x), (x, 2)) + 2*y(x) - (1 - x**2)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x**2*(x*Derivative(y(x), (x, 2)) + 1) + x*(2*y(x) + Derivative(y(x), (x, 2))) - 1)/(2*x**2) cannot be solved by the factorable group method