Solving first parital derivative equation 
$\frac{\partial y}{\partial t}-2\frac{\partial y}{\partial x} = 0, y(x, 0) = e^{-x^2}$ 을 만족하는 $y(x,t)$를 구하시오
Image.

I seperate variable and tried to solve this problem.
But I cant get how to use $y(x,0) = e^{-x^2}$
 A: This is a simple transport type equation. We shall solve it via the method of characteristic.
Suppose we could rewrite the above PDE as
\begin{align}
\frac{d}{dt}y(t, X(t)) = \frac{\partial y}{\partial t}+X'(t)\frac{\partial y}{\partial x} = \frac{\partial y}{\partial t}-2\frac{\partial y}{\partial x} = 0
\end{align}
which means
\begin{align}
X'(t) = -2 \ \ \text{ with } \ \ X(0) = x_0.
\end{align}
Solving the above ODE yields
\begin{align}
X(t) = -2t +x_0.
\end{align}
Hence it follows
\begin{align}
y(t, -2t+x_0) = \operatorname{const} =y(0, x_0) = e^{-x_0^2}. 
\end{align}
Since $X=-2t+x_0$, then $x_0 = X+2t$ which means 
\begin{align}
y(t, X)= e^{-(X+2t)^2}
\end{align}
solves your PDE with given initial condition. 
A: Try a function of the form
$$f(x,t) = a(t) \, e^{-(x - b t)^{2}}$$
where $a(t)$ is a function of $t$ and $b$ is a constant. Using $f_{t} - 2 \, f_{x} = 0$ then
\begin{align}
f_{x} &= - 2 \, a(t) \, (x-b t) \, e^{-(x - b t)^{2}} \\
f_{t} &= 2 \, b \, a(t) \, (x- b t) \, e^{-(x - b t)^{2}} + a_{t} \, e^{-(x - b t)^{2}} \\
0 &= [ 2 \, (b+2) \, (x-b t) + a_{t}] \, e^{-(x - b t)^{2}} \\
\end{align}
This yields $b = -2$ and $a_{t} = 0$, or $a(t) = a_{0}$, and
$$f(x,t) = a_{0} \, e^{-(x + 2 t)^{2}}. $$
When $t = 0$ it is given that $f(x,0) = e^{- x^{2}}$ which gives $a_{0} = 1$ and 
$$f(x,t) = e^{-(x + 2 t)^{2}}.$$
