Find the general integral of x^2(y+x)y'' - (xy'-y)^2 = 0
Find the general integral of $x^2(y+x)y'' - (xy'-y)^2 = 0$.
Explanation of Method
A chain of substitutions $y=vx$, $w=v+1$, $u=\ln w$ fully linearizes the equation into $xu''+2u'=0$, which is itself another exact-derivative reduction.
Step 1: The homogeneous substitution $y=vx$
Both $(y+x)$ and $(xy'-y)$ scale like $x$ under $y\to vx$, suggesting the standard substitution for homogeneous-type equations. With $y=vx$, $y'=v+xv'$, $y''=2v'+xv''$: \[xy'-y = x(v+xv')-vx = x^2v', \qquad y+x = x(v+1).\]
Substituting into the equation: $x^2\cdot x(v+1)\cdot(2v'+xv'') - x^4v'^2 = 0$.
Dividing through by $x^3$: $x(v+1)v'' + 2(v+1)v' - xv'^2 = 0$.
Step 2: Simplifying with $w=v+1$
Since $w'=v'$ and $w''=v''$, this is just
\[ xww'' + 2ww' - xw'^2 = 0. \]
Dividing by $w^2$ (excluding the degenerate case $w=0$, treated separately below): \[x\frac{w''}{w} + 2\frac{w'}{w} - x\left(\frac{w'}{w}\right)^2 = 0.\]
Step 3: Linearizing with $u=\ln w$
Since $u'=w'/w$ and $u''=w''/w-(w'/w)^2$, i.e. $w''/w = u''+u'^2$, the equation becomes
\[ x(u''+u'^2) + 2u' - xu'^2 = 0 \;\Longrightarrow\; xu'' + 2u' = 0. \]
The nonlinear $u'^2$ terms cancel completely, leaving a linear equation for $u(x)$ — the chain of substitutions $y\to v\to w\to u$ has fully linearized the problem.
Step 4: Solving the linear equation $xu''+2u'=0$
This is again an exact derivative, exactly as in Problem 181: $\dfrac{d}{dx}\bigl(x^2u'\bigr) = x^2u''+2xu' = x(xu''+2u')=0$. So
\[ x^2u' = C_1 \;\Longrightarrow\; u' = \frac{C_1}{x^2}. \]
Integrating once more: $u = -\frac{C_1}{x} + C_2$.
Step 5: Unwinding the substitution chain
Back-substitute $w=e^u$: \[w = e^{-C_1/x+C_2} = Ae^{-C_1/x}, \qquad A=e^{C_2}.\]
Then $v+1=w$ gives $\dfrac{y}{x}+1 = Ae^{-C_1/x}$, i.e.
\[ y+x = Axe^{-C_1/x}. \]
Renaming the constants ($C_1\to-C_1$, $A\to C_2$) to present them in the most natural sign:
Step 6: The singular solution $y=-x$
Degenerate branch $w=0$.
Step 2 divided by $w^2$, silently excluding $w=0$, i.e. $v=-1$, i.e. $y=-x$. Checking this directly in the original equation: $xy'-y = x(-1)-(-x)=0$ and $y+x=0$, so both terms of $x^2(y+x)y''-(xy'-y)^2$ vanish trivially (the first because $y+x=0$, the second because $xy'-y=0$), regardless of $y''$. So $y=-x$ satisfies the equation for a completely different reason than the general family.
This is the singular solution, and it is the limiting case $C_2\to0$ of the general family: as $C_2\to0$, $y+x=C_2xe^{C_1/x}\to0$, i.e. $y\to-x$.
Step 7: Verification of the general family
With $y+x=C_2xe^{C_1/x}$, differentiate: $y' = C_2e^{C_1/x} + C_2x e^{C_1/x}\!\left(-\dfrac{C_1}{x^2}\right) = C_2e^{C_1/x}\left(1-\dfrac{C_1}{x}\right)$. Then
\[ xy'-y = xy' - (C_2xe^{C_1/x}-x) = x\left[C_2e^{C_1/x}\left(1-\frac{C_1}{x}\right) - C_2e^{C_1/x} + 1\right] - x \]
Simplifying the bracket, $C_2e^{C_1/x}\bigl(1-\tfrac{C_1}{x}-1\bigr) = -\dfrac{C_1C_2}{x}e^{C_1/x}$, so
\[ xy'-y = x\left(-\frac{C_1C_2}{x}e^{C_1/x}+1\right) - x = -C_1C_2\,e^{C_1/x}. \]
Differentiating $y'$ once more (product/chain rule) gives $y'' = C_2e^{C_1/x}\cdot\dfrac{C_1^2}{x^3}$. Substituting both results into the original equation, using $y+x=C_2xe^{C_1/x}$:
\[ x^2(y+x)y'' - (xy'-y)^2 = x^2\cdot C_2xe^{C_1/x}\cdot\frac{C_1^2C_2e^{C_1/x}}{x^3} - \bigl(-C_1C_2e^{C_1/x}\bigr)^2 = C_1^2C_2^2e^{2C_1/x} - C_1^2C_2^2e^{2C_1/x} = 0. \]
The two terms match exactly and cancel, confirming the boxed family satisfies the original nonlinear equation identically for all $C_1,C_2$.\ $\checkmark$
Result
Final answer:
\[\boxed{\,y+x = C_2\,x\,e^{C_1/x}, \qquad\text{equivalently}\qquad y = x\bigl(C_2e^{C_1/x}-1\bigr)\,}\]