ODE
\[ x^{2 n} y'(x)=-n x^{n-1}+x^n y(x) \left (x^{2 n} y(x)^2-3 x^n y(x)+1\right )+1 \] ODE Classification
[_Abel]
Book solution method
Abel ODE, First kind
Mathematica ✓
cpu = 0.250927 (sec), leaf count = 254
\[\left \{\left \{y(x)\to x^{-n}-\frac {e^{\frac {2 x^{1-n}}{n-1}}}{\sqrt {c_1-\frac {2 x \left (\frac {4^{\frac {n+1}{n-1}} x \left (\frac {x^{1-n}}{1-n}\right )^{\frac {2}{n-1}} \Gamma \left (-\frac {2}{n-1},-\frac {4 x^{1-n}}{n-1}\right )}{n-1}+e^{\frac {4 x^{1-n}}{n-1}} x^n\right )}{n+1}}}\right \},\left \{y(x)\to \frac {e^{\frac {2 x^{1-n}}{n-1}}}{\sqrt {c_1-\frac {2 x \left (\frac {4^{\frac {n+1}{n-1}} x \left (\frac {x^{1-n}}{1-n}\right )^{\frac {2}{n-1}} \Gamma \left (-\frac {2}{n-1},-\frac {4 x^{1-n}}{n-1}\right )}{n-1}+e^{\frac {4 x^{1-n}}{n-1}} x^n\right )}{n+1}}}+x^{-n}\right \}\right \}\]
Maple ✓
cpu = 0.095 (sec), leaf count = 962
\[ \left \{ y \left ( x \right ) -{1{{\rm e}^{2\,{\frac {x}{ \left ( n-1 \right ) {x}^{n}}}}}{\frac {1}{\sqrt {{\it \_C1}-2\,{\frac {1}{1-n}{2}^{-2\,{\frac {n}{1-n}}-2\, \left ( 1-n \right ) ^{-1}} \left ( \left ( 1-n \right ) ^{-1} \right ) ^{-{\frac {n}{1-n}}- \left ( 1-n \right ) ^{-1}} \left ( -{\frac { \left ( n-1 \right ) \left ( 1-n \right ) }{ \left ( n+1 \right ) \left ( n-3 \right ) }{2}^{-3+2\,{\frac {n}{1-n}}+2\, \left ( 1-n \right ) ^{-1}+2\, \left ( n-1 \right ) ^{-1}}{x}^{-{\frac {{n}^{2}}{1-n}}+ \left ( 1-n \right ) ^{-1}-1+n} \left ( \left ( 1-n \right ) ^{-1} \right ) ^{{\frac {n}{1-n}}+ \left ( 1-n \right ) ^{-1}} \left ( -4\,{\frac {{x}^{1-n}{n}^{2}}{1-n}}+8\,{\frac {{x}^{1-n}n}{1-n}}-4\,{\frac {{x}^{1-n}}{1-n}}+2\,n-2 \right ) \left ( {\frac {{x}^{1-n}}{1-n}} \right ) ^{ \left ( n-1 \right ) ^{-1}}{{\rm e}^{2\,{\frac {{x}^{1-n}}{n-1}}}}{{\sl M}_{-{\frac {n}{n-1}},\,- \left ( n-1 \right ) ^{-1}+1/2}\left (-4\,{\frac {{x}^{1-n}}{n-1}}\right )}}+{\frac { \left ( n-1 \right ) \left ( 1-n \right ) }{ \left ( n+1 \right ) \left ( n-3 \right ) }{2}^{-1+2\,{\frac {n}{1-n}}+2\, \left ( 1-n \right ) ^{-1}+2\, \left ( n-1 \right ) ^{-1}}{x}^{-{\frac {{n}^{2}}{1-n}}+ \left ( 1-n \right ) ^{-1}-1+n} \left ( \left ( 1-n \right ) ^{-1} \right ) ^{{\frac {n}{1-n}}+ \left ( 1-n \right ) ^{-1}} \left ( {\frac {{x}^{1-n}}{1-n}} \right ) ^{ \left ( n-1 \right ) ^{-1}}{{\rm e}^{2\,{\frac {{x}^{1-n}}{n-1}}}}{{\sl M}_{- \left ( n-1 \right ) ^{-1},\,- \left ( n-1 \right ) ^{-1}+1/2}\left (-4\,{\frac {{x}^{1-n}}{n-1}}\right )}} \right ) }}}}}- \left ( {x}^{n} \right ) ^{-1}=0,y \left ( x \right ) +{1{{\rm e}^{2\,{\frac {x}{ \left ( n-1 \right ) {x}^{n}}}}}{\frac {1}{\sqrt {{\it \_C1}-2\,{\frac {1}{1-n}{2}^{-2\,{\frac {n}{1-n}}-2\, \left ( 1-n \right ) ^{-1}} \left ( \left ( 1-n \right ) ^{-1} \right ) ^{-{\frac {n}{1-n}}- \left ( 1-n \right ) ^{-1}} \left ( -{\frac { \left ( n-1 \right ) \left ( 1-n \right ) }{ \left ( n+1 \right ) \left ( n-3 \right ) }{2}^{-3+2\,{\frac {n}{1-n}}+2\, \left ( 1-n \right ) ^{-1}+2\, \left ( n-1 \right ) ^{-1}}{x}^{-{\frac {{n}^{2}}{1-n}}+ \left ( 1-n \right ) ^{-1}-1+n} \left ( \left ( 1-n \right ) ^{-1} \right ) ^{{\frac {n}{1-n}}+ \left ( 1-n \right ) ^{-1}} \left ( -4\,{\frac {{x}^{1-n}{n}^{2}}{1-n}}+8\,{\frac {{x}^{1-n}n}{1-n}}-4\,{\frac {{x}^{1-n}}{1-n}}+2\,n-2 \right ) \left ( {\frac {{x}^{1-n}}{1-n}} \right ) ^{ \left ( n-1 \right ) ^{-1}}{{\rm e}^{2\,{\frac {{x}^{1-n}}{n-1}}}}{{\sl M}_{-{\frac {n}{n-1}},\,- \left ( n-1 \right ) ^{-1}+1/2}\left (-4\,{\frac {{x}^{1-n}}{n-1}}\right )}}+{\frac { \left ( n-1 \right ) \left ( 1-n \right ) }{ \left ( n+1 \right ) \left ( n-3 \right ) }{2}^{-1+2\,{\frac {n}{1-n}}+2\, \left ( 1-n \right ) ^{-1}+2\, \left ( n-1 \right ) ^{-1}}{x}^{-{\frac {{n}^{2}}{1-n}}+ \left ( 1-n \right ) ^{-1}-1+n} \left ( \left ( 1-n \right ) ^{-1} \right ) ^{{\frac {n}{1-n}}+ \left ( 1-n \right ) ^{-1}} \left ( {\frac {{x}^{1-n}}{1-n}} \right ) ^{ \left ( n-1 \right ) ^{-1}}{{\rm e}^{2\,{\frac {{x}^{1-n}}{n-1}}}}{{\sl M}_{- \left ( n-1 \right ) ^{-1},\,- \left ( n-1 \right ) ^{-1}+1/2}\left (-4\,{\frac {{x}^{1-n}}{n-1}}\right )}} \right ) }}}}}- \left ( {x}^{n} \right ) ^{-1}=0 \right \} \] Mathematica raw input
DSolve[x^(2*n)*y'[x] == 1 - n*x^(-1 + n) + x^n*y[x]*(1 - 3*x^n*y[x] + x^(2*n)*y[x]^2),y[x],x]
Mathematica raw output
{{y[x] -> x^(-n) - E^((2*x^(1 - n))/(-1 + n))/Sqrt[C[1] - (2*x*(E^((4*x^(1 - n))
/(-1 + n))*x^n + (4^((1 + n)/(-1 + n))*x*(x^(1 - n)/(1 - n))^(2/(-1 + n))*Gamma[
-2/(-1 + n), (-4*x^(1 - n))/(-1 + n)])/(-1 + n)))/(1 + n)]}, {y[x] -> x^(-n) + E
^((2*x^(1 - n))/(-1 + n))/Sqrt[C[1] - (2*x*(E^((4*x^(1 - n))/(-1 + n))*x^n + (4^
((1 + n)/(-1 + n))*x*(x^(1 - n)/(1 - n))^(2/(-1 + n))*Gamma[-2/(-1 + n), (-4*x^(
1 - n))/(-1 + n)])/(-1 + n)))/(1 + n)]}}
Maple raw input
dsolve(x^(2*n)*diff(y(x),x) = 1-n*x^(n-1)+x^n*y(x)*(1-3*x^n*y(x)+x^(2*n)*y(x)^2), y(x),'implicit')
Maple raw output
y(x)+exp(2*x/(n-1)/(x^n))/(_C1-2*2^(-2*n/(1-n)-2/(1-n))*(1/(1-n))^(-n/(1-n)-1/(1
-n))/(1-n)*(-2^(-3+2*n/(1-n)+2/(1-n)+2/(n-1))*(n-1)/(n+1)*x^(-n^2/(1-n)+1/(1-n)-
1+n)*(1/(1-n))^(n/(1-n)+1/(1-n))*(-4*x^(1-n)/(1-n)*n^2+8*n*x^(1-n)/(1-n)-4*x^(1-
n)/(1-n)+2*n-2)/(n-3)*(1-n)*(x^(1-n)/(1-n))^(1/(n-1))*exp(2*x^(1-n)/(n-1))*Whitt
akerM(-1/(n-1)*n,-1/(n-1)+1/2,-4*x^(1-n)/(n-1))+2^(-1+2*n/(1-n)+2/(1-n)+2/(n-1))
*(n-1)/(n+1)*x^(-n^2/(1-n)+1/(1-n)-1+n)*(1/(1-n))^(n/(1-n)+1/(1-n))/(n-3)*(1-n)*
(x^(1-n)/(1-n))^(1/(n-1))*exp(2*x^(1-n)/(n-1))*WhittakerM(-1/(n-1),-1/(n-1)+1/2,
-4*x^(1-n)/(n-1))))^(1/2)-1/(x^n) = 0, y(x)-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