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!

B Find the function f(x) satisfy: x=0,-> f(x) =0, x<>0, f(x)=1

  1. Jun 29, 2017 #1
    My problem is simple, but I couldn't solve it:
    This is: Find a function f(x) of a variable x, x is in real field. the F(x) satisfy:
    When x = 0, f(x) = 0
    When x<>0, f(x) =1.

    Anyone can help me?

    Thank you.
     
  2. jcsd
  3. Jun 29, 2017 #2

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    That appears to be a complete definition of the function. What more is there to find?
    Are you really asking whether it can be expressed in terms of standard functions?
    Is this homework?
     
  4. Jun 29, 2017 #3
    Thanks for reply.
    Yes, it exactly is express form of function. It's not homework but created by myself when I solve a problem in my job.
     
  5. Jun 29, 2017 #4

    jedishrfu

    Staff: Mentor

    Perhaps you could describe the problem that came up at work.

    My guess is you're trying to represent your function definition using common math functions in software where instead you could simply define a function to return a zero with x/=0 and a 1 when x=0.

    This could be related to a Dirac Delta function (which really isn't a function):

    https://en.wikipedia.org/wiki/Dirac_delta_function

    where you could write it as something like this: ##f(x) = 1 - \delta(x)##

    but of course this wouldn't work because ##\delta(x)## is infinite at x=0
     
  6. Jun 29, 2017 #5

    Mark44

    Staff: Mentor

    Yes, we would like to see the scenario that this function describes.
    Alternatively, the function could be defined piecewise.
    ##f(x) = \begin{cases} 0 & \text{if }x = 0 \\ 1 & \text{if }x \ne 0 \end{cases}##

    If this function is the result of a spreadsheet calculation, it's easy to build logic into a spreadsheet cell for this.
     
  7. Jun 29, 2017 #6

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Express it in what context? Are you writing a computer program? A spreadsheet formula? Or just a technical paper?
     
  8. Jun 29, 2017 #7
    Express as polynomial form. This is in spreadsheet formula. I have alternative solution, using "if" command. However, I'm trying to find a solution in math.
     
  9. Jun 29, 2017 #8

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    No chance of polynomial form, or any "school" algebra. But don't think of math as limited to that. Math allows functions to be defined as you wrote it in post #1, and the appropriate way to express it in a spreadsheet is with IF.
     
  10. Jun 29, 2017 #9
    Thanks for your response.
     
  11. Jun 29, 2017 #10

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    How about ## 1- \chi_0 ## , where ##\chi_0 ## is the characteristic function of 0 , i.e. ##\chi_a## is 1 at a and 0 elsewhere ? EDIT : In my experience, most of the time, it is ##\chi_A ## , where ##A## is a set, but then you can just use ##A= ## {##a ##}
     
    Last edited: Jun 29, 2017
  12. Jun 30, 2017 #11
    I think it is a good solution. Nonetheless, it's too complicated for my case. Thank you so much.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Find the function f(x) satisfy: x=0,-> f(x) =0, x<>0, f(x)=1
  1. X/0 = ? (Replies: 8)

  2. (x/0) / (x/0) = 1 (Replies: 42)

  3. X-x = 0 (Replies: 36)

Loading...