I have a problem where I have to estimate the second derivative of a function at a point using given data. I have $f(1.2)$, $f(1.3)$, and $f(1.4)$. ($h=0.1$) I need to find $f''(1.3)$, so I use the Three-point endpoint formula (which has an error term of $\frac{h^2}{3}f^{(3)}(\xi_0)$) to find $f'(1.2)$ and $f'(1.4)$, and then use these two values with the three-point midpoint formula (which has an error of $\frac{h^2}{6}f^{(3)}(\xi_i)$) to find $f''(1.3)$.

So how to I compute the overall error with the operations I've done (endpoint formula twice, midpoint formula once)? Is it additive? Multiplicative?


I am confused by your approach which can have significant errors due to the effect of roundoff error, truncation, etc.

Why wouldn't you use one of the three point formulas for the second derivative directly?

For example:

$$\tag 1 \displaystyle f''(x_0) = \frac{1}{h^2}\left[f(x_0 - h) -2 f(x_0) +f(x_0 + h)\right]-\frac{h^2}{12} f^{(4)}(\xi),$$

for some $\xi$, where $x_0 - h \lt \xi \lt x_0 + h$.

You are given $f(1.2)$, $f(1.3), f(1.4) ~~\text{and}~~ h=0.1.$

From $(1)$, we can write:

$$\displaystyle f''(1.3) = 100\left[f(1.2) -2 f(1.3) +f(1.4)\right]-\frac{1}{1200} f^{(4)}(\zeta)$$

Are you being asked to do it by finding first derivatives and then to use the second derivative approach?

  • $\begingroup$ I didn't know that was a formula for the second derivative, that's why. Let me do some work $\endgroup$
    – SSumner
    May 2 '13 at 2:58
  • $\begingroup$ @SSumner: no problem, your thoughts showed that you are thinking about using the given information. I wasn't sure if the instructor wanted you to approach it like that, but the method I show above is so much more straightforward. Let me know if you have any issues. Do you have the actual function and the given function values? That would allow users to look at more details. Regards $\endgroup$
    – Amzoti
    May 2 '13 at 3:00
  • $\begingroup$ Nice pointers! To the rescue... ;-) $\endgroup$
    – amWhy
    May 2 '13 at 3:25
  • $\begingroup$ @Amzoti - I did not read carefully enough - I found the same formula in another part of the book. Thanks for the help! $\endgroup$
    – SSumner
    May 2 '13 at 3:29
  • 1
    $\begingroup$ @SSumner: Excellent! Glad it all worked out - regards! $\endgroup$
    – Amzoti
    May 2 '13 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.