Re: FunctionInterpolation and NIntegrate
- To: mathgroup at smc.vnet.net
- Subject: [mg120835] Re: FunctionInterpolation and NIntegrate
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Fri, 12 Aug 2011 05:05:24 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Reply-to: hanlonr at cox.net
f can only be evaluated successfully for numeric arguments so restrict it..
f[r_?NumericQ] := NIntegrate[r + s, {s, 0, 1}]
g = FunctionInterpolation[f[r], {r, 0, 1}]
Bob Hanlon
---- gac <g.crlsn at gmail.com> wrote:
=============
f[r_] := NIntegrate[r + s , {s, 0, 1}]
g = FunctionInterpolation[f[r], {r, 0, 1}]
Can anyone explain why this works, yet I get the msg:
NIntegrate::inumr: "The integrand r+s has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,1}}."
Can the statements be reformed to avoid the msg?
Thanks.
Glenn