Find solutions of the following initial-value problem in $\mathbb R^2$: $$ 2u_y - u_x + xu=0 $$ with $$ u(x,0)=2xe^{x^2/2}$$
So far, I have tried to solve it by the method of characteristics, i.e., I have
$$ \frac{\partial y}{\partial s} = 2, \quad y(0) = 0 \\ \frac{\partial x}{\partial s}=-1, \quad x(0)=x_0 \\ \frac{\partial u}{\partial s} = -xu, \quad u(0) = u_0(x_0)=2x_0e^{x_0^2/2}$$
Clearly, $ y = 2s $ and $ x = -s + x_0 $. The problem arises in the third equation. I am not really sure if I can do it:
$$ \frac{\partial u}{\partial s} = -xu = -(-s+x_0)u $$
The first problem is how to solve this ode. I found $u = ce^{(s-x_0)^2/2}$ as an answer, but from wolframalpha.com, $ u = ce^{\frac{1}{2}s(s-2x_0)} $ is also an answer. I also solved $s$ and $x_0$ as a function of $x$ and $y$, so I could write $u=u(x,y)$, i.e., $s=y/2, \; x_0=x+y/2$.
Upon substitution of $s$ and $x_0$ in $u(s,x_0)$, I end up with an expression for $u=u(x,y)$. So far, so good. However, to check if that is the solution, deriving and substituting $u$ in the initial equation, I don't have 0=0, which means both answers are wrong. What is the problem here?
$$ 2u_y - u_x =- xu $$ Sorry to be very bref in presenting the method of characteristics on a slightly different way, but equivalent.
System of characteristic D.E. : $\quad \frac{dy}{2}=\frac{dx}{-1}=\frac{du}{-xu}$
$\frac{dy}{2}=\frac{dx}{-1} \quad\to\quad$ first characteristic curve : $\quad y+2x=c_1$
$\frac{dx}{-1}=\frac{du}{-xu}\quad\to\quad$ second characteristic curve : $\quad ue^{-\frac{x^2}{2}}=c_2$
General solution on form of implicit equation $\Phi\left(c_1,c_2\right)=0$ any differentiable function $\Phi$ : $$\Phi\left((y+2x),(ue^{-\frac{x^2}{2}})\right)=0$$ Or on equivalent explicit form : $\quad ue^{-\frac{x^2}{2}}=F(y+2x)\quad$ any differentiable function $F$ : $$u(x,y)=e^{\frac{x^2}{2}}F(y+2x)$$ Now, we can take account of the condition : $\quad u(x,0)=2xe^{\frac{x^2}{2}}=e^{\frac{x^2}{2}}F(0+2x)$
This determines the function $F(2x)=2x\quad $ and $\quad F(y+2x)=y+2x$ $$u(x,y)=e^{\frac{x^2}{2}}(y+2x)$$