# Taylor Representation of the Floor Function

1. Dec 2, 2008

### flouran

Hi Guys,
I was wondering if it is possible (why or why not) to define the floor function, Floor[x], as an infinite Taylor Series centered around x=a?

Any sort of help is greatly appreciated!
flouran

2. Dec 2, 2008

### morphism

A Taylor series is differentiable inside its radius of convergence. What can you deduce from this?

3. Dec 2, 2008

### flouran

I know that a Taylor Series is differentiable inside its radius of convergence, but the crux of my question is for a radius of convergence of all real numbers (or at least for positive integers and zero), is it possible to find a Taylor series of the floor function? Also, in order to do this, wouldn't one need to know the nth derivative of the floor function, meaning that there needs to be a continuous representation of the floor function.

I know of one relationship, that is,
$$Floor[x] == -1/2 + x + \frac{ArcTan(Cot(\pi x))}{\pi}$$
where x is for all real integers.

Maybe this could help. However, I know that the McLaurin Series for ArcTan only has a radius of convergence around -1<x<1, not for all real x (or at least positive integers and 0) as we want.

4. Dec 2, 2008

Your formula is not defined if x is an integer, because then cot(πx) is undefined.

You could find a Taylor series for the floor function around a point x0 that is not an integer (here the floor function is inifinitely-many-times differentiable, and each derivative is zero), but it would only be valid on [⌊x0⌋, ⌊x0⌋ + 1).

Since ⌊x⌋ - x is periodic, you'd have better luck finding a Fourier series for that and adding x at the end. This would converge pointwise to the floor function everywhere except at the integers.

5. Dec 2, 2008

### flouran

The Fourier Representation makes more sense. However, is there any way I can represent a Fourier Series as a Taylor Series, like maybe if I represent the sines and cosines as infinites Taylor polynomials?

6. Dec 2, 2008

### HallsofIvy

You were answered completely in the first response and just shook it off. In order for a funtion to be equal to its Taylor's series it must be "analytic" which, partially, means it must be infinitely differentiable. The step function is not. In order to have a "Fourier representation" (series or transform?) a function must only be integrable. MOST function that have "Fourier representations" are not infinitely differentiable and so do not have Taylor's series.

7. Dec 2, 2008

### flouran

Thus, in order for Floor[x] to be infinitely differentiable and as result can be represented by a Taylor Series, is there not a continuous function that is equivalent to Floor[x]? For instance, the factorial function is a step function, but can be represented in terms of the continuous Gamma function:

$$n! = \Pi[n] = \Gamma[n+1]$$

Is this the case for the floor function as well?

8. Dec 2, 2008

No. The factorial is not a step function; it is defined only on the nonnegative integers. The gamma function is an analytic function such that $$\Gamma(n + 1) = n!$$ for each nonnegative integer n, but n! is not defined otherwise. In this sense, $$\Gamma(x + 1)$$ extends the factorial function to the real numbers (except the negative integers).

The difference is that the floor function is defined for all real numbers, so there is nothing to extend it to. There is no continuous function on the real numbers that coincides with the floor function, since such a function would have to be the floor function, which is not continuous.

9. Dec 2, 2008

### flouran

Ok, thanks for making it clear for me! But, can't I represent the floor function with another function which has a Taylor Series? I found the formula, $$Floor[x] = -1/2 + x + \frac{ArcTan(Cot(\pi x))}{\pi}$$
where x is for all real integers, according to the Mathworld website. The Mathematica Notebook which explains this formula is attached to this post, and is under the section "Elementary Functions". I know that this formula can't be continuous, as it is mimicking the floor function, but I know it can have a Taylor series representation. Don't think that I am an idiot, I just want to make sure.

#### Attached Files:

• ###### MathworldFloorFunction.nb
File size:
186.2 KB
Views:
72
10. Dec 2, 2008

I shall write $$f(x) = -1/2 + x + \frac{\arctan(\cot \pi x)}{\pi}$$.

Again, the issue with that is any Taylor series for f(x) will not hold for all x. In fact, any Taylor series for f(x) centered on a number c (which is not an integer; otherwise f(c) is undefined) will only hold for values of x with the same floor as c. If you work it out, f'(c), f''(c), and all higher derivatives of f at c will be zero, so you'll end up with a Taylor series of just f(c), a constant.

