- #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]
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: