PDE Lagrange method - $xuU_x + yuU_y = -xy$ I'm not sure where I went wrong with this one:
the PDE:
$$xuU_x + yuU_y = -xy$$
my try:
I Wrote the characteristic lines equation:
$$ \frac{dx}{xu} = \frac{dy}{yu} = \frac{du}{-xy}$$
eq (1):
$$ \frac{dx}{xu} = \frac{du}{-xy} \Longrightarrow \ \frac{dx(-xy)}{x} = udu$$
solving this I got the first surface $\phi_1 = u^2 +2xy$
eq (2):
$$ \frac{dx}{xu} = \frac{dy}{yu} \Longrightarrow \ln|x| + C = \ln|y|  $$
which gave me the second surface:
$$ \phi_2 = \frac{y}{x} $$
according to the solution:
$$\phi_1 = (u^2 +xy)\cdot \frac{x}{y} \\ \phi_2 = \frac{x}{y} $$
I don't understand how I got $\phi_{1,2}$ wrong, I'm worried that there is something wrong with my understanding of the theory,
help \ hints would be appreciated, thank you!
 A: $$xuu_x + yuu_y = -xy$$
$$ \frac{dx}{xu} = \frac{dy}{yu} = \frac{du}{-xy}\quad\text{ is OK.}$$
eq (1):
$$ \frac{dx}{xu} = \frac{du}{-xy} \Longrightarrow \ \frac{dx(-xy)}{x} = udu\quad\text{ is OK.}$$
First surface $$\phi_1 = u^2 +2xy\quad \text{is FALSE.}$$
Why ?
$$-y\:dx=u\:du \quad\implies\quad -\int y\:dx=\frac12 u^2$$
$$\int y\:dx\neq y\:dx\quad\text{ because } y \text{ is not constant.}$$
So you cannot integrate since $y(x)$ is unknown at this stage.
One have to proceed differently.
$$ y\frac{dx}{yx} = x\frac{dy}{xy}=\frac{ydx+xdy}{yx+xy}=\frac{d(xy)}{2xy} \tag 3$$
$$\frac{d(xy)}{2xy}= \frac{udu}{-xy}$$
$$d(xy)=-2udu$$
$$xy=-u^2+\text{constant}$$
$$\phi_1 = u^2+xy$$
eq (2):
$$ \frac{dx}{xu} = \frac{dy}{yu} \Longrightarrow \ln|x| + C = \ln|y|  $$
$$ \phi_2 = \frac{y}{x} \quad\text{ is OK.}$$
NOTE:
If you don't understand the above calculus from Eq.$(3)$ there is an alternative method :
$$-y\:dx=u\:du $$
$$\phi_2 = \frac{y}{x} \quad\implies\quad y=\phi_2x$$
$$-(\phi_2x)\:dx=u\:du $$
Now you can integrate because $\phi_2=$constant.
$$-\frac12\phi_2x^2=\frac12 u^2+\text{constant}$$
$$\phi_1=u^2+\phi_2x^2$$
$$\phi_1=u^2+(\frac{y}{x})x^2$$
$$\phi_1=u^2+xy$$
