Re: numeric integration
- To: mathgroup at smc.vnet.net
- Subject: [mg81137] Re: numeric integration
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 14 Sep 2007 03:26:04 -0400 (EDT)
- Organization: Uni Leipzig
- References: <fcb40h$fm3$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, try f[q_?NumericQ]: = NIntegrate[Sin[x + q], {x, 0, 1}] and NIntegrate[f[x], {x, 0, 0.1}] Regards Jens C. Seja wrote: > Hi, > > I'd like to intergate a function f with NIntegrate: > NIntegrate[f[x], {x, 0, 0.1}] > > But this doesn't work if, i.e. > > f = NIntegrate[Sin[x + #], {x, 0, 1}] & > > It will give a wrong result (0.7 instead of 0.05). Why? I mean, I can > evaluate f at any point without problems, i.e. f[0.1] gives 0.37. So why > doesn't > > NIntegrate[f[x], {x, 0, 0.1}] > > work? It doesn't even give a warning! So, is there a proper way to do this > (without using one two-dimensional NIntegrate)? > > Regards > > C. Seja > > >