0
$\begingroup$

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 Answers 1

3

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.

  • 0
    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.2012-10-22
  • 0
    When I calculated, I got .9622504486e-1, so I'm assuming the book rounded.2012-10-22
  • 0
    But it's not equal to 1/(6$\sqrt{3}$)2012-10-22
  • 0
    It is. I edited my post with the work.2012-10-22
  • 0
    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...2012-10-22
  • 0
    Sorry, I don't understand. From what I can see, your answer is the same as the book's. You are confused what the symbol e-1 means. The only thing I can think is that you are taking e to be the constant, as in 2.71828..., but occasionally the notation e-1 means "take this number and multiply by 10 to the power -1". Often calculators use this notation so they don't have to display a long string of $0$'s. Is this your confusion?2012-10-22
  • 0
    Ohh okay, yes that's what I was confused about. I took it as the constant e. I understand what you mean. Thank you!2012-10-22