
I understand how to do the bisection method and how to do it with a point of intersection.
My question is should this not actually have multiple points of intersection? and if you're not given any intervals to start with should you just make your own? And if so do you do that by drawing the graph and seeing roughly were the roots lie.
Thank you.
We can plot both ($y = x^2$ (blue) and $y = x^3-2x+1$ (magenta)) functions as:
This shows three points of intersection.
We can then set each function equal to each other and write the combined function to find the roots of (notice the cubic, hence three roots):
$$ f(x) = x^3 - x^2 - 2 x + 1 = 0$$
A plot of this shows:
We can pick three ranges, each of which contains a root, and use the Bisection Method to find that root:
Do you know why each range is guaranteed to find a root using the Bisection Method? Can you make those ranges larger? Smaller? Randomly? What about choosing the range to be $x \in [-2,2]$ (that range contains all three roots, so what happens with the algorithm)?