61.8.10 problem 19

Internal problem ID [12091]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. subsection 1.2.5-2
Problem number : 19
Date solved : Sunday, March 30, 2025 at 10:40:41 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\begin{align*} x y^{\prime }&=a \,x^{n} \left (y+b \ln \left (x \right )\right )^{2}-b \end{align*}

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