Existence and uniqueness of solution to Cauchy problem for $xu_x + u_y+ yu =0$ Consider the PDE
$$xu_x+u_y+yu=0$$
a) Solve the IVP for $ u(x,0)=g(x)$. In which region the solution exists and is unique?
b) Solve the IVP for $u(0,y)=h(y)$. In which region the solution exists and is unique?
My attempt: as we can check here the solution has the form
$$u(x,y) =K(\ln|x|-y)e^{-y^2/2}$$
Or 
$$ u(x,y)= K(xe^{-y})e^{-y^2/2}$$
a) clearly it is not defined for x=0. If $x \neq 0$, 
$$u(x,y)=g(xe^{-y})e^{-y^2/2}$$
And the solution is unique
b) it looks like there is no solution satisfying this (we should have $K(0)=h(y)$), but I dont know how to argue this formally. 
 A: The characteristics $(x(t), y(t), z(t))$ of the system, where $z(t) := u(x(t), y(t))$ , are defined by the ODEs
\begin{align*}
\dot x &= x & \dot y &= 1 & \dot z &= -zy\\
x(0) &=x_0 & y(0)&=y_0 & z(0) &= u(x_0,y_0) = z_0,
\end{align*}
where $p_0 = (x_0, y_0)$ is a point in the domain with a known value for $u$, which we call $z_0$. The solution to this system is 
\begin{align*}
x &= x_0 e^t & y &= t+y_0 &  z &= z_0e^{-(t^2/2+y_0t)}.
\end{align*}
Moreover, these solutions are unique by the uniqueness of solutions to systems of ODEs with prescribed initial values. 
Notice that once you fix the value of $u$ at some point $p_0 = (x_0,y_0)$ of the domain, the values of $u$ along the characteristic passing through $p_0$ are immediately determined by the solutions to these ODEs. Consequently, it is not possible to prescribe arbitrary values of $u$ at more than one point of a characteristic.
In particular, the characteristic passing through $p_0=(0,0)$ is 
\begin{align*}
x &= 0 & y &= t &  z &= z_0e^{-t^2/2},
\end{align*}
therefore it is not possible to prescribe values on more than one point of the line $(0,t)$.
Conclusion: 
Part a) Has a unique solution defined for all points $x,y$ given by the formula you found: $u(x,y) = g(xe^{-y})e^{-y^2/2}$. This is obtained from the general solution to the ODEs by setting $y_0=0, \, z_0=g(x_0)$ and writing $x_0$ in terms of $x$.
Part b) Has no solutions, except for the case where $h$ agrees with the system of ODEs, in which there are an infinite number of solutions; one  for each possible $g(x)$ defined in the $x$-axis agreeing with $h$ in the origin ($g(0)=h(0)$), that is
$$h(y)=h(0)e^{-y^2/2}.$$
A: let us define the characteristic curve $C$, parametrised bty $t,$  through $(a, b)$ by 
$$ \frac{dx}{dt} = x, \frac{dy}{dt} = 1 \text{ subject to initial conditions } x = a, y = b \text{ at } t = 0.$$ the solution is $$x = ae^t, y = t+b. $$  along $C,$ we have $$\frac{du}{dt} = -yu = -(t+b)u, u = f(a,b).\tag 1  $$
the solution to $(1)$ is $$u = f(a,b)e^{-tb - t^2/2}.$$
we can specialize for the cases $$f(a, 0) = g(a), f(0,b)=h(b).  $$  i will come back to it later if i can.
A: I was curious to try another method instead of method characteristics for obtaining solutions. I tried the method of separation of variables. Assuming a separable solution $u(x,y) = X(x)Y(y)$ and putting into the PDE and dividing by $X(x)Y(y)$ you get
$$x{{X'} \over X} + {{Y'} \over Y} + y = 0$$
where this can hold only when 
$$\left\{ \matrix{
  x{{X'} \over X} = \mu  \hfill \cr 
  \mu  + {{Y'} \over Y} + y = 0 \hfill \cr}  \right.$$
and hence you can find $X(x)$ and $Y(y)$ by solving these two ODEs which results in
$$\left\{ \matrix{
  X(x) = A{x^\mu } \hfill \cr 
  Y(y) = B{e^{ - \left( {{{{y^2} + 2\mu y} \over 2}} \right)}} \hfill \cr}  \right.$$
and 
$$u(x,y) = C{x^\mu }{e^{ - \left( {{{{y^2} + 2\mu y} \over 2}} \right)}}$$
which also can be written as
$$u(x,y) = C{\left( {x{e^{ - y}}} \right)^\mu }{e^{ - {{{y^2}} \over 2}}}$$
and hence a special case of your solution. Now we get to satisfaction of the IC's. 
Case a. $u(x,0)=g(x)$
Let us try our solution and see what we get. Substitution into the initial condition gives
$$C{x^\mu } = g(x)$$
What this recalls you? That's right! The Taylor series. This equation motivates us to define 
$$\left\{ \matrix{
  {\mu _n} = n \hfill \cr 
  {C_n} = {{{g^{(n)}}(0)} \over {n!}} \hfill \cr}  \right.\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,n = 0,1,2,...$$
Then by superposing our solutions we finally get
$$\eqalign{
  & \sum\limits_{n = 0}^\infty  {{1 \over {n!}}{{\left. {{{{d^n}g\left( x \right)} \over {d{x^n}}}} \right|}_{x = 0}}} {e^{ - \left( {{{{y^2} + 2ny} \over 2}} \right)}}{x^n}  \cr 
  &  = \left( {\sum\limits_{n = 0}^\infty  {{1 \over {n!}}\left( {{{\left. {{{{d^n}g\left( x \right)} \over {d{x^n}}}} \right|}_{x = 0}}{e^{ - ny}}} \right){x^n}} } \right){e^{ - {{{y^2}} \over 2}}}  \cr 
  &  = \left( {\sum\limits_{n = 0}^\infty  {{1 \over {n!}}\left( {{{\left. {{{{d^n}g\left( {x{e^{ - y}}} \right)} \over {d{x^n}}}} \right|}_{x = 0}}} \right){x^n}} } \right){e^{ - {{{y^2}} \over 2}}}  \cr 
  &  = g\left( {x{e^{ - y}}} \right){e^{ - {{{y^2}} \over 2}}} \cr} $$
where I used the chain rule in second equality. This completes the process.
Case b. $u(0,y)=h(y)$
When we substitute our solution in the initial condition we get
$$0=h(y)$$
and it turns out that we fail to satisfy the IC in this case. Existence and uniqueness in this case must also be investigated. I don't have any Idea yet.
