# Weighted average

1. Oct 30, 2007

### natski

Consider a velocity which is a function of position r, which does not vary linearly with time.

Consider a body moving with this varying velocity between distance r1 to r2.

Let us define the average velocity between r1 and r2 as (r2-r1)/time taken to travel between r2 and r1.

I assumed the average would be found by:

Integral[ v(r) dr {r2, r1}] / Integral [dr {r2, r1}]

But this formula does not seem to work. Are there any special cases where this formula is not sufficient?

Last edited: Oct 30, 2007
2. Oct 30, 2007

### Meir Achuz

You need the integral over time to get the average velocity.

3. Oct 30, 2007

### natski

But time is a function of position, so there does not seem any reason why one could not use the position as an equivalent weight?

So you suggest:

Integral[v dt] / Integral[dt]

But
r(t) => dr/dt = 1/f'
=> dt = f' dr

Hence one could write Integral[v f' dr] / Integral[f' dr]

But dr/dt = v
hence f' = 1/v
=> vbar = Integral[dr] / Integral[dr /v]

Last edited: Oct 30, 2007
4. Oct 30, 2007

### Shooting Star

The two integrals (1) and (2) are identical. Sorry, I don't get your point now...?

5. Oct 31, 2007

### natski

Well Meir felt you couldn't take the weighted average by integrating over position, but I am trying to prove that you can by virtue of the fact that his suggestion, of integrating over time, can be written as an integral over position.

6. Oct 31, 2007

### learningphysics

Ok. But Meir was responding to this in your original post:

"Integral[ v(r) dr {r2, r1}] / Integral [dr {r2, r1}]"

which is not going to give average velocity.

But "vbar = Integral[dr] / Integral[dr /v]" in your 3rd post will give average velocity.