I'm working on some ecological data that uses the following equation to calculate volume (V) of timber logs in cubic metres per hectare based on surveys along a transect.
$$ V=\frac{\pi^2\Sigma d^2}{8L}$$
where L is length of transect, and d is diameter of the log.
My question is do square all the individual diameters, then add them, then add $\pi^2$ or do I sum all diameters, square them, then add $\pi^2$?
Bonus points for explanations! Thanks in advance.
Remember the order of operations:
parentheses
exponents
multiplication and division from left to right, with multiplication and division (which is multiplication by the multiplicative inverse of the divisor) taking equal precedence
addition and subtraction from left to right, with addition and subtraction (which is addition of the additive inverse of the subtrahend) also taking equal precedence
The summation symbol acts like a set of parentheses, so we do what is inside first. Recall that
$$\sum_{k = 1}^n a_k = a_1 + a_2 + \cdots + a_n$$
In your example, $a_k = d_k^2$, so we obtain
$$\sum_{k = 1}^n d_k^2 = d_1^2 + d_2^2 + \cdots + d_n^2$$
Since exponentiation takes precedence over addition, we first square each $d_k$, then add. If we wanted to represent the square of the sum, we would instead write
$$(d_1 + d_2 + \cdots + d_n)^2 = \left(\sum_{k = 1}^n d_k\right)^2$$
Once we have performed the addition, we have a product of three factors:
\begin{align*} \frac{\pi^2\sum_{k = 1}^n d_k^2}{8L} & = \pi^2 \cdot \sum_{k = 1}^n d_k^2 \cdot \frac{1}{8L} && \text{since division is multiplication by the reciprocal}\\ & = \pi^2 \cdot \frac{1}{8L} \cdot \sum_{k = 1}^n d_k^2 && \text{since multiplication is commutative}\\ & = \frac{\pi^2}{8L}\sum_{k = 1}^n d_k^2 && \text{multiply from left to right} \end{align*}
In answer to your question, we first square each $d_k$, add the squares, then multiply the sum by $\pi^2$, and divide the result by $8L$. Note that multiplying by $\pi^2$, then dividing by $8L$ is equivalent to multiplying by $\dfrac{\pi^2}{8L}$.