The equation is: $yu_x+uu_y=-xy$ with initial conditions $u=y$ on $x=0$
I first find that
$\frac{dx}{y}=\frac{dy}{u}=-\frac{du}{xy}$
Solving $\frac{dx}{y}=\frac{dy}{u}$ we get, $ux=\frac{1}{2}y^2+A$
Now solving $\frac{dy}{u}=-\frac{du}{xy}$ we get $\frac{1}{2}u^2=B-\frac{1}{2}xy^2$
Applying the initial conditions yields $A=-\frac{1}{2}y^2$ and $\frac{1}{2}y^2=B$, so $A=-B$, or $A+B=0$
This was obtained on the line $x=0$, but contains only constants, thus holds for all characteristics intersecting $x=0$, so we have,
$A=-B \implies ux-\frac{1}{2}y^2=-\frac{1}{2}u^2-\frac{1}{2}xy^2$
Is this the correct solution?
Thanks!
No, already the first equation you solve is wrong. As the last denominator is not zero, $u$ is not constant along characteristic curves.
You can solve the first and last quotient as $$ x\,dx = -du\implies 2u+x^2=c_1 $$ This you can then insert into the other equations. $$ 0=u\,dx -y\,dy\implies 0=(c_1-x^2)\,dx-2y\,dy\implies c_2=c_1x-\frac{x^3}3-y^2 $$ Because each characteristic curve only has one constant, there is some functional dependence like $c_2=\phi(c_1)$, so that $$ ϕ(2u+x^2)=2xu+\frac23x^3-y^2. $$
With the initial conditions $u=y$, $x=0$ this reduces to $$ ϕ(2y)=-y^2\implies ϕ(t)=-\frac{t^2}4 $$ so that the surface follows the equation $$ -(u^2+x^2u+\frac{x^4}4)=2xu+\frac23x^3-y^2 $$ which is a quadratic equation for the value of $u$.