4.15.24 \(f(x) y(x)^m y'(x)+g(x) y(x)^{m+1}+h(x) y(x)^n=0\)

ODE
\[ f(x) y(x)^m y'(x)+g(x) y(x)^{m+1}+h(x) y(x)^n=0 \] ODE Classification

[_Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 1.04416 (sec), leaf count = 93

\[\left \{\left \{y(x)\to \left (\exp \left ((m-n+1) \int _1^x -\frac {g(K[1])}{f(K[1])} \, dK[1]\right ) \left ((m-n+1) \int _1^x -\frac {h(K[2]) \exp \left (-(m-n+1) \int _1^{K[2]} -\frac {g(K[1])}{f(K[1])} \, dK[1]\right )}{f(K[2])} \, dK[2]+c_1\right )\right ){}^{\frac {1}{m-n+1}}\right \}\right \}\]

Maple
cpu = 0.035 (sec), leaf count = 70

\[ \left \{ \left (y \relax (x ) \right ) ^{m-n+1}+{1 \left (-\int \!-{\frac {h \relax (x ) \left (m-n+1 \right ) }{f \relax (x ) }{{\rm e}^{\int \!{\frac {g \relax (x ) \left (m-n+1 \right ) }{f \relax (x ) }}\,{\rm d}x}}}\,{\rm d}x-{\it \_C1} \right ) \left ({{\rm e}^{\int \!{\frac {g \relax (x ) \left (m-n+1 \right ) }{f \relax (x ) }}\,{\rm d}x}} \right ) ^{-1}}=0 \right \} \] Mathematica raw input

DSolve[g[x]*y[x]^(1 + m) + h[x]*y[x]^n + f[x]*y[x]^m*y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> (E^((1 + m - n)*Integrate[-(g[K[1]]/f[K[1]]), {K[1], 1, x}])*(C[1] + (
1 + m - n)*Integrate[-(h[K[2]]/(E^((1 + m - n)*Integrate[-(g[K[1]]/f[K[1]]), {K[
1], 1, K[2]}])*f[K[2]])), {K[2], 1, x}]))^(1 + m - n)^(-1)}}

Maple raw input

dsolve(f(x)*y(x)^m*diff(y(x),x)+g(x)*y(x)^(m+1)+h(x)*y(x)^n = 0, y(x),'implicit')

Maple raw output

y(x)^(m-n+1)+(-Int(-exp(Int(1/f(x)*g(x)*(m-n+1),x))*h(x)/f(x)*(m-n+1),x)-_C1)/ex
p(Int(1/f(x)*g(x)*(m-n+1),x)) = 0