So I'm working on the following problem. When given an initial density of:
\begin{equation} \rho(x,0)= \begin{cases} \frac{\rho_{max}}{4}, & x<0\\ \rho_{max}, & 0 < x <x_0 \\ \frac{\rho_{max}}{3}, & x > x_0 \end{cases} \\ \text{with the standard traffic wave equation being:}\\ \partial{\rho}_t +c(\rho)\partial{\rho}_x = 0 \end{equation} I am told to assume a standard linear relationship, that is: \begin{equation} v(\rho) = v_0\frac{\rho_{max} - \rho}{\rho_{max}}\\ \text{Which implies:}\\ c(\rho) = v_0\frac{\rho_{max} - 2\rho}{\rho_{max}} \end{equation}
I am also aware that when $x = 0$ we have $c(\rho) = x/t$ (this is from the characteristic curves being $X(t) = x_0+c(\rho_0(x_0))t$ ). Rearranging this gives me: \begin{equation} \rho = \frac{\rho_{max}}{2}(1-\frac{x}{v_0t}) \end{equation} The bit I am stuck on is how do I use the information from the initial conditions to find a formula for the density that is valid for short times? I have looked at each individual case for the piecewise function and I'm not left with a density function, but I do have a suspicion that the $\rho_{max}$ terms will cause some interesting simplification.
I assume once I have this formula I could deduce when the solution is no longer valid too?
Edit: fixed the standard traffic wave equation.
I'm also adding the derivation for $v(\rho)$ to $c(\rho)$
If we start with: \begin{equation} \partial{\rho}_t +\partial{q}_x = 0\\ \text{Where}\\ \rho(x,t): \text{car density}\\ v(\rho): \text{car velocity}\\ q(x,t) = \rho v: \text{car flow rate}\\ \end{equation} We can make some smart substitutions to get: \begin{align} \partial{\rho}_t +\partial{q}_x &= 0\\ &= \partial{\rho}_t +\partial{(v(\rho)\rho)}_x\\ &=\partial{\rho}_t +(v'(\rho)\rho +v(\rho))\partial{\rho}_x \end{align} Then $c(\rho)=v'(\rho)\rho +v(\rho)$ which is the kinematic wave speed.
When we substitute $v(\rho)$ into the above relation, we get \begin{equation} c(\rho) = v_0\frac{\rho_{max} - 2\rho}{\rho_{max}} \end{equation}