Floor functions using complex logarithms

An interesting discovery, thanks to a problem presented by K. Srinivasa Raghava:

A standard result for x real, where \lfloor .\rfloor is the floor function:

\lfloor x\rfloor =\frac{1}{\pi }\sum _{k=1}^{\infty } \frac{\sin (2 \pi k x)}{k}+x-\frac{1}{2}.

Now it so happens that:

\frac{1}{\pi }\sum _{k=1}^{\infty } \frac{\sin (2 \pi k x)}{k}=\frac{i \left(\log \left(1-e^{-2 i \pi x}\right)-\log \left(1-e^{2 i \pi x}\right)\right)}{2 \pi }

which is of course intuitive owing to Riemann surfaces produced by the complex logarithm. I could not find the result but I am nearly certain it must be somewhere.

Now to get an idea, let us examine the compensating function f(x)= \frac{i \left(\log \left(1-e^{-2 i \pi x}\right)-\log \left(1-e^{2 i \pi x}\right)\right)}{2 \pi }

 And of course, the complex logarithm (here is the standard function, just to illustrate):

Floor functions using complex logarithms

3 thoughts on “Floor functions using complex logarithms

  1. mutentropy says:

    An intriguing connection with the complex logarithm.
    In my world of (so called) phase shifting interferometry we utilise the imaginary part of the complex logarithm (viz phase) all the time. Your equation with the difference of two complex logs cancels out the real part, just leaving the very same imaginary part. I often use the following equations to generate sawtooth functions such as required for an analytic floor function:

    atan[tan(x)]

    or if I wish to extend the range from one quadrant I utilise the four quadrant arctan:

    atan2[sin(x),cos(x)]

    More gory details can be found in many of my publications, for example:
    Propagation of errors in different phase-shifting algorithms: a special property of the arctangent function, 1992

    PS
    Digressing tangentially I note that the floor function has a very important part in the analysis of the prime counting function and leads inexorably to the Riemann zeta function.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s