Error in quadratic interpolation to $f(x)=1/x$?

This is the question: What is the error in quadratic interpolation to $f(x)=1/x$, using equally spaced nodes on the interval $[1/2,1]$?

I used this $|f(x)-p_2(x)|\le1/(9\sqrt{3} )h^3 \max|f'''(t)|$ where $x_0 \le t\le x_2$

so, $f'''(x)= -6x^{-4}$.

So $\max|f'''(t)|= 6(1/2)^{-4} = 6\cdot2^4 = 96$

$|f(x)-p_2(x)|\le 1/(9 \sqrt{3} )h^3 (96)$

But the answer in the book is $|1/x-p_2| \le 1/(6\sqrt{3} ) = 0.9622504490\cdot10^{-1}$

I don't understand the answer they gave, can anyone please explain? And what did I do wrong in my solution?

Thanks.

-

1 Answer

Plug in $.25$ for $h$, since the step size $h = .25$. I think your answer is the same as theirs.

Start with

$\frac {1}{9\sqrt 3} h^3 96$

plug in .25, which is $1/2^2$, for h.

$\frac {1}{9\sqrt 3} (1/2^2)^3 96$

rewrite 96 as 3*2^5 to do some cancellation, and rewrite the power of 1/2, rewrite 9 as 3^2

$\frac {1}{3^2\sqrt 3} \frac {1}{2^6} \times 3 \times2^5$

So, we have a bunch of cancellation we can do. And we are left with

$\frac {1}{3\sqrt 3} \frac {1}{2}$

which is

$\frac {1}{6\sqrt 3}$

the same as the book's answer.

-
Okay, yeah you're correct, I guess I messed up with the step size, thanks! In the book it say it's equivalent to .9622504490e-1, do you think that's a typo? Because it doesn't come out the same when calculated. – Alti Oct 22 '12 at 3:08
When I calculated, I got .9622504486e-1, so I'm assuming the book rounded. – Tyler Brabham Oct 22 '12 at 3:14
But it's not equal to 1/(6$\sqrt{3}$) – Alti Oct 22 '12 at 3:21
It is. I edited my post with the work. – Tyler Brabham Oct 22 '12 at 3:31
Thanks, I understand that part, but I'm confused as to why the answer has "e-1" at the end? Maybe it's obvious, but i'm looking at it incorrectly... – Alti Oct 22 '12 at 3:44