Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Integrating an InterpolatingFunction times another function
Replies: 2   Last Post: Apr 14, 2012 3:16 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Yi Wang

Posts: 21
Registered: 3/30/12
Re: Integrating an InterpolatingFunction times another function
Posted: Apr 14, 2012 3:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, Andrew,

I guess Interpolation is more useful numerically. If you want a result, try

NIntegrate[x*ifun[x], {x, 1, 5}]

On the other hand, if you want an exact result:

ifun2 = InterpolatingPolynomial[points, x]

Integrate[x*ifun2, {x, 1, 5}]

On Friday, April 13, 2012 5:04:27 AM UTC-4, Andrew DeYoung wrote:
> Hi,
>
> I have made a sample InterpolatingFunction:
>
> points = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}};
> ifun = Interpolation[points]
>
> The following integral computes fine:
>
> Integrate[ifun[x], {x, 1, 5}]
>
> However, this integral will not be evaluated:
>
> Integrate[x*ifun[x], {x, 1, 5}]
>
> Why will this integral not be computed? Is there any way that I can
> compute this integral?
>
> Thank you kindly!
>
> Andrew DeYoung
> Carnegie Mellon University






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.