11
$\begingroup$

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.

  • 2
    It is quite unclear what you're asking. Could you add more info?2012-02-13
  • 0
    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).2012-02-13
  • 0
    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$.2012-02-13
  • 0
    A simple search will yield some hits.2012-02-13
  • 0
    @AndréNicolas Would you mind providing some links? I don't believe what the poster is asking for actually exists.2012-02-14
  • 0
    I do not know precisely what the OP means by automatic integration. However, this is one of [many hits.](http://www.amazon.com/Quadpack-Subroutine-Integration-Computational-Mathematics/dp/0387125531)2012-02-14

2 Answers 2

8

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.

  • 0
    Thank you this is what I was hoping for!2012-02-16
3

Perhaps what you're thinking about is the Risch algorithm. See http://en.wikipedia.org/wiki/Risch_algorithm

  • 2
    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.2012-02-14
  • 0
    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.2012-02-15