# Math Help - Romberg's Method and Richardson extrapolation

1. ## Romberg's Method and Richardson extrapolation

Hi. I've been having some troubles with a particular integral with Romberg's method plus Richardson's extrapolation.

The integral is: $\int_{0}^{\frac{\pi}{4}}{x^2\ sin(x)\, dx} \approx 0.08875$

And the formulas I have are:

Romberg: $R_{k,1} = \frac{1}{2}\left[R_{k-1,1} + h_{k-1}\left(\sum_{i=1}^{2^{k-2}}f\left(a+\frac{2i-1}{2} \cdot h_{k-1}\right)\right)\right]$

Where:

$a = 0$ and $b = \frac{\pi}{4}$

$R_{1,1} = \frac{b-a}{2} \cdot \left(f(a)+f(b)\right)$

$h_{k} = \frac{b-a}{2^{k-1}}$

And we do it from 0 to 3

Then Richardson to get $R_{2,2}$, $R_{3,2}$ and $R_{3,3}$

$R_{i,j} = \frac{4^{j-1}R_{i,j-1} - R_{i-1,j-1}}{4^{j-1} - 1}$

In the end, I get to $R_{3,3} = 0.0291$ a bit far from the real solution. Could it be an error from the method or something wrong with calculations? I've done it a few times but still I can't find a mistake. I'll keep trying though.

2. ## Re: Romberg's Method and Richardson extrapolation

Hi russo!

Looks to me like an error in your calculations.
Here's what I get:

Code:
R(1,1) = 0.17128
R(2,1) = 0.10881
R(3,1) = 0.09373
R(3,2) = 0.08870
R(2,2) = 0.08799
R(3,3) = 0.08875

3. ## Re: Romberg's Method and Richardson extrapolation

Thanks. I could get to those results using the formula shown on wikipedia. So I'm starting to think that I got it wrong here. I'll check on a book later. At least now I have your results as a reference haha.

Thanks again.

4. ## Re: Romberg's Method and Richardson extrapolation

Ah well, your formulas are identical to those of wikipedia, except for an offset of 1.

5. ## Re: Romberg's Method and Richardson extrapolation

Ok so I'll keep checking where is my mistake. I'm sure it's a simple detail.

EDIT: And it was. I was taking the wrong h