I've a question which is mentioned below.
If $f(f(x)) = x$ where $x \in [0, 1]$ and $f(0) = 1$, then find the value of $\displaystyle\int_0^1 (x - f(x))^{2n} dx$ where $n\in \mathbb{N}.$
I tried it and I think I've solved it. I wish if someone could check my work or provide any alternative or easy way to do the same.
Here's my work.
Given that $f(f(x)) = x$ so $f(x) = f^{-1}(x)$ $\forall\ x\in [0, 1] $ assuming inverse exists.
And since $f(0) = 1$, we have $f^{-1}(0) = 1$.
Now, from the definition of inverse function, graph of $f(x)$ and $f^{-1}(x)$ are mirror images of each other about the line $y = x$. Since $f(0) = 1, f^{-1}(1) = 0$. This means that $f(x)$ and $f^{-1}(x)$ are coincident lines with equation $x + y = 1$ or $f(x) = 1 -x$.
Graph of the same is attached below.
Now
Since, $f(x) = 1-x$, our next task is to find $\displaystyle \int_0^1 (x - f(x))^{2n} dx$ i.e. $\displaystyle\int_0^1 (2x - 1)^{2n} dx$
which is not a hard nut to crack.
We have, $$\int_0^1 (2x - 1)^{2n} dx = \frac{(2x-1)^{2n+1}}{2(2n+1)}\bigg|^1_0 = \frac{1}{2(2n+1)} + \frac{1}{2(2n+1)} = \boxed{\frac{1}{2n+1}}.$$
I'm unsure if assuming inverse of the function exists is right.
Can anyone please check my work and let me know if I can improve it?