Solve $u_t=-2u_x$, $u(x,0)=e^{-{x}^2}$ , $-\infty < x < \infty$
My attempt:
Let $u(x,t)=X(x) T(t)$
So
$XT’=-2X’T$
${{T’ }\over T }= {{-2X} \over X}=\lambda$
Then
$T=c_1 e^{\lambda t}$
$X=c_2 e^{{{-\lambda} \over 2} x} $
Then
$u(x,t)= c_1 c_2 e^{{\lambda t} - {{\lambda} \over 2}x}$
And when $t=0$
$u(x,0)=c_1 c_2 e^{{{-\lambda} \over 2} x} $ — $(i)$
And from initial condition $u(x,0)=e^{-x^2}$ — $(ii)$
But now I don’t know what can I do, because $\lambda$ is constant, also the degree of the index $x$ in $(i)$ is $1$ and in $(ii)$ is $2$ ?
Help please:)
$$u_t=-2u_x$$ With the method of separation of variables, you obtained a set of solutions : $$u(x,t)=C\:e^{\lambda(t-\frac{1}{2}x)}$$ For each value of $\lambda$ the coefficient $C$ can be different, thus it is an arbitrary function of $\lambda\quad\to\quad C=f(\lambda)$ $$u(x,t)=f(\lambda)\:e^{\lambda(t-\frac{1}{2}x)}$$ But this set of functions is not the general solution of the PDE, since any linear combination among them is also a solution: $$u(x,t)=\sum_{\forall \lambda}f(\lambda)\:e^{\lambda(t-\frac{1}{2}x)}$$
And more generally : $$u(x,t)=\int f(\lambda)\:e^{\lambda(t-\frac{1}{2}x)}d\lambda$$ where $f(\lambda)$ is an arbitrary function.
Then arises the question of boundary condition which generally is the most difficult part of the task.
If you consider only one elementary solution, such as $u=C\:e^{\lambda(t-\frac{1}{2}x)}$, with the condition $u(x,0)=e^{-x^2}=C\:e^{\lambda(-\frac{1}{2}x)}$ , it is impossible. This means that the convenient solution is not so simple and will require a linear combination of elementary solutions. $$u(x,0)=e^{-x^2}=\int f(\lambda)\:e^{\lambda(0-\frac{1}{2}x)}d\lambda =\int f(\lambda)\:e^{-\frac{1}{2}\lambda x}d\lambda $$ Then, the difficulty is to find what is the function $f(\lambda)$. We have to solve the integral equation : $$e^{-x^2}=\int f(\lambda)\:e^{-\frac{1}{2}x\lambda}d\lambda $$ This is an hard problem, which means that the method we chose (the separation of variables) is not a smart method is this particular case.
This draw us to use another method, for example the method of characteristics.
With this method, the general solution is very easy to obtain : $$u(x,t)=F(x-2t)$$ where $F$ is arbitrary.
Condition :
$$u(x,0)=e^{-x^2}=F(x-0)=F(x)$$ So, the function $F$ is determined : $F(x)=e^{-x^2}\quad\implies\quad F(x-2t)=e^{(x-2t)^2}$ $$u(x,t)=e^{(x-2t)^2}$$