Semi-Infinite String equation Determine $u(x,t)$ if
$$u_{tt}=c^2u_{xx}, x<0$$
where
$$u(x,0)=\cos x,\ x<0$$
$$u_{t}(x,0)=0,\ x<0$$
$$u(0,t)=e^{-t},\ t>0$$
I know that we have to look at two cases where $x-ct<0$ and $x-ct>0$. We extend it as on odd function because $e^{-t}$ is odd. But in both cases I get the same answer that $u(x,t)=\cos(x)\cos(ct)$. And I also don't understand how we are supposed to use $u(0,t)=e^{-t}$
Thanks!
 A: Let $x=-x_1$ ,
Then $u_{tt}=c^2u_{x_1x_1}$ with conditions
$\begin{cases}u(x_1,0)=\cos x_1&x_1>0\\u_t(x_1,0)=0&x_1>0\\u(0,t)=e^{-t}&t>0\end{cases}$
According to http://eqworld.ipmnet.ru/en/solutions/lpde/lpde201.pdf,
$u(x_1,t)=\begin{cases}\dfrac{\cos (x_1+ct)+\cos(x_1-ct)}{2}&x_1>ct\\\dfrac{\cos (x_1+ct)-\cos(ct-x_1)}{2}+e^{\frac{x_1}{c}-t}&x_1<ct\end{cases}$
$u(x,t)=\begin{cases}\dfrac{\cos (x-ct)+\cos(x+ct)}{2}&x<ct\\\dfrac{\cos (x-ct)-\cos(x+ct)}{2}+e^{-\frac{x}{c}-t}&x>ct\end{cases}$
A: $\cases{u_{tt}=c^2u_{xx}, \hspace{0.5cm} x>0, \hspace{0.5cm} t>0 \\
    u(x,0) = \cos(x) = f(x) \\
     \frac{\partial u}{\partial t}(x,0) = 0 = g(x) \\
      u(0,t) = e^{-t}}$
The general solution of our PDE is: $$u(x,t) = F(x-ct)+G(x+ct)$$
We know that $$F(x) = \frac{1}{2}f(x)-\frac{1}{2c}\int_0^x g(\bar{x}) d\bar{x} \\ G(x) = \frac{1}{2}f(x)+\frac{1}{2c}\int_0^x g(\bar{x}) d\bar{x}$$ 
So we have $$F(x) = G(x) = \frac{1}{2}\cos(x) \hspace{2mm}, \hspace{2mm} x<0 $$ 
Now let us look at the boundary condition: $$u(0,t)= F(-ct)+G(ct)= e^{-t}$$
If $x<-ct$, both the arguments of F and G are negative and we have that $$u(x,t) = F(x-ct) + G(x+ct) = \frac{1}{2}\cos(x-ct)+ \frac{1}{2}\cos(x+ct) = \cos(x)\cos(ct)$$ 
If $x>-ct$, the argument of G becomes positive (while the argument of F stays negative). From the boundary condition we then find that $$G(ct) = e^{-t}-F(-ct) \hspace{2mm}, \hspace{2mm} t>0$$
If we let $z=ct$ we then obtain $$G(z) = e^{-\frac{z}{c}}-F(-z) \hspace{2mm}, \hspace{2mm} z>0$$
So for $x>-ct$ we find that the solution is 
\begin{equation}
\begin{split} 
u(x,t) &= F(x-ct)+G(x+ct) \\
&= F(x-ct)+e^{-\frac{x}{c}-t}- F(x+ct)\\
&= \frac{1}{2}\cos(x-ct)+ e^{-\frac{x}{c}-t} + \frac{1}{2}\cos(x-ct) \\
&= \sin(x)\sin(ct)+ e^{-\frac{x}{c}-t}
\end{split}
\end{equation}
In summary we have:
$$u(x,t)=
\cases{\cos(x)\cos(ct) \hspace{2cm}, \hspace{2mm} x+ct< 0\\ \sin(x)\sin(ct)+ e^{-\frac{x}{c}-t} \hspace{4mm},\hspace{2mm} x+ct>0 }$$