A Taylor series is only valid within a region where the function you are approximating is analytic (that is, differentiable arbitrarily many times). The floor function is not even continuous at the integers, so the Taylor series will not give you the correct value of the floor function across values of different floors.

Last edited: Dec 2, 2008
11. Dec 2, 2008

### flouran

The primary reason why I want to represent the function as a Taylor series is that I want to represent the Floor[x] as a polynomial. The polynomial will not be a step function, but it will attain the same values of the floor function at specified intervals, Seriously is there any possible way at all to represent the floor function as a polynomial (and it doesn't need to be a Taylor series necessarily)?

12. Dec 2, 2008

### morphism

What do you mean by "represent"? As was stated multiple times, floor[x] is NEVER going to be equal to a polynomial or a power series on all of $\mathbb{R}$, because the latter are continuous (in fact infinitely differentiable) everywhere while it is not.

13. Dec 2, 2008

### mutton

Which intervals?

f(x) = x attains the same values on the intervals [n, n] where each n is an integer

14. Dec 2, 2008

Any polynomial is a (finite) Taylor series.

Just to make it clear: no, you cannot describe the floor function using a Taylor series. There are other types of series that can do the job, but they must involve something other than a polynomial.

15. Dec 3, 2008

### flouran

The Fourier series of the Floor Function is,
Floor[x] = x-1/2+1/\[Pi]\!$$\*UnderoverscriptBox[\(\[Sum]$$, $$k = 1$$, $$\[Infinity]$$]
\*FractionBox[$$Sin[2\ \[Pi]\ k\ x]$$, $$\(k$$$$\$$\)]\), which is the Mathematica code for the Series, and I have no intention of converting it to LaTeX code.

This series converges to, -1/2+x-(\[ImaginaryI] (Log[1-\[ExponentialE]^(-2 \[ImaginaryI] \[Pi] \
x)]-Log[1-\[ExponentialE]^(2 \[ImaginaryI] \[Pi] x)]))/(2 \[Pi]), which again, is Mathematica code I won't convert to LaTeX.

Note that this function is complex, and that I can convert to the real axis. Thus, once I convert this function to the real axis (I don't know how, so I am looking for a bit of help), I can then equate it to a Taylor Series. This method is the only method which will work so far.

16. Dec 3, 2008

### mutton

17. Dec 3, 2008

Let me put that in LaTeX for the benefit of other readers.

That function is real: the difference of the logarithms is purely imaginary, and multiplying by i makes it real. The reason that gives you a discontinuous function is because of a branch cut in the logarithm.

Again, you can't make a Taylor series for it that will hold everywhere. Give up. Taylor series only work on a region where the function is continuous (and infinitely times differentiable).

Since you love to use Mathematica to reason for you, try telling it to find a Taylor polynomial for the function above around some noninteger, say, Series[f[x], {x, 5/2, 10}], with f[x] being the expression you obtained. That will give you 2 + O[x - 5/2]^11: a constant (up to 10th order; this will be the same for any degree). That will only give you correct values for the floor function between 2 and 3.

18. Dec 5, 2008

### flouran

How does multiplying by i make the function real? Could you show me how b/c multiplying by i results in,
$$-\frac{i}{2} + ix + \frac{\left( \ln(1 - e^{-2i \pi x}) - i\ln(1 - e^{2i \pi x}) \right)}{2\pi}.$$

19. Dec 5, 2008

### flouran

which isn't real.

20. Dec 5, 2008

### D H

Staff Emeritus
That is not what Adriank said.
You are abusing mathematics, and poor defenseless Mathematica. There is of course a Taylor expansion for floor(x): floor(x)=floor(x0). Unfortunately, this series only has a radiance of convergence equal to min(x0-floor(x),ceil(x)-x0). Not very useful.

21. Dec 6, 2008

### HallsofIvy

No, it has infinite radius of convergence, it just isn't equal to the function outside the the interval you give. (Or is "radiance" of convergence better than radius of convergence? It sure sounds like it!)

22. Dec 6, 2008

### D H

Staff Emeritus

Halls is of course correct. The radius of convergence of the series f(x)=constant is infinite.

23. Dec 7, 2008

### flouran

Is there a way to inverse the floor function? if Floor[x]=n, can I find the values of x which output n?

24. Dec 7, 2008