Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 as a black box.

share|cite|improve this question
It is quite unclear what you're asking. Could you add more info? – Pedro Tamaroff Feb 13 '12 at 22:41
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
up vote 6 down vote accepted

If I'm reading your question correctly: I don't believe there is an algorithm that, given the algorithm for your function to be integrated and appropriate initial conditions, will give an algorithm that corresponds to the integral of your original function.

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.

share|cite|improve this answer
Thank you this is what I was hoping for! – Mikhail Feb 16 '12 at 22:45

Perhaps what you're thinking about is the Risch algorithm. See

share|cite|improve this answer
I don't think so. Automatic differentiation is not at all the same think as symbolic differentiation, so "automatic integration" (whatever that might be) is presumably not the same thing as symbolic integration. – Hans Lundmark Feb 14 '12 at 11:09
Perhaps Misha could say precisely what is meant in this case. As far as I know, given a procedure for computing a function (let's say of one variable), automatic differentiation produces a procedure for the derivative of that function. The result is algebraically equivalent to the symbolic derivative, although for reasons of efficiency it is not expressed as a single expresssion. It's true that Risch's algorithm doesn't address the efficiency issue, but deciding whether an elementary antiderivative exists must come first. – Robert Israel Feb 15 '12 at 2:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.