At the left endpoint . If , the endpoint is exactly a root and the function above immediately returns . For , , so the first midpoint is .
If , then and . The first retained bracket is , containing only the root zero, so the iterates converge to zero. If , the first midpoint is exactly the root one and is returned. If , then and . The retained bracket is , containing only the root two, so the iterates converge to two. HenceThis illustrates root selection by bisection with multiple roots in the initial bracket: bisection guarantees a root, but which root it chooses depends discontinuously on the starting endpoint.
Articles by others on the same topic
There are currently no matching articles.