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.