60.1.140 problem 143

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

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

Maple. Time used: 0.005 (sec). Leaf size: 40
ode:=x^2*(diff(y(x),x)+a*y(x)^2)-b = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1+\tanh \left (\frac {\sqrt {4 b a +1}\, \left (\ln \left (x \right )-c_1 \right )}{2}\right ) \sqrt {4 b a +1}}{2 x a} \]
Mathematica. Time used: 0.2 (sec). Leaf size: 77
ode=x^2*(D[y[x],x]+a*y[x]^2) - b==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {-1+\sqrt {4 a b+1} \left (-1+\frac {2 c_1}{x^{\sqrt {4 a b+1}}+c_1}\right )}{2 a x} \\ y(x)\to -\frac {\sqrt {4 a b+1}-1}{2 a x} \\ \end{align*}
Sympy. Time used: 0.238 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-b + x**2*(a*y(x)**2 + Derivative(y(x), x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- \sqrt {- 4 a b - 1} \tan {\left (C_{1} + \frac {\sqrt {- 4 a b - 1} \log {\left (x \right )}}{2} \right )} + 1}{2 a x} \]