I'm stuck one problem for bisection method.
In my function;
f(-4)= 120
f(3) = -6
So with this number can i take -4 as a lower bound, 3 as a upper bound despite f(-4)>f(3)?
I'm stuck one problem for bisection method.
In my function;
f(-4)= 120
f(3) = -6
So with this number can i take -4 as a lower bound, 3 as a upper bound despite f(-4)>f(3)?
Copyright © 2021 JogjaFile Inc.
Yes, this is how bisection will look for any function that is decreasing over a simple zero. By "lower bound", we mean a lower bound in the domain (not the range), so if $f =f(x)$ then the only restriction we must enforce is that $$x_{\text{lower}}<x_{\text{upper}}\text{ .}$$
If $x^*$ is the result of your bisection iteration, then the fact that $f(x_{\text{lower}})>f(x_{\text{upper}})$ means that you will update $x_{\text{lower}} \leftarrow x^*$ when $x^*>0$ and $x_{\text{upper}} \leftarrow x^*$ when $x^*<0$.