Re: Integrating an InterpolatingFunction times another function
- To: mathgroup at smc.vnet.net
- Subject: [mg126073] Re: Integrating an InterpolatingFunction times another function
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Sat, 14 Apr 2012 03:14:17 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201204130857.EAA19506@smc.vnet.net>
Use NIntegrate points = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}}; Clear[ifun, g] ifun = Interpolation[points]; NIntegrate[x ifun[x], {x, 1, 5}] 32.3167 Bob Hanlon On Fri, Apr 13, 2012 at 4:57 AM, Andrew DeYoung <adeyoung at andrew.cmu.edu> 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 >
- References:
- Integrating an InterpolatingFunction times another function
- From: Andrew DeYoung <adeyoung@andrew.cmu.edu>
- Integrating an InterpolatingFunction times another function