I have encountered a piece of code that performs a physics simulation of a moving projectile. I'm trying to understand what the mathematical basis is for a bit that looks like this:
$$ d_1 = f(x) $$ $$ d_2 = f(x + \frac{d_1}{2}) $$ $$ d_3 = f(x + \frac{d_2}{2}) $$ $$ d_4 = f(x + d_3) $$ $$ d = \frac{d_1 + 2 \cdot d_2 + 2 \cdot d_3 + d_4}{6} $$
What is the name of this mathematical concept? It's obviously some sort of weighted average. The code uses real-world measured values, so it might be related to probability. This type of thing is hard to Google.