Solve of the following PDE using method of characteristics: $$(1)\qquad xu_x-xyu_y=u \qquad u(x,x)=x^2 e^x$$ $$(2)\qquad xu_x-xyu_y=u, \forall x,y$$
I assume that $(x,y)$ are functions of a parameter, say, $t$, i.e. $(x(t), y(t))$. In that case, the chain rule gives
$$\frac{du}{dt}=\frac{\partial u}{\partial x}.\frac{d x}{dt}+\frac{\partial u}{\partial y}.\frac{dy}{dt}=0$$
Comparing the equations, we need to solve the ODEs to find the characteristic curves.
$$\frac{du}{dt}=u,\quad\frac{d x}{dt}=x \qquad\&\quad\frac{d y}{dt}=-xy$$
For second one, How can get the constant values of those odes without any initial condition? Do I am missing something? Here is an existing solution on M.SE but couldn't manage how did he/she bring initial conditions and write $u(x,y)=f(y_0)e^t$:
$\dfrac{dx}{dt}=x$ , letting $x(0)=1$ , we have $x=e^t$ $\dfrac{dy}{dt}=-xy=-e^ty$ , letting $y(0)=y_0$ , we have $y=y_0e^{1-e^t}=y_0e^{1-x}$ $\dfrac{du}{dt}=u$ , letting $u(0)=f(y_0)$ , we have $u(x,y)=f(y_0)e^t=f(e^{x-1}y)x=F(e^xy)x$
Any hint will be appreciated.
Thanks in Advance.
If you eliminate $t$ for $x$, you get $u=c_1x$ and $y=c_2e^{-x}$. The idea now is that the family of characteristics in a solution surface only has one parameter, so the constants have a dependency. For almost all solutions one can set $$ c_1=f(c_2)\implies u=f(ye^{x})x. $$