Traffic in a tunnel. A rather realistic model for the car speed in a very long tunnel is the following:
$$ v(\rho)=\left\{\begin{matrix} v_m & 0 \leq \rho \leq \rho_c\\ \lambda log(\frac{\rho_m}{\rho}) & \rho_c \leq \rho \leq \rho_m \end{matrix}\right.$$
where $ \lambda =\frac{v_m}{log(\rho_m / \rho_c)}.$
Observe that $v$ is continuous also at $$\rho_c=\rho_m e^{-v_m /\lambda},$$
which represents a critical density: if $\rho \leq \rho_c$ the drivers are free to reach the speed limit. Typical values are: $\rho_c=7car/Km$, $v_m=90 Km/h$, $\rho_m=110 car/Km$, $v_m/\lambda=2.75.$ Assume the entrance is placed at $x=0$ that the cars are waiting (with maximum density) the tunnel to open to the traffic at time $t=0$. Thus, the initial density is $$\rho=\begin{cases} \rho _m& \text{ if } x<0 \\ 0 & \text{ if } x>0 \end{cases}$$
a. Determine density and car speed; draw their graphs.
b. Determine and draw in the $x$, $t$ plane the trajectory of a car initially at $x = x_0 < 0$,and compute the time it takes to enter the tunnel.
I really don't know where to start, my procedure to find density is using the characteristics method, first reformulating the initial condition as
$$g_\epsilon(x_0)= \begin{cases} \rho _m& x_0<0 \\ \rho_m(1-\frac{x_0}{\epsilon}) & 0<x_0<\epsilon\\ 0 & x_0>0 \end{cases}$$
then, using the conservation of matter equation $ \rho_t + q (\rho) _x = 0$ with $q (\rho) = v (\rho) \rho $ replace the value of $ v (\rho) $ that gives the exercise in $ q (\rho) $, however I don't know very well how the function is defined in pieces. Then my idea is to evaluate $ g_\epsilon (x_0) $ in $ q (\rho) $ but since I have not defined the function well by parts I do not know how to replace. thanks!!
This exercise is in the book named Partial Differential Equation in Action of Sandro Salsa, third edition, Page. 253 - exercise 4.6