Test the secant method on an example in which $r$, $f'(r)$ and $f''(r)$ are known in advance. Monitor the ratios $e_{n+1}/(e_n e_{n-1})$ to see whether they converge to $- \frac{1}{2} f"(r) / f'(r)$.
$f(x) = \arctan(x)$ might be a suitable function.
$f'(x) = \frac{1}{x^2 + 1}$
$f"(x) = -\frac{2x}{(x^2+1)^2}$
example f =inline('sqrt(x)-cos(x)'); p0=1; p1=2; for i=0:50 if abs(p1-p0)<0.000001 break end
F_of_p=f(p); end p F_of_p %f(p) i %number of iteration