Taylor Representation of the Floor Function

In summary, the conversation discusses the possibility of defining the floor function as an infinite Taylor series centered around a point x=a. The participants explore the properties of Taylor series and the floor function, and conclude that the floor function cannot be represented as a Taylor series due to its non-analytic nature. They also discuss the potential of representing the floor function as a polynomial or other type of series, but ultimately determine that it is not possible due to the discontinuity of the floor function.
  • #1
flouran
64
0
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
 
Physics news on Phys.org
  • #2
A Taylor series is differentiable inside its radius of convergence. What can you deduce from this?
 
  • #3
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,
[tex]
Floor[x] == -1/2 + x + \frac{ArcTan(Cot(\pi x))}{\pi}
[/tex]
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
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
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
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
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:

[tex]
n! = \Pi[n] = \Gamma[n+1]
[/tex]

Is this the case for the floor function as well?
 
  • #8
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 [tex]\Gamma(n + 1) = n![/tex] for each nonnegative integer n, but n! is not defined otherwise. In this sense, [tex]\Gamma(x + 1)[/tex] 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
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, [tex] Floor[x] = -1/2 + x + \frac{ArcTan(Cot(\pi x))}{\pi}[/tex]
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.
 

Attachments

  • MathworldFloorFunction.nb
    186.2 KB · Views: 551
  • #10
I shall write [tex]f(x) = -1/2 + x + \frac{\arctan(\cot \pi x)}{\pi}[/tex].

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:
  • #11
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
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 [itex]\mathbb{R}[/itex], because the latter are continuous (in fact infinitely differentiable) everywhere while it is not.
 
  • #13
flouran said:
...it will attain the same values of the floor function at specified intervals...

Which intervals?

f(x) = x attains the same values on the intervals [n, n] where each n is an integer
 
  • #14
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
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
flouran said:
...I can then equate it to a Taylor Series.

adriank said:
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.
 
  • #17
Let me put that in LaTeX for the benefit of other readers.

flouran said:
The Fourier series of the Floor Function is,
[tex]Floor(x) = x - \frac{1}{2} + \frac{1}{\pi} \sum_{k=1}^{\infty} \frac{\sin(2\pi kx)}{k}.[/tex]

This series converges to,
[tex]-\frac{1}{2} + x - \frac{i \left( \ln(1 - e^{-2i \pi x}) - \ln(1 - e^{2i \pi x}) \right)}{2\pi}.[/tex]

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
Adriank, you said,
adriank said:
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.
How does multiplying by i make the function real? Could you show me how b/c multiplying by i results in,
[tex]-\frac{i}{2} + ix + \frac{\left( \ln(1 - e^{-2i \pi x}) - i\ln(1 - e^{2i \pi x}) \right)}{2\pi}.[/tex]
 
  • #19
flouran said:
Adriank, you said,

How does multiplying by i make the function real? Could you show me how b/c multiplying by i results in,
[tex]-\frac{i}{2} + ix + \frac{\left( \ln(1 - e^{-2i \pi x}) - i\ln(1 - e^{2i \pi x}) \right)}{2\pi}.[/tex]
which isn't real.
 
  • #20
flouran said:
Adriank, you said,

How does multiplying by i make the function real?
That is not what Adriank said.
adriank said:
the difference of the logarithms is purely imaginary, and multiplying by i makes it real.

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
D H 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.

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
HallsofIvy said:
No, it has infinite radius of convergence, it just isn't equal to the function outside the the interval you give.
:redface:
Halls is of course correct. The radius of convergence of the series f(x)=constant is infinite.
 
  • #23
Is there a way to inverse the floor function? if Floor[x]=n, can I find the values of x which output n?
 
  • #24
There are two senses of inverse you could be talking about. One is the usual "inverse function", which exists if the original function is one-to-one. The floor function is not one-to-one, so it has no inverse function.

However, there is another idea that works on any function, but deals with sets. In general, given a function f: A → B and a subset S of B, then f-1(S) = {x ∈ A | f(x) ∈ S}. In the case of the floor function, if n is an integer, then floor-1({n}) = [n, n + 1). Note that these are sets, not numbers.(Hopefully the unicodes such as → and ∈ show up on your end.)
 

FAQ: Taylor Representation of the Floor Function

What is the Taylor Representation of the Floor Function?

The Taylor Representation of the Floor Function is a mathematical formula that approximates the floor function, which rounds down to the nearest integer, using a series of polynomial terms.

How is the Taylor Representation of the Floor Function calculated?

The Taylor Representation of the Floor Function is calculated by taking the infinite sum of a specific sequence of polynomial terms and evaluating it at a given point. This point is usually the desired input to the floor function.

What is the purpose of the Taylor Representation of the Floor Function?

The purpose of the Taylor Representation of the Floor Function is to provide a more convenient and efficient way to calculate the floor function, especially for large or non-integer inputs. It can also be used to approximate the floor function in situations where the exact value is not needed.

What is the relationship between the Taylor Representation of the Floor Function and the Taylor Series?

The Taylor Representation of the Floor Function is a special case of the Taylor Series, which is a mathematical tool used to approximate a wide variety of functions. The Taylor Representation specifically approximates the floor function, while the Taylor Series can approximate any differentiable function.

Are there any limitations to the Taylor Representation of the Floor Function?

Yes, there are limitations to the Taylor Representation of the Floor Function. Like any Taylor Series, it is an approximation and will not give an exact value for the floor function. Additionally, the accuracy of the approximation decreases as the input value gets further from the point of evaluation.

Similar threads

Replies
1
Views
2K
Replies
3
Views
2K
Replies
5
Views
14K
Replies
4
Views
2K
Replies
9
Views
2K
Replies
3
Views
2K
Replies
2
Views
1K
Replies
15
Views
2K
Back
Top