I understand how the Bisection method works: you take an interval and test the end-points and the mid-point. Somewhere in those intervals, there will be a root. You keep swapping the mid-points and end-points to accurately choose the interval with the root, and you repeat (very close to binary search trees).
I'm trying to find the root of:
$$ f(x) = \sqrt{x} - cos(x) $$
On the interval $ [0,1] $
I'm not sure how to approach this as it is the first time I've used the Bisection method. I attempted doing:
$$ a=0 ~~;~~ b=1 ~~;~~ c=0.5 $$
And finding which interval to choose, then:
$$ a=0.5 ~~;~~ b=1 ~~;~~ c=0.75 $$
There has to be a better way of doing it other than manually and plugging into the function after every iteration.