60.1.183 problem 186

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

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

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