Question: Central Difference Method - Second & Third Derivative

g := x -> x^3+x^2-3*x; h := 0.01; x := 1; yaydone := (g(x+h)-g(x-h))/(2*(h)); OK, I did some poking through my book, and it shows how to solve for the first derivative using the Central Difference method, it actually took me quite a while to get this formula going. This will solve for the first derivative using the Central Difference Method. I didn’t understand the book at first and thought I was supposed to use The Derivative of g(1+h) minus The Derivative of g(1-h). This really had me boggled. So now I am able to solve for the first derivative using the Central Difference Method My question is how to solve for the second & third derivative. My book has no examples for solving for anything other than the first derivative. Thanks so much for the help guys, I truly do appreciate it and I truly hate the book that I got to learn from I thought something like this: gxxx := diff(g(x),x$3); gxxx := diff(g(x),x$2); would work but i think I am going about it all wrong.
Please Wait...