# Solving for a monotone function - contraction operator for functions?

I want to solve a problem for an increasing function $$g(x)$$, for $$x \in [0,1]$$ and with $$g(0) = 0$$ and $$g(1) = 1$$.
The solution will be solution to the following equation $$\forall x$$, $$f_1(x) = f_2(g(x))$$.
(with $$f_1$$ and $$f_2$$ known)

However, $$f_2$$ may not be invertible (it is piecewise monotone though). Thus for some $$x$$, you have multiple solution $$g(x)$$, that we'll denote $$(g^1(x), g^2(x), ..., g^k(x))$$ (given the structure of the problem, you always have a countable number of solutions).

However, overall, there is a unique increasing solution $$g^*()$$ of $$[0,1] \rightarrow [0,1]$$.
My problem is, I don't know how to impose the monotonicity constraint when solving a system, such that I should be able to pin down the unique solution 'directly' (I don't know if that's even possible). Or in other words, I don't know tricks to write the system with monotonicity embedded, solving for the complete function $$g()$$, instead of solving pointwise $$x$$ by $$x$$.

I was trying to build a contraction mapping operator (maybe it's not the way to go), but I need to embed the monotonicity constraint into the contraction operator and I don't know how to do that. (Because taken at a given $$x$$, our system can yield several solution and thus no contraction mapping is feasible).

PS: Just to be clear, in this particular case I know how to pin down $$g()$$ entirely exploiting piecewise monotonicity (and thus building piecewise invertibility). My question is really about tricks to include the monotonicity into a system (as an additional equation? constraint?), and if possible use contraction mapping with it.