# Solving simple wave equation

This is a homework question for numerical analysis that I do not know how to find the solution to.

$\frac{du}{dt}-\frac{du}{dx}=0$

$u(x,0)=e^x$

$u(1,t)=e^{t+1}$

$0\leq x \leq1,0\leq t \leq1$

I know the solution should be of the form $u=f(x)g(t)$ but I can't find any literature that explains what to do with the boundary conditions. My teacher said I don't need to have worked with PDEs before to solve this but I am lost.

Assume a solution of the form $u(x,t) = X(x)T(t)$, you only need to deal with the BC's to get the solution. So the BC's become $$u(x,0) = X(x)T(0) = e^x$$ $$u(1,t) = X(1)T(t) = e^{t+1}$$ from these we have $$X(x) = \frac{1}{T(0)} e^x$$ and $$T(t) = \frac{1}{X(1)} e^{t+1}$$ we can write the solution as
$$u(x,t) = X(x) T(t) = \frac{1}{T(0)X(1)} e^{x+t+1}$$
To get rid of the constant in front use one of the BC's to get $$X(1)T(0) = e$$ and the solution is $$u(x,t) = \frac{1}{e}e^{x+t+1}=e^{x+t}$$