Integration by substitution is an integration technique for definite integrals based upon this formula : $$\displaystyle\int_{a}^{b}f(\phi(x))\phi'(x)\,dx=\int_{\phi(a)}^{\phi(b)}{f(u)\,du}$$
I don't understand how it can be applied in the case of indefinite integrals, how it can be used to find antiderivatives, , as in this example : $$\displaystyle\int{\frac{dx}{x^2+a^2}}=\frac{1}{a}\int{\frac{du}{1+u^2}}=\frac{1}{a}\tan^{-1}(u)+C=\frac{1}{a}\tan^{-1}\left(\frac{x}{a}\right)+C$$
The formula $\displaystyle\int_{a}^{b}{f(\phi(x))\phi'(x)\,dx}=\int_{\phi(a)}^{\phi(b)}{f(u)\,du}$ is for definite integrals. Why can it be applied to indefinite integrals ?
P.S. : I obviously already understand the algebra