3

After using Wolfram Alpha and MATLAB's Symbolic Math Toolbox for solving integrals, ODEs and PDEs, I got curious to know how would I implement an analytical(closed-form) integration(or non-trivial equation) solver.

For example, how could i programmatically solve the following integral analytically?

enter image description here

muzio
  • 310
  • 1
  • 7

1 Answers1

1

Integrals are solved by (very complicated) pattern matching. If the integrand looks like the square root of something, then the integral is ...; if it looks like a rational function, then the integral is ..., if exponential, then ...., etc etc etc. There are at least two major difficulties. One is recognizing that an integrand matches one pattern or another, the other is constructing the solution once you have a pattern match. The paper by Lichtblau cited above is about the second part. As to pattern matching on expressions, try a web search for "pattern matching" or "unification". As it happens, pattern matching is most naturally expressed in Lisp, but it can also be handled in other programming languages, usually by reinventing a subset of Lisp.

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48