MathGroup Archive 2002

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

Search the Archive

Re: Numeric Integration of Tabulated Integrand Function: Part I

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38418] Re: Numeric Integration of Tabulated Integrand Function: Part I
  • From: Tom Burton <tburton at brahea.com>
  • Date: Sat, 14 Dec 2002 03:20:04 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 12/13/02 1:57 AM, in article atcau9$3m7$1 at smc.vnet.net, "tasande at mit.edu"
<tasande at mit.edu> wrote:

> Dear Mathemticons( * ):
> 
> I have a very simple question.  I have a function that is NOT specified
> as an analytic expression.  Rather, the function is a previsouly
> tabulated list of the form:
> 
> F( x ):=
> 
> { ( x( 1 ),F( x( 1 ) ) ), ... , ( x( i ),F( x( i ) ) , ... ,
> ( x( N ),F( x( N ) ) ) }...

The choice of integration scheme is related to the best way to interpolate,
which depends on your function. But a very simple question deserves a
straightforward answer :-)

I would like to recommend that you interpolate explicitely and then
integrate. It's easy. It's pretty accurate for a lot of functions. The
method of interpolation is relatively well documented. And best of all, you
can see what you are doing. Here's an example:

data = {{1, 3}, {2, 4}, {3, 1}, {4, 2}, {5, 4}, {6, 1}, {7, 2}}

FF[x_] = Table[F[n][x_] =
    Interpolation[data, InterpolationOrder -> n][x],
         {n, 0, 5}]

Plot[Evaluate[FF[x]], {x, 1, 7}];

<< "NumericalMath`NIntegrateInterpolatingFunct`"

Table[{n, NIntegrateInterpolatingFunction[F[n][x], {x, 1, 7}]}, {n, 0, 5}]

Tom Burton



  • Prev by Date: AW: too many {{}}'s for listplot
  • Next by Date: Re: MathLink under Mac OS X
  • Previous by thread: Numeric Integration of Tabulated Integrand Function: Part I
  • Next by thread: Re: Numeric Integration of Tabulated Integrand Function: Part I