Finding the second derivative using central difference formula

Thread moved from the technical forums, so no Homework Help Template is shown.

1. The problem statement, all variables and given/known data
Develop aprogram that will determine the second derivative of pi(16 x^2 - y^4) at y=2 with step sizes of 0.1, 0.01, 0.001…. until the absolute error (numerical-analytical) converges to 0.00001. Use the 2nd order Central Difference Formula.
User Input: y, tolerance
Output: h, second derivative, error

When I input 0.00001 (tolerance) and 2 (y) into the program I created, the program crashes but it got the values of h, f`` right and also some values for the error. I do know what to change.
Thank you.

Staff: Mentor

his (or her) function as object of study is ##\ \pi(16x^2-x^4)\ ##. The second derivative at ##x=2## is ##-16\pi##

Ah So there was a typo in the original (no y in the expression) and the function was meant to be ##f(x) = \pi(16x^2-x^4)##. Thanks for the clarification. My mind was going places like implicit differentiation...