PDE - Method of characteristics and shock waves
Solution 1:
This looks correct. Using $u = e^{-at}f(s)$ we can write the solution in implicit form $$ u = e^{-at}\, f\!\left(x - \frac{e^{at}-1}{at} ut\right) . $$ Thus,
- where $f(s) = 0$ we know $u=0$ for $s=x>1$;
- where $f(s) = 1$ we know $u=e^{-at}$ for $s=x-\frac{1-e^{-at}}{a} < 0$;
- between the curves $x=1$ and $x = \frac{1-e^{-at}}{a}$, we have $$ u = e^{-at}\left[ 1 - \left(x - \frac{e^{at}-1}{at} ut\right) \right] $$ which gives us an explicit expression $$ u = e^{-at}\frac{1-x}{1-\frac{1-e^{-at}}{a}}, \qquad \tfrac{1-e^{-at}}{a} < x < 1 $$ upon solving with respect to $u$.
Now ask yourself where this piecewise solution is well-defined (sub-domain bounds, vanishing denominator, etc.). You will find useful complements for other $f$ in this post.