1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Function that equals 1 at x=0, but 0 everywhere else?

  1. Mar 10, 2014 #1
    Is there a function that equals 1 at x=0 and equals 0 when x isn't 0 without using a piecewise function? I've been experimenting with limits and derivatives but haven't made much progress.

    The closest thing I was able to think of is 1-x/x, which is indeterminate at x=0, and 0 everywhere else.

  2. jcsd
  3. Mar 10, 2014 #2


    User Avatar
    Science Advisor
    Gold Member

    How about the limit as [itex]a[/itex] approaches [itex]\infty[/itex] of [itex]f(x) = e^{-a x^{2}}[/itex]?
  4. Mar 10, 2014 #3
    That'll do it :P
    It seems like any real constant greater than 1 works in place of e. Is there a reason why you chose e?
    Last edited: Mar 10, 2014
  5. Mar 10, 2014 #4
    Out of infinitely many possible bases to choose from, ##e## is the only one that makes sense most of the time. In this case it doesn't matter, but why would you choose something else? If you want, you could rewrite this as
    ##in which case it is the same as
    \lim_{b\rightarrow0}\left( b\right)^{x^2}
    What matters is the ##x^2## exponent and the continuous, decreasing function as a base. Most mathematicians are used to ##e## being part of that base.

    Also, this is sometimes thought of as a limit of normal distributions. These are defined using ##e##.
  6. Mar 11, 2014 #5
    Is there a reason for this requirement? "Piecewise" is just a notation for describing a function; it isn't actually a "kind" of function. Even your description of your function is piecewise: 1 at zero, and 0 everywhere else.
  7. Mar 11, 2014 #6


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Two functions are equal if they take the same value at every point. So, regardless of whether you describe a function piecewise or as the limit of a sequence of functions, it's the same function in the end.
  8. Mar 11, 2014 #7
    I think this demonstrates a fundamental misunderstanding of functions. Functions are a rule associating two sets. That's it. Really, "piecewise function" doesn't really make sense. It's just a way of writing things.
  9. Mar 11, 2014 #8
    But sometimes piecewise makes calculus hard. I think this is a good point to make though.
  10. Mar 12, 2014 #9
    But "Piecewise" is only a way of describing a function. There is no such thing as a "piecewise function". f(x)=x if x>0, -x if x≤0. Or f(x)=|x|. Both are the same function. One is written "piecewise" the other isn't.
  11. Mar 12, 2014 #10
  12. Mar 12, 2014 #11
    Here's another function that would satisfy the requirement but no limits involved:

    f(x) = 0^x
  13. Mar 12, 2014 #12
    How would that be defined for negative real numbers?
  14. Mar 12, 2014 #13
    Ooops, you're right, I forgot to modify it:

    f(x) = 0^(x^2)
  15. Mar 12, 2014 #14
    Everytime I have encountered it, ##0^0## has been considered an indeterminate form and not 1.
  16. Mar 12, 2014 #15
    I agree, but let's not open that can of worms here. Paisiello2 clearly meant ##0^0=1##, so let's keep it at that, even if it's nonstandard.

    mod note: not a ##0^0## argument please. All posts on this will be deleted.
    Last edited: Mar 13, 2014
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook