General Solution for the Integral of $f^{-1}(x)$ in Terms of $f(x)$

Note that $$\int f^{-1}(x)\,dx=\int 1\cdot f^{-1}(x)\,dx = x\cdot f^{-1}(x)-\int x\cdot (f^{-1})’(x)\,dx$$ $$=x\cdot f^{-1}(x)-\int \frac{x}{f’(f^{-1}(x))}\,dx$$
Now, we calculate $\int \frac{x}{f’f^{-1}(x)}\,dx$:
Let $F=\int f(x)\,dx$, and make the substitutions of $u=f^{-1}(x)\implies x=f(u)\implies dx=f’(u)\,du$. Therefore, we have transformed our integral to:
$$\int \frac{f(u)}{f’(u)}f’(u)\,du=F(u)=F(f^{-1}(x))$$
$$\therefore \int f^{-1}(x)\,dx = x\cdot f^{-1}(x)-F(f^{-1}(x))$$