31.5.4 problem 4

Internal problem ID [5747]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 6
Problem number : 4
Date solved : Sunday, March 30, 2025 at 10:07:26 AM
CAS classification : [_rational, [_Riccati, _special]]

\begin{align*} u^{\prime }+b u^{2}&=\frac {c}{x^{4}} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 37
ode:=diff(u(x),x)+b*u(x)^2 = c/x^4; 
dsolve(ode,u(x), singsol=all);
 
\[ u = \frac {-\sqrt {-b c}\, \tan \left (\frac {\sqrt {-b c}\, \left (c_1 x -1\right )}{x}\right )+x}{b \,x^{2}} \]
Mathematica. Time used: 0.343 (sec). Leaf size: 109
ode=D[u[x],x]+b*u[x]^2==x^(-4); 
ic={}; 
DSolve[{ode,ic},u[x],x,IncludeSingularSolutions->True]
 
\begin{align*} u(x)\to \frac {-2 b c_1 e^{\frac {2 \sqrt {b}}{x}}+\sqrt {b} \left (e^2+2 c_1 x e^{\frac {2 \sqrt {b}}{x}}\right )+e^2 x}{b x^2 \left (e^2+2 \sqrt {b} c_1 e^{\frac {2 \sqrt {b}}{x}}\right )} \\ u(x)\to \frac {x-\sqrt {b}}{b x^2} \\ \end{align*}
Sympy. Time used: 9.330 (sec). Leaf size: 82
from sympy import * 
x = symbols("x") 
b = symbols("b") 
c = symbols("c") 
u = Function("u") 
ode = Eq(b*u(x)**2 - c/x**4 + Derivative(u(x), x),0) 
ics = {} 
dsolve(ode,func=u(x),ics=ics)
 
\[ C_{1} + \frac {\sqrt {\frac {1}{b^{3} c}} \log {\left (- b c \sqrt {\frac {1}{b^{3} c}} + x^{2} u{\left (x \right )} - \frac {x}{b} \right )}}{2} - \frac {\sqrt {\frac {1}{b^{3} c}} \log {\left (b c \sqrt {\frac {1}{b^{3} c}} + x^{2} u{\left (x \right )} - \frac {x}{b} \right )}}{2} - \frac {1}{b x} = 0 \]