Given a pde $$u_y+e^uu_x=0$$ $x \in \mathbb{R}$, $t>0$ with the initial conditions $$u(x,0)=f(x)=\begin{cases} 2 & x<0 \\ 1 & x>0 \end{cases}$$ Solve the pde.
My attempt so far, I find the characteristic curves for $(s,0,f(s))$ $$\frac{dy}{dt}=1$$ which gives $$y=t$$ $$\frac{du}{dt}=0$$ which gives $$u=f(s)$$ and $$\frac{dx}{dt}=e^u \implies $$ $$x=e^{f(s)}t+s$$ So $$u(x,y)=f(x-e^uy)=\begin{cases} 2 & x< e^2 t \\ 1 & x>et \end{cases}$$
Now I know that to find the time the shock forms I must find $t$ such that $$(e^u,1) \cdot (0,-e^{f(s)}f'(s)-1)=0 \implies $$ which gives $$t=\frac{1}{e^{f(s)} f'(s)}$$
But the problem is that $f(s)$ is constant on each interval so the derivative vanishes, therefore the shock time becones infinite, this is what I don't understand, how can I find the time the shock forms?