Find the general solution $u(x,y)$ to $$x u_x + y u_y = 0$$
Attempted solution - The characteristic equation satisfy the ODE $dy/dx = y/x$. To solve the ODE, we separate variables: $dy/y = dx/x$; hence $\ln(y) = \ln(x)- C$, so that $$y = x \exp(-C)$$
I am a bit confused in finding the general solution for $u(x,y)$. I just want to know if I am on the right track or not. I haven't taken a formal ODE course but I have self-studied but not in a while. Any suggestions would be greatly appreciated.
We consider first order PDE's as a first order directional derivative. That is suppose we parametrize a curve $(x,y)$ by a parameter $\xi$. So that
$$ u=u(x(\xi),y(\xi)) $$
$$ \frac{\mathrm{d}u}{\mathrm{d}\xi}=\frac{\mathrm{d}x}{\mathrm{d}\xi}\frac{\partial u}{\partial x}+\frac{\mathrm{d}y}{\mathrm{d}\xi}\frac{\partial u}{\partial y} $$
Comparing to your original PDE
$$ 0 = x\frac{\partial u}{\partial x}+y\frac{\partial u}{\partial y} $$
We then set
$$ \frac{\mathrm{d}u}{\mathrm{d}\xi}=0 $$
$$ \frac{\mathrm{d}x}{\mathrm{d}\xi}=x $$
$$ \frac{\mathrm{d}y}{\mathrm{d}\xi}=y $$
Along the characteristics $u$ is constant and
$$ \mathrm{d}\xi=\frac{\mathrm{d}x}{x}=\frac{\mathrm{d}y}{y} $$
Integrating we find that $y/x$ is also a constant. Since $u$ is a constant and $y/x$ is a constant, we are free to set one constant equal to an arbitrary function of the other constant.
$$ u(x,y)=\varphi(\frac{y}{x}) $$
where $\varphi$ is an arbitrary differentiable function.