MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simple integral problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32678] Re: [mg32650] Simple integral problem
  • From: "Rolf Mertig" <rolf at mertig.com>
  • Date: Wed, 6 Feb 2002 03:41:31 -0500 (EST)
  • Reply-to: rolf at mertig.com
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
wasn't it Lenin who said "Trust is good, control is better"?
Long years ago I made a large table of integrals similar to yours.
Basically you write a function which does linear algebra, some 
canonicalizaion (like partial fraction decomposition etc.) and then
you use table look-up. This way you know what you are doing and 
you don´t have to rely on functions like Integrate which are tremendously
difficult to have bug-free. But the the pattern matcher and the programming
language are rather bug-free ...
Here it comes (this will work in Mathematica 3.0 - 4.1) :

In[1]:= <<HighEnergyPhysics`fc` ; $PrePrint=InputForm ;

In[2]:= Integrate2[x(1 - x)Log[1 + 1/x], {x, 0, 1}]

Out[2]= 2/3 - (2*Log[2])/3

In[3]:= N@%

Out[3]= 0.2045685462933698

You can download the source from http://www.feyncalc.org
Integrate2 (and Integrate3, which is a simpler version) is 
documented at
http://www.feyncalc.org/Integrate2

Notice that for thousands of integrals such a specialized table-look-up
method will nearly always be quicker than if you would use things like
Integrate directly ( unfortunately Mathematica has not been designed 
obviously to handle truly large symbolic expression well; but again:
Mathematica as a programming language is nearly perfect so you can, 
with a bit of effort, usually solve your real-world problem in a 
decent time (and if you cant you can always use MathLink and sub-use
C or FORM or whatever)).

Rolf Mertig

http://www.mertig.com

P.s.: If there is interest I could cook up some webMathematica 
      example sites using FeynCalc functions (which ones?? )




  • Prev by Date: Re: Simple integral problem
  • Next by Date: Re: About programming Mathematica [Newbie question]
  • Previous by thread: Re: Simple integral problem
  • Next by thread: Re: Simple integral problem