MathGroup Archive 2010

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

Search the Archive

Re: Integration of InterpolatingFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108422] Re: Integration of InterpolatingFunction
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 17 Mar 2010 04:39:42 -0500 (EST)

(a) Why use Integrate, when the integrand is numeric, and no symbolic  
result is possible?

NIntegrate[spline[t] + 2, {t, 0, 1}]

2.54038

(b) What possessed you to add slashes to the code, to complicate  
copy/pasting it to Mathematica?

Bobby

On Tue, 16 Mar 2010 04:45:12 -0500, Benjamin Hell <hell at exoneon.de> 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?
>
> Thanks in advance,
> Benjamin
>
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Algebraic reduction
  • Next by Date: Re: Pi day
  • Previous by thread: Re: Integration of InterpolatingFunction
  • Next by thread: Re: Integration of InterpolatingFunction