Hi all,

I'm inquiring as to the steps involved in determining head loss equation from following kinetic energy work done equality.
\frac{d}{dt} ( \frac{1}{2} LU^2) = - \frac{1}{2} \ n C D L U^3

I'm looking for the methodology to determine the velocity U as a function of x, the distance traveled. the following chain rule relation is used
\frac{du}{dx} = \frac{1}{U} \frac{dU}{dt}

Integrating with respect to x yields the following equality
\frac{U}{U_0} = exp(- \frac{n C D x}{2})

Can anyone help me with the steps involved in going from the first equation to the final equality