\[ x^4-2 x^2 y(x)+y'(x)+y(x)^2-2 x-1=0 \] ✓ Mathematica : cpu = 0.0922518 (sec), leaf count = 25
\[\left \{\left \{y(x)\to x^2+\frac {1}{-\frac {1}{2}+c_1 \left (-e^{2 x}\right )}+1\right \}\right \}\] ✓ Maple : cpu = 0.181 (sec), leaf count = 33
\[\left \{y \left (x \right ) = \frac {c_{1} \left (x^{2}+1\right ) {\mathrm e}^{2 x}-x^{2}+1}{c_{1} {\mathrm e}^{2 x}-1}\right \}\]
\begin {align} x^{4}-2x^{2}y\left ( x\right ) +y^{\prime }\left ( x\right ) +y^{2}\left ( x\right ) -2x-1 & =0\nonumber \\ y^{\prime }\left ( x\right ) & =-x^{4}+2x+1+2x^{2}y\left ( x\right ) -y^{2}\left ( x\right ) \tag {1} \end {align}
This is Riccati first order non-linear ODE of the form \begin {equation} y^{\prime }\left ( x\right ) =P\left ( x\right ) +Q\left ( x\right ) y+R\left ( x\right ) y^{2}\left ( x\right ) \tag {2} \end {equation} where in this case \(Q\left ( x\right ) =2x^{2},R\left ( x\right ) =-1,P\left ( x\right ) =-x^{4}+2x+1\).
Let \(u=y-x^{2}\) or \(y=u+x^{2}\) then\begin {align*} u^{\prime } & =y^{\prime }-2x\\ & =\left ( -x^{4}+2x+1+2x^{2}y-y^{2}\right ) -2x\\ & =\left ( -x^{4}+2x+1+2x^{2}\left ( u+x^{2}\right ) -\left ( u+x^{2}\right ) ^{2}\right ) -2x\\ & =\left ( -x^{4}+2x+1+2x^{2}u+2x^{4}-\left ( u^{2}+x^{4}+2ux^{2}\right ) \right ) -2x\\ & =-x^{4}+2x+1+2x^{2}u+2x^{4}-u^{2}-x^{4}-2ux^{2}-2x\\ & =1-u^{2} \end {align*}
Hence\[ u^{\prime }=1-u^{2}\] This is separable\begin {align*} \frac {du}{dx} & =1-u^{2}\\ \frac {du}{1-u^{2}} & =dx \end {align*}
Integrating both sides \begin {align*} \tanh ^{-1}\left ( u\right ) & =x+C\\ u\left ( x\right ) & =\tanh \left ( x+C\right ) \\ & =\frac {e^{x+C}-e^{-x-C}}{e^{x+C}+e^{-x-C}}\\ & =\frac {e^{x}e^{C}-e^{-x}e^{-C}}{e^{x}e^{C}+e^{-x}e^{-C}} \end {align*}
Multiplying numerator and denominator by \(e^{-C}e^{x}\)\[ u\left ( x\right ) =\frac {e^{2x}-e^{-2C}}{e^{2x}+e^{-2C}}\] Let \(e^{-2C}=C_{1}\)\[ u\left ( x\right ) =\frac {e^{2x}-C_{1}}{e^{2x}+C_{1}}\] Since \(u=y-x^{2}\) then\begin {align*} y & =u+x^{2}\\ & =\frac {e^{2x}-C_{1}}{e^{2x}+C_{1}}+x^{2}\\ & =\frac {e^{2x}-C_{1}+x^{2}e^{2x}+x^{2}C_{1}}{e^{2x}+C_{1}} \end {align*}
To obtain same solution as Maple, we divide by \(C_{1}\)\[ y=\frac {\frac {1}{C_{1}}e^{2x}-1+\frac {1}{C_{1}}x^{2}e^{2x}+x^{2}}{\frac {1}{C_{1}}e^{2x}+1}\] Let \(\frac {1}{C_{1}}=-C\) then\begin {align*} y & =\frac {-Ce^{2x}-1-Cx^{2}e^{2x}+x^{2}}{-Ce^{2x}+1}\\ & =\frac {Ce^{2x}+1+Cx^{2}e^{2x}-x^{2}}{Ce^{2x}-1} \end {align*}
Which now agrees with the Maple solution form. Mathematica solution also verified to be correct.