Solution (source code)

= Solution

Use <separation of variables> with $u=X(x)Y(y)$ on a region where the factors do not vanish. The equation becomes $X'Y-xXY'=0$, so
$$
\frac{X'}{xX}=\frac{Y'}Y=\lambda.
$$
The separated equations are $X'=\lambda xX$ and $Y'=\lambda Y$, giving $u=C\exp[\lambda(y+x^2/2)]$. Choosing $C=\lambda=1$ gives the nonconstant real solution
$$
\boxed{u(x,y)=\exp\left(y+\frac{x^2}{2}\right)}.
$$
Although the division used $x\ne0$, the resulting solution extends smoothly across $x=0$ and directly satisfies $u_x=xu_y$ everywhere.