Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Taylor Representation of the Floor Function

  1. Dec 2, 2008 #1
    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. jcsd
  3. Dec 2, 2008 #2

    morphism

    User Avatar
    Science Advisor
    Homework Helper

    A Taylor series is differentiable inside its radius of convergence. What can you deduce from this?
     
  4. Dec 2, 2008 #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.
     
  5. Dec 2, 2008 #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.
     
  6. Dec 2, 2008 #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?
     
  7. Dec 2, 2008 #6

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
     
  8. Dec 2, 2008 #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?
     
  9. Dec 2, 2008 #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.
     
  10. Dec 2, 2008 #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.
     

    Attached Files:

  11. Dec 2, 2008 #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: Dec 2, 2008
  12. Dec 2, 2008 #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)?
     
  13. Dec 2, 2008 #12

    morphism

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  14. Dec 2, 2008 #13
    Which intervals?

    f(x) = x attains the same values on the intervals [n, n] where each n is an integer
     
  15. Dec 2, 2008 #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.
     
  16. Dec 3, 2008 #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.
     
  17. Dec 3, 2008 #16
     
  18. Dec 3, 2008 #17
    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.
     
  19. Dec 5, 2008 #18
    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]
     
  20. Dec 5, 2008 #19
    which isn't real.
     
  21. Dec 5, 2008 #20

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Taylor Representation of the Floor Function
  1. Floor functions (Replies: 1)

Loading...