1. ## trapezium rule question

Hi folks,

This one looks easy, but I'm not getting there.

The integral $\int_{0}^{1} e^x dx$ is approximated using the trapezium rule, dividing the range into intervals of length h = 1/n.

Show that the result is $\dfrac{(e - 1)(p + 1)}{2n (p - 1)}$ where $p = e^h$ ..................................(1)

so the ordinates are:

$$\begin{array}{llllllll} x & 0 & 1/n & 2/n & 3/n & ... & n-1/n & 1 \\ & & & & & & & \\ f(x) & 1 & e^\frac{1}{n} & e^\frac{2}{n} & e^\frac{3}{n} & ... & e^\frac{n-1}{n} & e \end{array}$$

for a range between 0 and 1 a single interval (slice) is 1/n = h

the trapezium rule is

$A = h/2 \; (y_{0} + y_{n} + 2 (y_{1} + y_{2} + y_{3} \; ... \; y_{n-1} ) )$

so

$A = 1/2n \; (1 + e + 2(e^\frac{1}{n} + e^\frac{2}{n} + e^\frac{3}{n} + \; ... \; + e^\frac{n-1}{n}) )$

there are n - 1 terms in the series (after the 2).

Since $a \frac{m}{n} = \sqrt[n] {a^m}$ where a, m and n are constants.

$A = 1/2n \; (1 + e + 2e^\frac{1}{n} (e + e^2 + e^3 + ... + e^{n-1} ) )$ .....................................(2)

so, we have a geometric progression with n - 1 terms. The sum of this series is given by $S_{n} = b \frac{r^n - 1}{r - 1}$ for $r \ge 1$. Where b is the first term and r the common ratio.
In our case b = e and r = e.

$S_{n} - S_{n - 1} = b. r^{n - 1} = e^n$

so

$S_{n-1} = \dfrac{e(e^n - 1)}{e - 1} - e^n = \dfrac {e^n - e}{e - 1}$

put this back into (2)

$A = 1/2n \; (1 + e + 2 e^\frac{1}{n} \frac {e^n - e}{e - 1} )$ and we have $p = e^h = e^\frac{1}{n}$

Now, I was hoping some straightforward algebra would get me to (1) but I cannot get this into the form required.

Can anyone help?

2. ## Re: trapezium rule question

$\displaystyle A=\frac{1}{2n}\left(1+e+2\left(e^{1/n}+e^{2/n}+\text{...}+e^{(n-1)/n}\right)\right)$

replace $\displaystyle p=e^{1/n}$ to get

$\displaystyle A=\frac{1}{2n}\left(1+e+2\sum _{k=1}^{n-1} p^k\right)$

use the geometric sequence sum formula and note that $\displaystyle p^n=e$

3. ## Re: trapezium rule question

That's pretty well what I was doing.

Have I got sequence sum correct? $\dfrac{e^n - e}{e - 1}$?

I end up with $\dfrac{e^2 - 1 + 2(e^n - p^n)}{e - 1}$ which is nothing like equation (1)

4. ## Re: trapezium rule question

Originally Posted by s_ingram
That's pretty well what I was doing.

Have I got sequence sum correct? $\dfrac{e^n - e}{e - 1}$?

I end up with $\dfrac{e^2 - 1 + 2(e^n - p^n)}{e - 1}$ which is nothing like equation (1)
$e^{1/n}+e^{2/n}+\cdots +e^{(n-1)/n} \neq e^{1/n}\left(e+e^2+\cdots +e^{n-1}\right)$

Factoring is subtraction in the exponents, not division. That is why Idea recommended that you use $p=e^{1/n}$ instead.

\displaystyle \begin{align*}\dfrac{1}{2n}\left(1+e+2\sum_{k=1}^{ n-1}p^k\right) & = \dfrac{1}{2n}\left(1+e+2p\sum_{k=0}^{n-2}p^k\right) \\ & = \dfrac{1}{2n}\left(1+e+2p\dfrac{p^{n-1}-1}{p-1}\right) \\ & = \dfrac{1}{2n}\left(\dfrac{(1+e)(p-1)+2(e-p)}{p-1}\right) \\ & = \dfrac{1}{2n}\left( \dfrac{p+ep-e-1+2e-2p}{p-1} \right) \\ & = \dfrac{1}{2n}\left( \dfrac{(e-1)(1+p)}{p-1}\right)\end{align*}

Just as you want.

5. ## Re: trapezium rule question

many thanks.
The error was, as you say, me thinking $e^\frac{5}{3} = e^\frac{1}{3}.e^5$ In my post I even quoted the reason I thought this was true. But $e^\frac{5}{3} = (e^\frac{1}{3})^5$ is not the same thing. When I saw Idea's post, I thought I was doing what he said! Glad that's sorted.