Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4344 > unrolled thread

Re: FunctionInterpolation and NIntegrate

Started byPatrick Scheibe <pscheibe@trm.uni-leipzig.de>
First post2011-08-12 09:09 +0000
Last post2011-08-12 09:09 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: FunctionInterpolation and NIntegrate Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-08-12 09:09 +0000

#4344 — Re: FunctionInterpolation and NIntegrate

FromPatrick Scheibe <pscheibe@trm.uni-leipzig.de>
Date2011-08-12 09:09 +0000
SubjectRe: FunctionInterpolation and NIntegrate
Message-ID<j22qkr$grb$1@smc.vnet.net>
Hi,

since you don't know what exactly FunctionInterpolation makes with your
f[r] you should ensure that it is only evaluated to the rhs if the
parameter r is numeric.

f[r_?NumericQ] := NIntegrate[r + s, {s, 0, 1}]
g = FunctionInterpolation[f[r], {r, 0, 1}]

and everything should be fine.

Cheers
Patrick


On Thu, 2011-08-11 at 07:55 -0400, gac 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
> 


[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web