One-way wave equation IBVP Plese help me to find the solution of te following equation.

For values of $x$ in the interval $[-2,3]$ and $t>0$ we consider the one way wave equation $$u_t+u_x=0$$
  with initial data \begin{align*}
u(0,x)= \left\{\begin{array}{ll}1-|x|\;\; \text{if}\; 0\le |x|\le 1\\0\;\;\;\text{otherwise} \end{array}
\right.\end{align*}
  and boundary data $u(t,-2)=0.$ 

I tried to use the method of characteristics in the following way:
$\frac{dx}{ds}=1$ and $\frac{dt}{ds}=1$
but i didn't manage to find the solution.
Please help me to do so. Thanks 
 A: I guess that a graphical answer is more in the spirit of this exercise. By using the method of characteristics, we find the set of curves $x = t + x_0$ along which $u$ is constant. These curves are represented in the $x$-$t$ plane below:

The boundary is represented by the thick black line. All curves starting on the boundary carry the value $u=0$, besides the curves in the red area defined by $-1\leq x-t \leq 1$ which carry the value $1 - |x-t|$. Therefore the solution for $x \in [-2,3]$, $t>0$ reads
$$
u(x,t) = \left\lbrace
\begin{aligned}
&1 - |x-t| && \text{if}\quad {-1}+t\leq x \leq 1+t,\quad (0\leq t\leq 4) \\
&0 && \text{otherwise}
\end{aligned}\right.
$$
A: The correct method of characteristics, follows as :
$$\frac{\mathrm{d}t}{1} = \frac{\mathrm{d}x}{1} = \frac{\mathrm{d}u}{0}$$
Now, the first characteristic curve is given as :
$$\mathrm{d}t = \mathrm{d}x \implies u_1 = x-t$$
Note that the solution for the second one, is trivial, as :
$$\frac{\mathrm{d}u}{0} = \text{(something)} \implies u_2 = u$$
Now, the general solution shall be given as a $C^1$ function $F$, such that :
$$u_2=F(u_1) \Leftrightarrow u = F(x-t) \equiv u(x,t)$$
That's straighforward and doable since $u_2 = u \equiv u(x,t)$.
By applying the initial conditions given, are you now able to form the solution for the given IVP ?
A: If $\nabla u =(u_t,u_x)$, the equation says $u_t+u_x=0$ becomes $\nabla u \cdot (1,1) = 0$. In other words, the directional derivative of $u$ in the direction of $(1,1)$ is zero, meaning that $u$ is constant along this line. Solving $$\frac{{\rm d}x}{{\rm d}t} = \frac{1}{1}=1 \implies x = t+c,$$or equivalently, $t = x-c$. We can find the value of $u(x-c, x)$ by moving along the characteristic curve, choosing values for $x$ and doing $$u(t,x) = u(x-c, x) = u(0,c) = \begin{cases} 1-|c|, \mbox{ if } |c| \leq 1, \\ 0, \mbox{ else}.\end{cases}$$Solving for $c$, we get $c = x-t$, so $$u(t,x) = \begin{cases} 1-|x-t|, \mbox{ if } |x-t| \leq 1, \\ 0, \mbox{ else}.\end{cases}$$Now, in particular you have $$u(t,-2) =\begin{cases} 1-|t+2|, \mbox{ if } |t+2| \leq 1, \\ 0, \mbox{ else}.\end{cases}$$But $|t+2|\leq 1$ is equivalent to $-3 \leq t \leq -1$, which never happens since you're assuming $t>0$. Then we conclude that $u(t,-2) = 0$ as wanted.
A: The initial data and boundary data for the PDE together form initial data for the characteristic equations, prescribed on an "L" shaped curve, infinite upwards that we shall call $L$. Since the equation is $\binom{1}{1} \cdot \nabla u  = 0$ and $\binom{1}{1}$ is never tangent to $L$, this means that $L$ is non-characteristic, so the method of characteristics will work.
Let's parameterise $L$ as
$$ L: (-\infty,3] \to \mathbb R^2, $$
$$ L(z) = \begin{cases} \binom{0}{z} & z\in[-2,3] \\ \binom{-(z+2)}{-2} & z\le -2\end{cases}$$
So combining the "initial data" and the "boundary data" we obtain the equivalent data for $z\in(-\infty,3]$,
$$ u(L(z)) = b(z) := \begin{cases} 1-|z| & |z|\le 1 \\ 0 & |z|>1\end{cases}$$ 
The characteristic equations are
$$ \partial_s \binom{t}{x} = \binom{1}{1} ,\quad  \binom{t(0,z)}{x(0,z)} = L(z),$$
$$ \partial_s y = 0, \quad y(0,z) = b(z)$$
and the solution is given by
$$ u(t(s,z),x(s,z) ) = y(s,z)$$
The setup is done and the rest is mechanical work.
