A handy integration trick a couple of days ago I stumbled upon a handy integration trick which goes like this

$$ \int_{}^{} f(x)^n dx = \int_{}^{f(x)} x^n(f^{-1}(x))'dx $$

where $f^{-1}(x)$ is the inverse of $f(x)$.

This can easily be proven by taking the derivative of both sides. You then get $\frac{d}{dx}\int_{}^{} f(x)^n dx = f(x)^n$

and $\frac{d}{dx}\int_{}^{f(x)} x^n(f^{-1}(x))' dx = \frac{f(x)^nf'(x)}{f'(f^{-1}(f(x)))} = f(x)^n$. Since $(f^{-1}(x))' = \frac{1}{f'(f^{-1}(x))}$.

This can be used to find hard integrals like $\int \tan(x)^3 dx$. 

$n=3$, $f(x) = \tan(x)$, $f^{-1}(x) = \arctan(x)$ and $(f^{-1}(x))' = \frac{1}{1+x^2}$

$$ \int_{}^{} \tan(x)^3 dx = \int_{}^{\tan(x)} \frac{x^3}{1+x^2} dx= \int_{}^{\tan(x)} x-\frac{x}{1+x^2} dx = [\frac{1}{2}\left(x^2-\ln(1+x^2)\right)]^{\tan(x)} = $$
$$ \frac{1}{2}\left(\tan(x)^2 - \ln(1+\tan(x)^2)\right) + C $$

I have never seen this trick before, so I was quite amazed when I saw how powerful it could be. Solving higher exponents of $\tan(x)$ was not a big challenge.

Let's take a new example. $n=1$, $f(x) = \arccos(x)$, $f^{-1}(x) = \cos(x)$ and $(f^{-1}(x))' = -\sin(x)$.

$$ \int \arccos(x) dx = \int_{}^{\arccos(x)} -x\sin(x) dx = [x\cos(x)-\sin(x)]^{\arccos(x)} =$$

$$ x\arccos(x) - \sin(\arccos(x))+C = $$

$$ x\arccos(x) - \sqrt{1-x^2} + C$$

So I don't have a question, just wanted to show it to you. Please let me know what you think!
$$\int(\tan x)^3dx=\int_{}^{\tan x}y^3d(\arctan y)=\int_{}^{\tan x}\frac{y^3}{1+y^2}dy=\int_{}^{\tan x}\left(y-\frac{y}{1+y^2}\right)dx$$
$$=\left(\frac{y^2}{2}-\frac{1}{2}\ln |{1+y^2}|\right)^{\tan x}+C=\frac{1}{2}\tan ^2x+\ln |\cos x|+C$$
$$\int \arccos xdx=\int^{\arccos x} yd(\cos y)=y\cos y-\int^{\arccos x}\cos ydy=y\cos y-\sin y+C$$
$$=x\arccos x-\sqrt{1-x^2}+C $$
$$\int(\tan x)^3dx=\int_{}^{\tan x}y^3d(\arctan y)=\int_{}^{\tan x}\frac{y^3}{1+y^2}dy=\int_{}^{\tan x}\left(y-\frac{y}{1+y^2}\right)dx$$
$$=\left(\frac{y^2}{2}-\frac{1}{2}\ln |{1+y^2}|\right)^{\tan x}+C=\frac{1}{2}\tan ^2x+\ln |\cos x|+C$$
$$\int \arccos xdx=\int^{\arccos x} yd(\cos y)=y\cos y-\int^{\arccos x}\cos ydy=y\cos y-\sin y+C$$
$$=x\arccos x-\sqrt{1-x^2}+C $$