Theorem (indirect substition)
Let f be a function defined on an interval I. Let g be a function from an intervalu J into an interval I which is differentiable on J, and let h be a function from I into J such that g(h(x)) = x on I. If G is an antiderivative of f (g)g on J, then G(h) is an antiderivative of f on I:

Note: The assumptions are most often satisfied by taking g that is one-to-one on J with the range I; therefore there exists an inverse function on J which will do as h. In practice, the indirect substitution is much easier than the theorem appears; however, it is good to keep in mind that this theorem does have some assumptions. We traditionally sort of ignore them when evaluating integrals, which makes it all the more important to check the answers in the end.