On the derivative of a function that is its own inverse

calculuscontest-mathderivativesreal-analysis

I was recently doing the following question:

Let $f$ be a differentiable function such that $f(f(x))$ = $x$ for all $x\in[0,1]$. Suppose $f(0)=1$. Determine the value of $$\int_0^1(x-f(x))^{2016} dx$$

Now, in the light of the fact that $f(f(x))=x$ I thought the substitution $t=f(x)$ may be something to investigate. Of course, if $t=f(x)$ then $dx = {dt\over f’(x)}$ so we may write the integral as $$\int_1^0(f(t)-t){dt\over f’(x)}$$

Now, I noticed that we might be able to exploit the fact* that $f(x)$ is its own inverse to resolve $f’(x)$.

Notice that $${f^{-1}}’(x) = \frac 1{f’(x)}$$
But, since $f(x)=f^{-1}(x)$ we have $$(f’(x))^2 = 1$$ save for the degenerate case that $f’(x) = 0$— which if true means the function isn’t invertible in the first place (even if it’s only at some certain points those may be extrema and may challenge the invertibility of the function, but I digress).

But obviously it is not necessary that a function’s derivative to be $1$ or $-1$ for it to be its own inverse, right? I thought of a function on $[0,\infty)$ $$g(x)=\left(a-x^n\right)^\frac 1n$$ (where $n$ is a natural number) whose derivative is $(1-n)x^{n-1}(a-x^n)^{\frac 1n -1}$ (clearly not $\pm 1$) and its inverse is $g^{-1}(x)=(a-x^n)^\frac 1n$ (clearly $g(x)$, not even making an attempt to disguise itself !).

So what’s the deal here? Please help me make sense of it.


*I figured that it isn’t actually necessarily true that $f(f(x)) = x$ means $f \equiv f^{-1}$, since $f^{-1}$ may not even exist, and I ended up solving that problem by instead trying the substitution $x=f(t)$. Interestingly, continuing with the original substitution and assumption that $f(x)=f^{-1}(x)$ and writing $f’(x)$ as a function of $t$ is consistent with the other substitution.

However, this has no actual bearing on the question.

Best Answer

We can first use Binomial Theorem. The first term can be integrated separately, and the remaining terms can be paired as follows. \begin{eqnarray} \mathcal I &=& \int_0^1 (x-f(x))^{2n} dx =\\ &=&\frac1{2n+1}+\sum_{k=1}^{n}\left\{{2n \choose k}(-1)^k\int_0^1x^{2n-k}[f(x)]^{k}dx+\right.\\ & &-\left.{2n\choose 2n-k+1}(-1)^{k}\int_0^1x^{k-1}[f(x)]^{2n-k+1}dx\right\} \end{eqnarray} Now let us perform the change of variable $x \to f(x)$ and then integration by parts to further elaborate the second term in the above sum, thus getting \begin{eqnarray} \mathcal I &=&\frac1{2n+1}+\sum_{k=1}^{n}\left\{{2n \choose k}(-1)^k\int_0^1x^{2n-k}[f(x)]^{k}dx+\right.\\ & &+\left.{2n\choose 2n-k+1}(-1)^{k}\int_0^1x^{2n-k+1}[f(x)]^{k-1}f'(x)dx\right\}=\\ &=&\frac1{2n+1}+\sum_{k=1}^{n}\left\{{2n \choose k}(-1)^k\int_0^1x^{2n-k}[f(x)]^{k}dx+\right.\\ & &-\left.{2n\choose 2n-k+1}(-1)^{k}\frac{2n-k+1}{k}\int_0^1x^{2n-k}[f(x)]^{k}dx\right\}=\\ &=&\boxed{\frac1{2n+1}}. \end{eqnarray}


EDIT - "Slicker" solution

Change of variable $x \to f(x)$ yields \begin{eqnarray} \mathcal I &=& -\int_{0}^1(x-f(x))^{2n}f'(x)dx=\\ &=&\int_0^1(x-f(x))^{2n}(1-f'(x)-1)dx=\\ &=&\frac1{2n+1}\left[(x-f(x))^{2n+1}\right]_0^1 -\mathcal I=\\ &=&\frac2{2n+1}-\mathcal I. \end{eqnarray} Hence the result $$\boxed{\mathcal I = \frac1{2n+1}}.$$

Related Question