62.11.4 problem Ex 4

Internal problem ID [12775]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 18. Transformation of variables. Page 26
Problem number : Ex 4
Date solved : Monday, March 31, 2025 at 07:04:28 AM
CAS classification : [_rational, _Riccati]

\begin{align*} x y^{\prime }-a y+b y^{2}&=c \,x^{2 a} \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 34
ode:=x*diff(y(x),x)-a*y(x)+b*y(x)^2 = c*x^(2*a); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sqrt {c}\, x^{a} \tanh \left (\frac {\sqrt {b}\, x^{a} \sqrt {c}+i c_1 a}{a}\right )}{\sqrt {b}} \]
Mathematica. Time used: 0.318 (sec). Leaf size: 153
ode=x*D[y[x],x]-a*y[x]+b*y[x]^2==c*x^(2*a); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\sqrt {c} x^a \left (-\cos \left (\frac {\sqrt {-b} \sqrt {c} x^a}{a}\right )+c_1 \sin \left (\frac {\sqrt {-b} \sqrt {c} x^a}{a}\right )\right )}{\sqrt {-b} \left (\sin \left (\frac {\sqrt {-b} \sqrt {c} x^a}{a}\right )+c_1 \cos \left (\frac {\sqrt {-b} \sqrt {c} x^a}{a}\right )\right )} \\ y(x)\to \frac {\sqrt {c} x^a \tan \left (\frac {\sqrt {-b} \sqrt {c} x^a}{a}\right )}{\sqrt {-b}} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-a*y(x) + b*y(x)**2 - c*x**(2*a) + x*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*y(x) - b*y(x)**2 + c*x**(2*a))/x cannot be solved by the factorable group method