Solve nonlinear equation $-xu_x+uu_y=y$ Solve nonlinear equation  
$$\left\{\begin{matrix}
-xu_x+uu_y=y & \\ 
 u(x,2x)=0& 
\end{matrix}\right.$$
using method of characteristic curves
my attempt:
for the pde we can write it as
$\frac{dx}{-x}=\frac{dy}{u}=\frac{du}{y}$
but  i cant solve little please..thank you
 A: The given partial differential equation is:
$$\begin{matrix}
-xu_x+uu_y=y & \\ 
 u(x,2x)=0.& 
\end{matrix}$$
Finding the general solution
Using the method of characteristics we obtain:
$$\dfrac{dx}{-x}=\dfrac{dy}{u}=\dfrac{du}{y} \qquad (1)$$
We solve the right part of the previous equality:
$$\dfrac{dy}{u}=\dfrac{du}{y}\implies ydy=udu \implies \frac{1}{2}y^2=\frac{1}{2}u^2-\frac{c_1}{2} \implies u =\pm\sqrt{c_1+y^2} $$
Now, use this in the left part of the equality (1):
$$\dfrac{dx}{-x}=\dfrac{dy}{u}\implies \dfrac{dx}{-x}=\dfrac{dy}{\pm\sqrt{c_1+y^2}} \implies -\ln x =\pm \ln(y+\sqrt{y^2+c_1})-\ln c_2 $$
$$\implies -\ln x = \pm\ln(y+u)-\ln c_2 \implies \ln c_2 = \ln(y+u)^{\pm1}+\ln x \implies  c_2 = x\left(y+u \right)^{\pm 1}$$
Now, we know that $c_1=F[c_2]$, in which $F$ is an arbitrary function. Hence we obtain:
$$u =\pm\sqrt{c_1+y^2}=\pm\sqrt{F\left[x\left(y+u \right)^{\pm 1}\right]+y^2}$$
$$\implies u^2 = F\left[x\left(y+u \right)^{\pm 1}\right]+y^2$$
Determining the arbitrary function $F$ by using $u(x,2x)=0$
Now, we look as $u(x,2x)=0$: 
$$\implies 0^2 = F\left[x\left(2x+0 \right)^{\pm 1}\right]+(2x)^2$$
$$\implies 0 = F\left[x\left(2x\right)^{\pm 1}\right]+4x^2.$$
We have to look at both cases $-1$ and $+1$ separately:


*

*Case $-1$:
$$0 = F\left[\frac{x}{2x}\right]+4x^2 \implies F[2]=-2[2x^2] \implies \text{contradiction as a constant cannot be a function!}$$

*Case $+1$:
$$0 = F[2x^2]+4x^2 \implies F[2x^2]=-2(2x^2) \implies F[u]=-2u,
$$hence the solution become 
$$u^2=-2x(y+u)+y^2 \implies u^2+2xu+2xy-y^2.$$


Now, use the quadratic formula to solve for $u$ to obtain:
$$u_{1,2}=\frac{-2x\pm\sqrt{(2x)^2-4(2xy-y^2)}}{2}$$
$$u_{1,2}=-x\pm\sqrt{x^2-(2xy-y^2)}$$
$$u_{1,2}=-x\pm\sqrt{x^2-2xy+y^2}=-x\pm \sqrt{(x-y)^2}=-x\pm|x-y|$$
Investigating the solution
We now have to check which of the solutions do satisfy $u(x,2x)=0$.


*

*Case +1: $$u = -x +|x-y| \implies 0 = -x+|x|.$$
If $x>0$ we get $0=-x+x$, but if $x<0$ we get $0=-x-x$. So the solution $u=-x+|x-y|$ is valid for $x>0$.

*Case -1: $$u = -x -|x-y| \implies 0 = -x-|x|.$$
If $x>0$ we get $0=-x-x$, but if $x<0$ we get $0=-x+x$. So the solution $u=-x-|x-y|$ is valid for $x<0$.

A: $$-xu_x+uu_y=y $$
$$\dfrac{dx}{-x}=\dfrac{dy}{u}=\dfrac{du}{y}$$
First family of characteristic curves, from $\quad\dfrac{dy}{u}=\dfrac{du}{y}\quad\to\quad u^2-y^2=c_1$
$\dfrac{dy}{u}=\dfrac{du}{y}=\dfrac{dy+du}{u+y}=\dfrac{d(u+y)}{u+y}$
Second family of characteristic curves, from $\quad\dfrac{dx}{-x}=\dfrac{d(u+y)}{u+y} \quad\to\quad (u+y)x=c_2$
General solution on the form of implicit equation :
$$(u+y)x=F(u^2-y^2)$$
where $F(X)$ is any differentiable function.
Condition :
$u(x,2x)=0\quad\implies\quad (0+2x)x=F(0^2-(2x)^2) \quad\to\quad 2x^2=F(-4x^2)$
$$F(X)=-\frac{1}{2}X$$
Particular solution according to the boundary condition, with $X=u^2-y^2$ :
$\quad (u+y)x=-\frac{1}{2}(u^2-y^2)\quad$ and after simplification : $\quad x=-\frac{1}{2}(u-y)$
$$u(x,y)=y-2x$$
