General solution to the PDE $xU_x+yU_y=0$
Solve the equation $xU_x+yU_y=0$.
From Partial Differential Equations: An Introduction, 2nd Ed. (Strauss, pg. 10). There are no boundary conditions.
Solution: The PDE can be written $(x,y)\cdot\nabla U(x,y)=0$, implying that the vector $(x,y)$ is tangent to the PDE's characteristic equation. Then I can write $dy/dx=y/x$, and to solve this ODE,
$$\frac{dy}{dx}=\frac yx \\ \ln y=\ln x+c_1 \\ y=cx \\ y/x=c$$
Hence, the PDE is dependent on $c$ and I can write $U(x,y)=f(y/x)$ for some function $f$, solving the problem.
Question: Is this solution correct? The hint for the question (supplied by the professor) said I should use a substitution of variables, but this seems reasonably valid.
Solution 1:
You did not get the most general solution of this PDE. For example, the function $$u(x,y) = \frac{x}{\sqrt{x^2+y^2}}$$ satisfies it, but cannot be written in the form $f(y/x)$. Indeed, $u(1,1)\ne u(-1,-1)$ while the ratio $y/x$ at these points is the same.
The incorrect implication in your solution is $$\frac{dy}{dx}=\frac yx \implies \ln y=\ln x+c_1$$ What you can actually conclude is $$ \ln |y|=\begin{cases}\ln x+c_1,\quad &x>0 \\ \ln (-x)+c_2,\quad &x<0 \end{cases}$$ This leads to $u(x,y)=f(y/x)$ for $x>0$ and $u(x,y)=g(y/x)$ for $x<0$, where $f$ and $g$ may well be different.
Also, $x=0$ is problematic: the PDE makes sense there but the formula for solution doesn't.
Quoting from my answer elsewhere:
I would rather use notation $u(x,y)=g(\theta)$ where $\theta$ is the polar coordinate. After all, the PDE $xu_x+yu_y = 0$ simply says that $\partial u/\partial r = 0$ in polar coordinates. Any function that is independent of radial coordinate $r$ solves the PDE. And not every such function is of the form $G(y/x)$ since this form requires $u(-x,-y)=u(x,y)$ which need not be the case.
Generally, I recommend sketching characteristic curves to see the picture more clearly. In this case, they are half-lines of the form $\{(at,bt):t>0\}$ with $a^2+b^2\ne 0$. They are not lines through the origin, because the characteristic equation makes no sense at the origin.