I am given the following question.
Given a river of width 10 meters. Let $d(x)=x(10-x)/25$ give the depth of the river in meters, and $v(x)=x(10-x)/100$ give the velocity in meters per second, at position $x\in[0,10]$. Calculate the flow of the river in meters cubed per second.
My intuition tells me that
$$\text{flow}=\text{cross-sectional area}\times\text{average velocity}.$$
So I would compute the flow as follows
$$ \text{average velocity}=\frac{1}{10-0}\int_{0}^{10}v(x)dx=\frac{1}{6}.\\ $$ $$ \begin{align} \text{cross-sectional area}=\int_0^{10}d(x)dx=\frac{20}{3}. \end{align} $$ $$ \text{flow}=\frac{1}{6}\frac{20}{3}=\frac{10}{9}. $$
However, others have suggested that the flow may actually be given by
$$ \text{flow}=\int_0^{10}d(x)v(x)dx=\frac{4}{3}. $$
Both methods, at first glance, seem somewhat plausible to me, and so I am at a loss as to which method is correct or which method is best. Ideally a correct answer would explain why one (or both!) of these methods are incorrect, or if anything is missing from the problem itself.
The first method is incorrect, because your notion of the 'average' velocity is incorrect: the river is both deeper and faster-moving in the middle, so if you assume the velocity is the same everywhere as you did in the first method, you will calculate the flow rate to be slower in the middle and faster on the outside (than they should be), but the latter fails to sufficiently compensate for the former.
In a simpler numerical example: Say you have two masses A and B that weight 100N and 200N respectively. You move mass A 1 meters, and mass B 2 meters. The (correct) total work you have done is $(100 \times 1) + (200 \times 2) = 500\mathrm{Nm}$. But what you have done in your first method is $(100 + 200) \times \frac{1 + 2}{2} = 450\mathrm{Nm}$.
Thus the second method is correct: you are taking the sum (an integral) over the different values of $x$ (which the depth and velocity depend on, which therefore gives a different flow rate).