# Is there a better inverse chain rule, than u-substitution?

What are some possible ways to write a program that, following the rules of differentiation, to derive, implicitly, some function built from f(x) and g(x), and end up with f(g(x)) as a result?

Basically, is there a chain rule (and before you ask, I do know what u-substitution is, and that is not what I am looking for) for breaking up

$$\int f(g(x))dx$$

on any closed interval, into any combination of simple integral terms of f(x) or g(x), such as: $\int f(x)dx$, or $\iint g(x)dx$ or any of the derivatives of the two functions, multiplied together?

Even if the answer isn't a simple one, like integrating:

$$\int e^{-x^2}dx$$

using $\int {e^{-x}}dx=-e^{-x} + C$, or $\int {x^2}dx={x^3}/3 + C$, I still think it would be nice to hear a suggestion.

• Actually, $\int e^{-x^2}\ dx$ does not have an elementary anti-derivative. We had to make up a function $f(x)=\int_0^x e^{-t^2}\ dt$ to solve (or whatever) that integral... – Simply Beautiful Art Apr 4 '17 at 0:39
• – GEdgar Apr 4 '17 at 1:26