Solve y'^2+4xy'-y^2-2x^2y=x^4-4x^2 for y' and integrate
Solve $y'^2+4xy'-y^2-2x^2y=x^4-4x^2$ for $y'$ and integrate.
Explanation of Method
Treat the equation as a quadratic in $p=y'$. Its discriminant collapses to a perfect square, splitting the equation into two linear first-order ODEs, each solvable by an integrating factor.
Step 1: View as quadratic in $p$
With $p=y'$: $p^2+4xp-(y^2+2x^2y+x^4-4x^2)=0$, a quadratic in $p$ with $a=1,\ b=4x,\ c=-(y^2+2x^2y+x^4-4x^2)$.
Step 2: Discriminant is a perfect square (verified in sympy)
\[b^2-4ac=4x^4+8x^2y+4y^2=4(x^2+y)^2.\] This is confirmed symbolically — the discriminant factors exactly as claimed, so $\sqrt{b^2-4ac}=2(x^2+y)$ (up to sign).
Step 3: Solve the quadratic
\[p=\frac{-4x\pm 2(x^2+y)}{2}=-2x\pm(x^2+y),\]
giving two branches (sympy's solve returns these directly):
\[\text{(A)}\quad p=y+x^2-2x,\qquad \text{(B)}\quad p=-y-x^2-2x.\]
Step 4: Solve branch (A) by integrating factor
$y'-y=x^2-2x$ is linear; $\mu=e^{-x}$ gives, after integration by parts (verified with sympy's dsolve),
\[y=-x^2+C_1e^{x}.\]
Step 5: Solve branch (B) by integrating factor
$y'+y=-x^2-2x$ is linear; $\mu=e^{x}$ gives, again verified by sympy, \[y=-x^2+C_2e^{-x}.\]
Step 6: Check the $p$-discriminant curve $y=-x^2$
Substituting $y=-x^2$ into the original equation gives $0=0$ identically (sympy confirms), so $y=-x^2$ solves the ODE. But it is already the $C_1=0$ member of family (A) and the $C_2=0$ member of family (B) — so it is not an independent singular solution, merely a shared special case. Source's conclusion is correct.
Result
Final answer:
\[\boxed{\,y=-x^2+C_1e^{x}\quad\text{or}\quad y=-x^2+C_2e^{-x}\,}\]
Both families were verified with sympy's dsolve; the discriminant-factoring, the branch splitting, and the non-singular status of $y=-x^2$ all check out — the source's solution is entirely correct.