Roots of the function $f(x) = \frac{x}{2} - \sin x + \frac{\pi}{6} - \frac{\sqrt{3}}{2}=0$ using bisection method.

389 Views Asked by At

Suppose we wish to compute the zeros of the function $f(x) = \frac{x}{2} - \sin x + \frac{\pi}{6} - \frac{\sqrt{3}}{2}=0$, which has exactly two roots in the interval $[-\pi,\pi]$.

Is it possible to apply the bisection method to compute both roots? Why? For the root(s) which can be found by bisection, estimate the number of iterations necessary to compute the root(s) to a relative accuracy tol = $10^{-10}$, having chosen a suitable starting interval.

I'm guessing that for the first part of the question I have to use the conditions for the bisection method (that $f$ has to be continuous on an interval $[a,b]$ and that $f(a)f(b) \leq0$) and check if both roots satisfy them or not (obviously one of the roots satisfies them and the other does not) but I'm not sure how to write this out formally.

So for the first root, it lies in the interval [-2,0] while the second root lies in the interval [2,3]. I can see that for the first root f(-2)<0 and f(0)<0 which means that f(-2)f(0)>0 and so it does not satisfy the condition for the bisection method. Is this sufficient in answering the first part of the question?

The graph of the function

1

There are 1 best solutions below

0
On

As mentioned in the comments, checking $[-2,0]$ is not enough to say bisection cannot be used to find the left root. Are there points closer to the root where $f$ changes sign? Graphically, you could say this is not the case.

To show $f$ never changes signs, you want to show that its maximum is $0$. This local maximum can be found by finding the root of the derivative (in fact the bracket $[-2,0]$ will work for this). A number of technical details are needed, but you can also show this is the only local maxima for $x\le0$. If the local maximum is found analytically, then you have a formal proof that $f(x)\le0$. If you use a root-finding or optimization algorithm to find the local maximum, then you have a heuristic that $f(x)\le0$.