28.6.1 problem 1

Internal problem ID [7210]
Book : A treatise on ordinary and partial differential equations by William Woolsey Johnson. 1913
Section : Chapter IX, Special forms of differential equations. Examples XVII. page 247
Problem number : 1
Date solved : Tuesday, September 30, 2025 at 04:25:31 PM
CAS classification : [_rational, _Riccati]

\begin{align*} y^{\prime }+y^{2}&=\frac {a^{2}}{x^{4}} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 36
ode:=y(x)^2+diff(y(x),x) = a^2/x^4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\sqrt {-a^{2}}\, \tan \left (\frac {\sqrt {-a^{2}}\, \left (c_1 x -1\right )}{x}\right )+x}{x^{2}} \]
Mathematica. Time used: 0.246 (sec). Leaf size: 81
ode=D[y[x],x]+y[x]^2==a^2/x^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {-2 a^2 c_1 e^{\frac {2 a}{x}}+a \left (e^2+2 c_1 x e^{\frac {2 a}{x}}\right )+e^2 x}{x^2 \left (e^2+2 a c_1 e^{\frac {2 a}{x}}\right )}\\ y(x)&\to \frac {x-a}{x^2} \end{align*}
Sympy. Time used: 1.957 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a**2/x**4 + y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {a e^{\frac {2 a \left (C_{1} x - 1\right )}{x}} + a + x e^{\frac {2 a \left (C_{1} x - 1\right )}{x}} - x}{x^{2} \left (e^{\frac {2 a \left (C_{1} x - 1\right )}{x}} - 1\right )} \]