# Math Help - trapezoid rule

1. ## trapezoid rule

Ocean currents (miles/hr) at a certain location are given below

Time of day: Speed mph:
8:00 am 17
8:10 am 20
8:20 am 22
8:30 am 21
8:40 am 17

How can I estimate the average river current speed from 8:00 am to 8:40 am using the trapezoidal rule? I tried but I got a huge number.

2. Originally Posted by chukie
Ocean currents (miles/hr) at a certain location are given below

Time of day: Speed mph:
8:00 am 17
8:10 am 20
8:20 am 22
8:30 am 21
8:40 am 17

How can I estimate the average river current speed from 8:00 am to 8:40 am using the trapezoidal rule? I tried but I got a huge number.
The average current speed is:

$\bar{v}=\left(\int_{t=8:00}^{t=8:40}v(t) \; dt\right)/T$,

where $T$ is the total duration, and in this case is $40$ minutes. Now use the trapezoid rule to estimate the integral

RonL

3. Originally Posted by CaptainBlack
The average current speed is:

$\bar{v}=\left(\int_{t=8:00}^{t=8:40}v(t) \; dt\right)/T$,

where $T$ is the total duration, and in this case is $40$ minutes. Now use the trapezoid rule to estimate the integral

RonL
But the speed is miles per hour. If I just divide by 40, I get an answer of 4, which is too small?

4. Originally Posted by chukie
But the speed is miles per hour. If I just divide by 40, I get an answer of 4, which is too small?
So do some unit conversion. What's the trouble?

$40\text{ min} = 40\text{ min}\left(\frac{1\text{ hr}}{60\text{ min}}\right) = \frac23\text{ hr}$

Just make sure you use this value when applying the trapezoidal rule (for $b - a$) or else your units won't line up correctly.

5. Originally Posted by Reckoner
So do some unit conversion. What's the trouble?

$40\text{ min} = 40\text{ min}\left(\frac{1\text{ hr}}{60\text{ min}}\right) = \frac23\text{ hr}$

Just make sure you use this value when applying the trapezoidal rule (for $b - a$) or else your units won't line up correctly.
I tried that too, but then the answer becomes 240, which is too big?
(1/(2/3))(17+40+44+42+17)=240

6. Originally Posted by chukie
I tried that too, but then the answer becomes 240, which is too big?
(1/(2/3))(17+40+44+42+17)=240
What are you doing?

The trapezoidal rule is

$\int_a^b f(x)\,dx\approx\frac{b-a}{2n}\left[f(x_0) + 2f(x_1) + 2f(x_2) + \cdots + 2f(x_{n-1}) + f(x_n)\right]$

Substituting the appropriate values, this gives us

$\frac{\left(\frac23\right)}{\left(2\cdot4\right)}\ left(17+40+44+42+17\right) = \frac{40}3$

and dividing by $\frac23$ we get an average velocity of $20\text{ mi/hr}$, which seems about right to me.

7. Originally Posted by Reckoner
What are you doing?

The trapezoidal rule is

$\int_a^b f(x)\,dx\approx\frac{b-a}{2n}\left[f(x_0) + 2f(x_1) + 2f(x_2) + \cdots + 2f(x_{n-1}) + f(x_n)\right]$

Substituting the appropriate values, this gives us

$\frac{\left(\frac23\right)}{\left(2\cdot4\right)}\ left(17+40+44+42+17\right) = \frac{40}3$

and dividing by $\frac23$ we get an average velocity of $20\text{ mi/hr}$, which seems about right to me.
oops! sorry, i completely left out the (b-a)/2n!!

8. Originally Posted by chukie
But the speed is miles per hour. If I just divide by 40, I get an answer of 4, which is too small?
The units are unimportant, the integrand is of the order of $20$ mph, so the integral over $40$ mins is ~ $20 \times 40$, and dividing by $40$ gives a mean ~ $20$ mph, there is no problem of units.

Applying the trapesiaum rule gives for the integral:

$I \approx \frac{40}{2 \times 4}(17+2 \times 20+2 \times 22+2 \times 21 +17) = 800$

So to get the average speed we divide the integral by $40$ to get $20$mph

RonL