I am trying to make some derivations of open channel flow equations. And the problem is, I quite don't get some of the operations that are given in books on the following subject. For example:
$Q=Q(x)$
$A=A(x)$
$U(x)=Q/A$
$g=9.81$
$\frac{1}{gA} \frac{d}{dx}(\frac{Q^2}{A})=\frac{1}{g} \frac{Q}{A} \frac{d}{dx}(\frac{Q}{A})=\frac{d}{dx}(\frac{U^2}{2g})$
In the example above: If the Q and A are dependent on x, can I simply move Q out of the d/dx?? Just like that?
Regards