Dual-Output Function: Solutions for Non-Negative Integer x?

  • Thread starter scikidus
  • Start date
  • Tags
    Function
In summary, the conversation revolved around finding a function f(x) that returns a specific value for x=0 and a different value for all other values of x. Various options were discussed, including using absolute values, characteristic functions, and piecewise functions. It was ultimately suggested to use the function f(n) = \frac{\sin \pi n}{n}, which is only defined over the integers and can be inverted using piecewise functions.
  • #1
scikidus
5
0
"Dual-output" Function?

This isn't homework: I am experimenting with factorization.

Does anyone know of a function f(x) which for some value of x returns one value for f(x), but for every other value of x returns some other value?

Example: I'm trying to find a function f(x), where

x = 0, f(x) = 1
x != 0, f(x) = 0

My function is only dealing with non-negative integers, if that helps.

I've already derived a function that does this, but it uses absolute values, which is a nuisance.

Anyone know of anything like this?

For reference, here is my formula:

[tex]f(x) =\frac{1-\frac{\left|2x-1\right|}{2x-1}}{2} = \frac{\left|4x-2\right| - 4x-2}{8x-4}[/tex]
 
Last edited:
Mathematics news on Phys.org
  • #3


scikidus said:
Example: I'm trying to find a function f(x), where

x = 0, f(x) = 1
x != 0, f(x) = 0

My function is only dealing with non-negative integers, if that helps.

That's the characteristic function of zero (Sloane's http://www.research.att.com/~njas/sequences/A000007 ). But your post seemed to focus on giving it a closed form. Why?
 
Last edited by a moderator:
  • #4


What exactly do you want? When you say "f(0)= 1, f(x)= 0 if x is not 0" you have already defined a function. And if you want a closed form, why is absolute value a "nuisance"?
 
  • #5


Thanks to those who have responded, you've helped a lot.

@Vid: The link you supplied helped me solve another problme I was working with, so thanks.

@CRGreathouse: That, too, is of great help. I wasn't sure if 0^0 would be considered defined, but that greatly simplifies my procedure.

@HallsofIvy: Yes, that techincally defines a function, but I was looking for a mathematical equation which would supply that result. Two ways are the one I supplies in ym OP, and f(x) = 0^x.

Also, I called absolute value a nuisance because I am build an equation and I need to then invert it. If there are absolute values, then things get very tricky, by which I mean impossible to solve.
 
  • #6


It's interesting you decided f(x)=0^x is an equation that gives this, since 0^x has to be defined at x=0 separately anyway, so you haven't really gained anything. And there's no way in hell you're going to invert this sucker
 
  • #7


scikidus said:
Also, I called absolute value a nuisance because I am build an equation and I need to then invert it. If there are absolute values, then things get very tricky, by which I mean impossible to solve.

This function (regardless of whether you view it as a closed-form equation or not) can't be inverted. f(9) = f(3) = 0, so what would f^-1(0) be?
 
  • #8


Terribly sorry, I misspoke/posted. By "invert," I meant not the function, but the final equation that I'm working on.
 
  • #9


scikidus said:
Terribly sorry, I misspoke/posted. By "invert," I meant not the function, but the final equation that I'm working on.

Yes, but inverting the final equation will involve inverting that special function.
 
  • #10


Actually, I've decided that using the characteristic function of 0 essentially allows you to build piecewise functions, so perhaps you can simply invert piecewise.
 
  • #11


If your function only needs to be defined over the integers, you can try

[tex]f(n) = \frac{\sin \pi n}{n}[/tex]
 

1. What is a dual-output function?

A dual-output function is a mathematical function that has two outputs for every input. This means that for a single input, the function will produce two different values or solutions.

2. How is a dual-output function different from a regular function?

In a regular function, there is only one output for every input. In a dual-output function, there are two outputs for every input, providing more possibilities and solutions.

3. How are non-negative integers used in a dual-output function?

Non-negative integers, or whole numbers that are equal to or greater than zero, are often used in dual-output functions because they provide a clear and simple solution for both outputs.

4. Can a dual-output function have more than two outputs?

Yes, a dual-output function can have more than two outputs. In fact, there are functions that have multiple outputs for every input, known as multi-output functions.

5. What are some real-world applications of dual-output functions?

Dual-output functions can be used in various fields such as engineering, economics, and computer science. They can be used to model systems with multiple outcomes, optimize decision-making processes, and find efficient solutions to complex problems. For example, in economics, dual-output functions can be used to analyze production processes and determine the optimal combination of outputs for a given set of inputs.

Similar threads

Replies
3
Views
207
Replies
4
Views
889
Replies
5
Views
843
Replies
17
Views
2K
  • General Math
Replies
4
Views
755
Replies
2
Views
1K
Replies
4
Views
400
Replies
3
Views
691
  • General Math
Replies
1
Views
994
Replies
7
Views
1K
Back
Top