1
$\begingroup$

Other than the identity function, is there any function where $f \circ f = f$?
$f(0)$ also has to return 1.
It must has something to do with the exponent 0 to a some coefficient...

Anyone could give me a hint? I am feeling stupid that I can't find it..!

  • 0
    @DouglasS.Stones One example is given by a function from $\{-1,0\}$ to $\{-1,1\}$, which seems pretty discrete.2012-11-02

7 Answers 7

6

The identity function satisfies your first condition but not the second. If by "identity function" you meant instead a function that always returns 1, then consider the following. We know that $f(1)=f(f(0))=f(0)=1,$ so our function must satisfy $f(0)=f(1)=1$. Are there any other conditions on $f$? If not, how might we choose the values of $f(x)$ for $x \ne 0,1$? Can we set $f(99) \ne 1$?

6

How about $f(x)=\begin {cases} 1 & x=0,1 \\ x & \text {otherwise} \end {cases}$

For a continuous one, $f(x)=1$

3

$\forall x\quad f(x) = 1 \implies (f\circ f)(0)=f(f(0))=f(1)=1$

1

Yes. Let $f(x):=x$ if $x\ge 1$ and $f(x):=1$ if $x<1$.

1

$f(x)=1^x=1$ $f(0)=1^0=1$ $(f\circ f)(x)=f(f(x))=f(1)=1$

$f=1$

1

Note that any solution must be the identity map on the range of the function, i.e. if $y = f(x)$ then $f(y) = f(f(x)) = f(x) = y$. But it can be anything you like outside the range of the function (as long as the range is still the range). So e.g. for a solution mapping $\mathbb R$ onto $[1,2]$ you define $f(x) = x$ for $1 \le x \le 2$, while for $x \notin [1,2]$ $f(x)$ all you need is $f(x) \in [1,2]$.

0

Another non-identical, non-constant version is $ f(x) = 1 + \{x\} $ where $ \{ \cdot \} $ denotes the fractional part.
However, I'm actually not sure how to make this valid over the complex numbers...

[update] Uppss... this seems to equal Robert Israel's proposal... didn't see this in the beginning...