0

I am working on a project for my 'Numerical Methods' course, and I came across a function to which I need to find roots using Bisection Method, also I don't have the initial values $X_u$ and $X_l$. Usually i can pick two values for which $f(X_u)f(X_l)<0$, but my main problem here is that the function is always positive. So is there any workaround to pick the initial values and find the roots?

My function is $$\frac{\tanh(\sqrt{x})}{\sqrt{x}}$$

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149

1 Answers1

0

Since the function is always positive, your algorithm should conclude that there is no root.

A root is defined to be the place where the function attain the value $0$.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
  • My question was not well phrased, but you helped me realize what i was missing. Thank you. – Samer Hajjar Dec 08 '17 at 11:25
  • How can we infer that the algorithm should conclude that there is no root when the initial conditions of the algorithm are not satisfied? How can bisection method comment on something it does not even consider? Or does it consider?! I'm at loss here. – mali1234 Apr 13 '22 at 11:08
  • We have to have some knowledge of the function before we start the algorithm. Is the function continuous (yes, in this case). Can we find a positive value? (yes, in this case). Can we find a negative value? (unfortunately the answer is no). We can't use binary search since there is no such root for this particular question. – Siong Thye Goh Apr 13 '22 at 11:31
  • What about another function which is continuous, and we can find a positive value but not a negative value. Like $x^{2}-4x\sin{x}+(2\sin{x})^{2}$, which obviously has a root but no negative value. What does bisection method say about that? – mali1234 Apr 13 '22 at 11:35
  • you should not use bisection method on that function. – Siong Thye Goh Apr 13 '22 at 15:47