Hi everyone,
I have a x -> y = f(x) function from R to R (you may suppose f is C(infinity)), given by an explicit relation.
This function is not strictly monotonic over R.
I want to construct the global inverse of f over R by putting "side by side" local inverse functions.
Let a__0, ..., a__n values of x such that:
- -infinity =a__0 < a__1 < ... a__(n-1) < a__n = + infinity
- f is monotonic over ] a__p, a__(p+1) [ for each p=0..n-1
The idea is to define the global inverse g of f over R by
g := y -> piecewise(y < f(a__1), g__0(y), ..., y < f(a__n), g__(n-1)(y))
where g__p(y), is the inverse function of the restriction of f to ] a__p, a__(p+1) [
Toy problem
f := x ->1-(1-x)^2;
x__1 := solve(diff(f(x), x);
y__1 := f(x__1);
# I thought one of these commands could work (but they don't return me a single branch as I had expected)
solve(f(x)=y, x) assuming y < y__1;
solve({f(x)=y, x < x__1}, x);
How can I obtain the inverse of a function f over an interval where f is bijective ?
TIA