Consider the function: f(x) = (1/2)|x|
Can we use bisection search to find one of its roots? Why or why not? Can we use Newton’s method to find one of its roots? Why or why not?
I do not quite understand when you can and can't use either of these algorithms. If anyone can answer this question and clear it up for me, I really appreciate it. Thanks!
Regarding the bisection method, you should have $f(a) f(b) < 0$ which, together with the continuity of $f$ assures the convergence of the method. With that being said, bisection's method can converge even if the condition $f(a) f(b)<0$ is not satisfied. In the case of the specific function you mention, the convergence will depend on the actual implementation of the method, namely whether you test $f(a) f((a+b)/2) < 0$ or $f((a+b)/2) f(b) <0$. In the first case the method will not converge and in the second case it will (I am assuming that $ab<0$).
Regarding Newton's method, it will kind of converge in a single iteration. if you choose any $x_0 \ne 0$, you will see that $x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = 0$, which is the actual solution. I say "kind of converge" because it would not be possible to further compute iterates...