I need to realize the modified Newton's method to find the minimum of my function. I have a block-schema of that method:

But my task requires to I used the finite difference approximation of the derivatives to find $f'(x)$ and $f''(x)$. I am trying to get how to find the derivatives from here and here. But my math level is awful really and the first is too hard for me. From the second article I got that:
$$f'(x) \approx {f(x + h) - f(x) \over h}$$
Is it right? But what's $h$ in my case, $ε$?
How can I find $f''(x)$ from Taylor?
$$f''(x) \approx 2*({f(x + ε) - f(x) \over ε^2} - {f'(x) \over ε})$$
Am I right? The problem is that it requires $f'(x)$ but if I will put an approximation of $f'(x)$ my $f''(x)$ will be zero.
Asked
Active
Viewed 31 times
2
Denis Steinman
- 123
-
1In your flowchart, $\epsilon$ is meant to be a small number. For an exact minimum, it should be exactly zero, but you need to decide some threshold where it is close enough for your purposes. – Tyberius May 15 '18 at 01:44
-
I know that is an epsilon. I mean should I use it like $h$ in my formula? And how to find $f''(x)$ not knowing an accurate value of $f'(x)$? – Denis Steinman May 15 '18 at 01:47
-
1The h in the formulas is a step size for the numerical derivatives, so it is different from epsilon. You can try one of these formulas for the finite difference: https://en.m.wikipedia.org/wiki/Finite_difference_coefficient – Tyberius May 15 '18 at 01:51
-
@Tyberius, thank you very much! – Denis Steinman May 15 '18 at 02:49