3
$\begingroup$

I was recently working with functions of the form $$N - \sqrt{\frac{N}{x}}\cdot\left\lfloor \frac{N}{\sqrt{N/x}}\right\rfloor + \sqrt{\frac{N}{x}} - \left\lfloor \sqrt{\frac{N}{x}}\right\rfloor$$ where $N$ is positive integer.

Almost any graphing calculator I used was unable to find the zeroes of the function mentioned above and I concluded that it probably was not possible to numerically locate the roots. I recently was working with an application called Desmos calculator which strangely enough was able to locate the zeroes of this function (and almost instantaneously at that). When I emailed the team they told me they were using a form of bisection but I am unclear exactly how to implement bisection to locate roots of this function. I would be very glad if someone here could explain how the implementation would be done (i.e. how to select anchor points, etc...). Would it also be possible to utilize Newton's method or some Householder Method on this curve for fast convergence?

I have attached images of the function below. The Red functions show the graph with $N = 2813$. And Blue functions show the graph with $N = 6$. The zeroes are displayed for red as $1.5$ and $0.66666$. The zeroes are displayed for blue as $3.345$ and $0.299$.

enter image description here enter image description here enter image description here enter image description here

To graph the functions yourself, go to https://www.desmos.com/calculator and there you can substitute the expression

N - (N/x)^(1/2)*floor(N/((N/x)^(1/2))) + (N/x)^(1/2) - floor((N/x)^(1/2)) 

with $N = 6$, and $2813$.

My main problem with bisection is that if one looks at the graphs they notice that they are impossible to bisect (all values are positive) and also using Newton's fails. So I suppose that any root finding algorithm that actually works for this would be also appreciated.

  • 1
    Welcome to math.SE! To make your questions more readable, you can format the math using the tutorial [here](http://meta.math.stackexchange.com/questions/5020/tex-latex-mathjax-basic-tutorial-and-quick-reference).2012-12-31
  • 0
    Can you attach the images you are referring to on a public site that allows you to post pictures and others can peruse? I updated your formula with better formatting, but please check it as it was long, so make sure I didn't hose it? Regards2012-12-31
  • 0
    You can use http://imgur.com/ to upload the graphs. Add the URLs of the images and someone will edit them into the question.2012-12-31
  • 0
    As for the actual question, I think one would have to specially handle the points at which the floor functions have discontinuities. It looks like the Desmos calculator misses a zero at $x=6$ when $N=6$. In fact I'd guess the zeros are precisely at those points where the arguments of both floor functions are integers.2012-12-31
  • 0
    I used imgur to upload the files. They can be viewed at this link: http://imgur.com/a/r9zMu2013-01-01

1 Answers 1