# Integration analog of automatic differentiation

I was recently looking at automatic differentiation.

1. Does something like automatic differentiation exist for integration?
2. Would the integral be equivalent to something like Euler's method? (or am I thinking about it wrong?)

edit: I am looking at some inherited code that includes https://projects.coin-or.org/ADOL-C as a black box.

-
With differentiation, knowledge of basic derivatives and rules for elementary compositions yields a very straightforward algorithm for computing partial derivatives. But for a function like $f(x,y)=3x^2+y$, which integral do you mean? With respect to $x$ or $y$? Both of them? Also it's easy to write down elementary compositions which have no indefinite integral, e.g. $f(x)=e^{x^2}$. Symbolically differentiation is easier, whereas numerically integration is easier (not a precise statement). –  dls Feb 13 '12 at 22:46
Also, Euler's method is for solving initial value problems like $dy/dt=y$. This is different from finding an anti-derivative, that is, a function $F(y)$ such that $dF/dy=y$. –  dls Feb 13 '12 at 22:55
A simple search will yield some hits. –  André Nicolas Feb 13 '12 at 22:56
@AndréNicolas Would you mind providing some links? I don't believe what the poster is asking for actually exists. –  dls Feb 14 '12 at 3:09

However: you might wish to look into the Chebfun project by Trefethen, Battles, Driscoll, and others. What this system does is to internally represent a function given to it as a piecewise polynomial of possibly high degree, interpolated at appropriately shifted and scaled "Chebyshev points" (roots of the Chebyshev polynomial of the first kind). The resulting chebfun() object is then easily differentiated, integrated, or whatever other operation you might wish to do to the function. See the user guide for more details on this approach.