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

  • Context: High School 
  • Thread starter Thread starter Viet Tu
  • Start date Start date
  • Tags Tags
    Function
Click For Summary
SUMMARY

The discussion revolves around defining a function f(x) that satisfies specific conditions: f(0) = 0 and f(x) = 1 for all x ≠ 0. Participants suggest various mathematical representations, including the piecewise function definition and the use of the Dirac Delta function. The piecewise definition is expressed as f(x) = {0 if x = 0, 1 if x ≠ 0}. Additionally, the characteristic function approach is proposed as a more complex alternative. The conversation emphasizes the importance of context, particularly in spreadsheet applications where an IF statement can be utilized.

PREREQUISITES
  • Understanding of piecewise functions
  • Familiarity with the Dirac Delta function
  • Knowledge of characteristic functions
  • Basic spreadsheet formula construction
NEXT STEPS
  • Research the properties and applications of the Dirac Delta function
  • Learn how to implement piecewise functions in programming languages
  • Explore the use of characteristic functions in probability theory
  • Study advanced spreadsheet functions, particularly conditional statements
USEFUL FOR

Mathematicians, data analysts, software developers, and anyone involved in mathematical modeling or spreadsheet calculations will benefit from this discussion.

Viet Tu
Messages
8
Reaction score
0
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.
 
Mathematics news on Phys.org
Viet Tu said:
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.
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?
 
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.
 
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
 
  • Like
Likes   Reactions: Viet Tu
jedishrfu said:
Perhaps you could describe the problem that came up at work.
Yes, we would like to see the scenario that this function describes.
jedishrfu said:
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

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.
 
  • Like
Likes   Reactions: Viet Tu and jedishrfu
Viet Tu said:
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.
Express it in what context? Are you writing a computer program? A spreadsheet formula? Or just a technical paper?
 
haruspex said:
Express it in what context? Are you writing a computer program? A spreadsheet formula? Or just a technical paper?
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.
 
Viet Tu said:
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.
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.
 
  • Like
Likes   Reactions: jedishrfu and Viet Tu
haruspex said:
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.
Thanks for your response.
 
  • #10
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:
  • Like
Likes   Reactions: jedishrfu
  • #11
WWGD said:
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 ##}
I think it is a good solution. Nonetheless, it's too complicated for my case. Thank you so much.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
993
  • · Replies 16 ·
Replies
16
Views
1K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K