This is a home work problem. Please find the problem in the image attachment.
Problem :
Consider the one-dimensional form of Euler's equations for isentropic flow and assume that pressure $p$ is constant, so that the governing equations reduce to $\rho_t +\rho u_x + u\rho_x = 0$ and $u_t+uu_x =0$, where $u$ and $\rho$ are, respectively, the velocity and the density. Let $u(x,0)=f(x)$ and $\rho(x,0)=g(x)$. By first solving the equation for $u$ and the equation for $\rho$, obtain the implicit solution $u=f(x-ut)$ and $\rho=g(x-ut)/\big[1+tf'(x-ut)\big]$, where prime denotes differentiation with respect to the argument.
I have attempted solving this question, by the method of characteristics.
I am not able to solve the first equation, I have solved the Burgers' equation and obtained the solution $u = f (x − ut)$. but I'm not able to solve the equation for density .
My attempt :




The first part concerns the implicit solution of the IVP $u(x,0)=f(x)$ of the inviscid Burgers' equation $u_t+uu_x=0$. The method of characteristics writes
Combining all equations, we have $u=f(x_0)$ with $x_0=x-ut$, which yields the implicit equation for $u$.
The second part concerns the IVP $\rho(x,0)=g(x)$ of the conservation of mass $\rho_t+u\rho_x=-\rho u_x$. The method of characteristics shows that $\rho$ is transported along the same characteristic curves $s\mapsto (x(s),t(s))$ as $u$. Differentiating the implicit equation for $u$ w.r.t. $x$ gives $u_x = (1-tu_x)f'(x-ut)$, and thus, $u_x = f'(x_0)/\big[1+tf'(x_0)\big]$ with $x_0=x-ut$. Along the characteristics, we have
This is part 2. of Exercise 7.4 entitled "A nonstrictly hyperbolic system" in the book Numerical Methods for Conservation Laws by R.J. LeVeque (Birkhäuser, 1992). See problem statement in this post.