23.1.75 problem 69

Internal problem ID [4682]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 69
Date solved : Tuesday, September 30, 2025 at 07:58:17 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=x^{n} \left (a +b y^{2}\right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 36
ode:=diff(y(x),x) = x^n*(a+b*y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tan \left (\frac {\sqrt {a b}\, \left (x^{n +1}+\left (n +1\right ) c_1 \right )}{n +1}\right ) \sqrt {a b}}{b} \]
Mathematica. Time used: 0.213 (sec). Leaf size: 75
ode=D[y[x],x]==x^n*(a + b*y[x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{b K[1]^2+a}dK[1]\&\right ]\left [\frac {x^{n+1}}{n+1}+c_1\right ]\\ y(x)&\to -\frac {i \sqrt {a}}{\sqrt {b}}\\ y(x)&\to \frac {i \sqrt {a}}{\sqrt {b}} \end{align*}
Sympy. Time used: 2.118 (sec). Leaf size: 71
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-x**n*(a + b*y(x)**2) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \frac {\sqrt {- \frac {1}{a b}} \log {\left (- a \sqrt {- \frac {1}{a b}} + y{\left (x \right )} \right )}}{2} + \frac {\sqrt {- \frac {1}{a b}} \log {\left (a \sqrt {- \frac {1}{a b}} + y{\left (x \right )} \right )}}{2} - \begin {cases} \frac {x^{n + 1}}{n + 1} & \text {for}\: n \neq -1 \\\log {\left (x \right )} & \text {otherwise} \end {cases} = C_{1} \]