MathGroup Archive 2010

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

Search the Archive

Re: Integration of InterpolatingFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108409] Re: Integration of InterpolatingFunction
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Wed, 17 Mar 2010 04:37:20 -0500 (EST)
  • References: <hnnk7o$cl4$1@smc.vnet.net>

Benjamin Hell wrote:

> Hi,
> I would like to use Integrate with on an InterpolatingFunction, which is 
> a spline. As the Interpolating function is a spline this should be 
> possible. And indeed it is, as long as I do not combine the 
> Interpolating function with any other function. Here is a simple example:
>
> Define
> /timevector = Table[i*0.1, {i, 0, 10}];
> discretesolution = Table[Random[], {i, 0, 10}];
> spline = Interpolation[Thread[{timevector, discretesolution}], 
> InterpolationOrder -> 1];
> /
> Then the following works fine:
> /Integrate[spline[t], {t, 0, 1}]/
>
> But the following does not:
> /Integrate[spline[t]+2, {t, 0, 1}]/
>
> Why is that?
>
I don't understand why that is, but NIntegrate instead of Integrate will work.

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Bug in NMinimize?
  • Next by Date: elementary question about packages
  • Previous by thread: Integration of InterpolatingFunction
  • Next by thread: Re: Integration of InterpolatingFunction