Suppose we are looking at the non-linear system $u_t+uu_x=0$. Some of the waves from this system are drawn below where I included $a$ and $b$ as interval-bounds around where the most happens. There is a vertical green line drawn at some point of the shock wave such that the area in yellow and orange are equal, this line is called $\sigma(t)$. The three points where $\sigma(t)$ intersects $u(t,x)$ are $u_+(t),u_0(t)$ and $u_-(t)$ from up to down respectively.
We define $$M(t)=M_{a,b}(t)=\int_a^bu(t,x)dx,$$ the area enclosed by the shock wave, the $t$-axis and the vertival lines $x=a$ and $x=b$; from this $M(t)$ we have already derived a law that $$\frac{dM}{dt}=\frac{1}{2}\left(u(t,a)^2-u(t,b)^2\right).$$ We also now define $u(0,x)=f(x)$ and $x=X(t,u)=g(u)+tu$, so $X(0,u)=g(u)$ (and $u=u(t,x)$). The goal is to show that the following expression for $M(t)$ also satisfies the law for $\frac{dM}{dt}$ as written above:
$$M(t)=\int_{u(t,b)}^{u(t,a)}\left(X(t,u)-a\right)du+(b-a)u(t,b).$$
I find this latter expression for $M$ very disturbing and do not know exactly how to differentiate this w.r.t. $t$. The Leibniz integral rule would probably be the way to go, but I do not see how we could get $\frac{dM}{dt}=\frac{1}{2}\left(u(t,a)^2-u(t,b)^2\right)$ out of this. My problem is that there is a $du$ after the integral and the Leibniz rule is for $\frac{d}{dx}\int u(x,t) dt$ or something. Suggestions and hints for a proper approach to this is very much appreciated. Thanks for the time and help!
I tried, but failed miserably: $$\frac{d}{dt}\int_{u(t,b)}^{u(t,a)}\left(X(t,u)-a\right)du+(b-a)u(t,b)=\int_{\frac{du(t,b)}{dt}}^{\frac{du(t,a)}{dt}}\frac{dX(t,u)}{dt}\frac{du}{dt}+(b-a)\frac{du(t,b)}{dt}?$$ Edit:(why did I not use chain rule anywhere? I have no idea how to properly differentiate this integral.)