NIntegrate embedded in a function
- To: mathgroup at smc.vnet.net
- Subject: [mg28122] NIntegrate embedded in a function
- From: Mike Yukish <may106 at psu.edu>
- Date: Sat, 31 Mar 2001 02:58:54 -0500 (EST)
- Organization: Penn State University, Center for Academic Computing
- Sender: owner-wri-mathgroup at wolfram.com
I want to write a function along the lines of... foo[x_] := NIntegrate[Cos[y^2],{y,0,x}] so the function argument is the limit of the integral. Then make a surrogate for it... bar = FunctionInterpolation[foo[z],{z,0,10}] This works, and I get a bar[ ] function that matches foo[ ] over the domain, but first I get a whole bunch of errors along the lines of.... NIntegrate::nlim : "y = z is not a valid limit of integration." Is there any way to avoid these errors other than turning them off? Some sort of evaluation order trickery?