# trapezoid rule

• Jun 29th 2008, 07:12 PM
chukie
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.
• Jun 29th 2008, 11:03 PM
CaptainBlack
Quote:

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:

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

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

RonL
• Jun 29th 2008, 11:05 PM
chukie
Quote:

Originally Posted by CaptainBlack
The average current speed is:

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

where $\displaystyle T$ is the total duration, and in this case is $\displaystyle 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?
• Jun 30th 2008, 12:00 AM
Reckoner
Quote:

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?

$\displaystyle 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 $\displaystyle b - a$) or else your units won't line up correctly.
• Jun 30th 2008, 12:02 AM
chukie
Quote:

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

$\displaystyle 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 $\displaystyle 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
• Jun 30th 2008, 12:11 AM
Reckoner
Quote:

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

$\displaystyle \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

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

and dividing by $\displaystyle \frac23$ we get an average velocity of $\displaystyle 20\text{ mi/hr}$, which seems about right to me.
• Jun 30th 2008, 12:32 AM
chukie
Quote:

Originally Posted by Reckoner
What are you doing?

The trapezoidal rule is

$\displaystyle \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

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

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

oops! sorry, i completely left out the (b-a)/2n!!
• Jun 30th 2008, 01:46 AM
CaptainBlack
Quote:

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 $\displaystyle 20$ mph, so the integral over $\displaystyle 40$ mins is ~$\displaystyle 20 \times 40$, and dividing by $\displaystyle 40$ gives a mean ~$\displaystyle 20$ mph, there is no problem of units.

Applying the trapesiaum rule gives for the integral:

$\displaystyle 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 $\displaystyle 40$ to get $\displaystyle 20$mph

RonL