Re: Integrating an InterpolatingFunction times another function
- To: mathgroup at smc.vnet.net
- Subject: [mg126070] Re: Integrating an InterpolatingFunction times another function
- From: A Retey <awnl at gmx-topmail.de>
- Date: Sat, 14 Apr 2012 03:13:15 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jm8q6r$j74$1@smc.vnet.net>
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?
Use NIntegrate. It's probably worth noting that it is a very special
feature that integration of just interpolating functions works
symbolically, you can even get another interpolating function for the
indefinite integral, e.g.:
Integrate[ifun[x],x]
hth,
albert