Solution (source code)

= Solution

The substitution removes the zero-order term: $u_x=e^{-x^2}(v_x-2xv)$ and $u_y=e^{-x^2}v_y$, so the <partial differential equation> becomes $v_x+xv_y=1$. Its <method of characteristics> gives
$$
\frac{dy}{dx}=x,\qquad \frac{dv}{dx}=1.
$$
The invariant is $\eta=y-x^2/2$. Therefore $v=x+F(\eta)$. The initial line $x=0$ is noncharacteristic, and the boundary data give $F(\eta)=\eta e^{-\eta^2}$. Hence
$$
\boxed{u(x,y)=e^{-x^2}\left[x+\left(y-\frac{x^2}{2}\right)e^{-(y-x^2/2)^2}\right].}
$$
Each characteristic meets the data line once, ensuring uniqueness among differentiable solutions, and substituting the result verifies both the equation and the data.