60.1.108 problem 110

Internal problem ID [10122]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 110
Date solved : Sunday, March 30, 2025 at 03:17:10 PM
CAS classification : [[_homogeneous, `class D`], _Riccati]

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

Maple. Time used: 0.011 (sec). Leaf size: 13
ode:=x*diff(y(x),x)+f(x)*(y(x)^2-x^2)-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tanh \left (\int f \left (x \right )d x +c_1 \right ) x \]
Mathematica. Time used: 0.108 (sec). Leaf size: 44
ode=x*D[y[x],x] + f[x]*(y[x]^2-x^2)-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{(K[1]-1) (K[1]+1)}dK[1]=\int _1^x-f(K[2])dK[2]+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + (-x**2 + y(x)**2)*f(x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x**2*f(x) - f(x)*y(x)**2 + y(x))/x cannot be solved by the factorable group method