# Composition of functions

by mnb96
Tags: composition, functions
 P: 625 This might be a silly question: given a function $$g$$ is it possible to find a function $$f$$ such that $$f = f \circ g$$?
P: 321
 Quote by mnb96 This might be a silly question: given a function $$g$$ is it possible to find a function $$f$$ such that $$f = f \circ g$$?
f=const.
 P: 287 That is the trivial solution. Perhaps there are others? f(x) = f(g(x)) if... f(x) = c, c constant. g(x) = x, f any function. If these two conditions don't hold, though... Assume f has an inverse function. For instance, if f(x) = 2x, then (inv f)(x) = x/2. Then f = f o g <=> f(x) = f(g(x)) <=> x = g(x). So if f has an inverse, g must equal x if f = f o g. So you'd only be looking for functions which don't have an inverse. But what we have is a little stronger than that, no? Since my argument makes no reference to intervals, it must be true on any interval. So g = x if you want a function f which is invertible over any interval. The only function which is not invertible over any interval is - you guessed it - constant functions. So, in summary: if g(x) = x, then any function f(x) will do. Otherwise, f(x) = c , c constant, is the only solution. What about functions of more variables? Or generalized operations like differentiation? No idea.
 P: 813 Composition of functions If g(x)=x Then f(x) can be anything. Let g(n)=2n Then f(n) can map even numbers to one constant and odd numbers to a different constant. (At least it works if n is discrete). Not sure if it works in the continuous case but I think it might.
P: 321
 Quote by csprof2000 So, in summary: if g(x) = x, then any function f(x) will do. Otherwise, f(x) = c , c constant, is the only solution.
 P: 625 Thanks a lot. You all made very good observations that helped me a lot. BTW, it seems that if the function f admits an inverse there are not many choices, while if the function f is not invertible, many solutions exist but the problem is non-trivial, and it is difficult to say what kind of functions f and g would have to be, in order to satisfy f(x)=f(g(x)). At the moment I am trying to solve the following (similar) problem: $$f = (f \circ g) g'$$ where g is invertible, and g' denotes its derivative If you find it interesting, suggestions are always welcome. Thanks!