Solving $u_x+2u_y=1$, $u(0,y)=e^{-y^{2}}$ 
Solving $u_x+2u_y=1$, $u(0,y)=e^{-y^{2}}$ for $x\in \mathbb{R},y\in\mathbb{R}$

So I tried to use characteristics method, with $\frac{dx}{1}=\frac{dy}{2}=\frac{du}{1}$
Which gives me $\frac{dy}{dx}=2$, $\frac{du}{dx}=\frac{1}{2}$
Which I solved to get $y=2x+c_1$, $u=\frac{1}{2}x+c_2$
Then taking $G(c_1)=c_2$ I get that $u=\frac{1}{2}x+G(y-2x)$
And using the initial conditions gives $G(y)=e^{-y^{2}}$
So my solution is $u=\frac{1}{2x}+e^{-(y-2x)^{2}}$
 A: Since that we're interested in solving $$\begin{cases}\frac{\partial u}{\partial x}(x,y)+2\frac{\partial u}{\partial y}(x,y)=1 \quad (x,y)\in \Omega\subseteq \mathbb{R}^{2}\\
u(0,y)=e^{-y^{2}}\end{cases}$$
we can use the characteristic method and the Lagrange-Charpit equations are given by $$\frac{dx}{1}=\frac{dy}{2}=\frac{du}{1}$$
From this, we have that $$\frac{dx}{dy}=\frac{1}{2} \quad [1] \quad \text{and} \quad \frac{du}{dy}=\frac{1}{2} \quad [2]$$
Integration of these gives characteristic curves gives us in $[1]$ $$\frac{dx}{dy}=\frac{1}{2} \implies \int 2dx=\int dy \implies \color{blue}{\boxed{2x=y+C_{1}}}$$
and in $[2]$ we have that $$\frac{du}{dy}=\frac{1}{2} \implies \int  du=\int \frac{1}{2} dy \implies \color{blue}{\boxed{u=\frac{1}{2}y+C_{2}}} $$
where $C_{1}$ and $C_{2}$ are arbitrary constants. From the first of the above equation, we have that $$2x-y=C_{1}$$
Spcecifying $C_{2}$ as a function of $C_{1}$ gives a solution surface, $$u=\frac{1}{2}y+C_{2} \implies \color{blue}{\boxed{u(x,y)=\frac{1}{2}y+f\left(2x-y\right)}}$$
where $f(\cdot)$ is an arbitrary function.
Now, since that the initial data is given by $u(0,y)=e^{-y^{2}}$, so we have that $$\left. u(x,y)\right|_{u(0,y)=e^{-y^{2}}} \implies  e^{-y^{2}}=\frac{1}{2}y+f(-y) \implies f(y)=e^{-y^{2}}+\frac{1}{2}y$$
Therefore, the solution is given by $$u(x,y)=\frac{1}{2}y+e^{-(2x-y)^{2}}+\frac{1}{2}(2x-y)\implies \color{red}{\boxed{u(x,y)=e^{-(2x-y)^{2}}+x}}$$
It's clear that $u(x,y)$ complies with 1) $u(0,y)=e^{-y^{2}}$ and 2) $\frac{\partial u}{\partial x}(x,y)+2\frac{\partial u}{\partial y}(x,y)=1$ as desired.
A: Write the PDE as $(u_x,u_y,-1)\cdot (1,2,1) = 0$.  What is the flow of the constant vector field $V(x,y,u) = (1,2,1)$? Clearly it is $$(x(t),y(t),u(t)) = \Phi(t, (x_0,y_0,u_0)) = (x_0+t, y_0+2t, u_0+t).$$However, setting $x_0 = 0$, we have $u_0 = e^{-y_0^2}$. So the problem boils down to "eliminating" $t$ in $$x(t) = t, \qquad y(t) = y_0 +2t, \qquad u(t) = e^{-y_0^2}+t$$and solving for $u(t)$ in terms of $x(t)$ and $y(t)$ (then effectively dropping $t$ everywhere). We immediately have that $$u(x,y) = e^{-(y-2x)^2}+x.$$Let's see that this works: for $x=0$, we have $u(0,y) = e^{-y^2}$ as required. And also $$u_x(x,y) = 4(y-2x)e^{-(y-2x)^2} + 1\qquad\mbox{and}\qquad u_y(x,y) = -2(y-2x)e^{-(y-2x)^2}. $$Then obviously $u_x+2u_y=1$, so we are done.
