What would be the example of a function for which a Secant Method fails but Bisection Method converges (to the root). In particular, if we are checking the interval $[a,b]$, then starting points for the Secant Method are $a$ and $b$.
$\begingroup$
$\endgroup$
2
-
$\begingroup$ Both methods converge. Do they not? I took starting points for the Secant Method as (0,-1) and (1,1). $\endgroup$– EkberCommented Feb 27, 2018 at 23:26
-
$\begingroup$ it is the same as (0,-1) and (1,1) (for the Secant Method). Bisection converges for sure, since the function is continuous and changes sign in the interval [0,1]. But, Secant Method converges as well, there is no reason why it shouldn't. I don't see how it diverges with these starting points. $\endgroup$– EkberCommented Feb 27, 2018 at 23:43
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
3
Try to find a continuously differentiable function with the following properties:
- $f(a)$ and $f(b)$ have opposite signs and
- $f'(\xi) = 0$ for a $\xi \in [a,b]$
The first point ensures that the bisection methods converges. Whereas if $f'(\xi)=0$, the secant method can fail. See these lecture notes (page 101) for an example.
-
-
$\begingroup$ I mean $f'(a)=0$ (or $f'(b)=0$). Functions where the derivative vanishes at the border can cause problems for the secant method. But any $f'(y)=0$ for $y \in [a,b]$ can cause problems. $\endgroup$ Commented Feb 28, 2018 at 16:03
-
$\begingroup$ Look at the figure from the lectures notes for example. There we have $f'(x_0)=0$, which in this case causes the secant method to go into the opposite direction of where the root is $\endgroup$ Commented Feb 28, 2018 at 16:07