MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

numeric integration

  • To: mathgroup at
  • Subject: [mg81129] numeric integration
  • From: "C. Seja" <p5secr2 at>
  • Date: Thu, 13 Sep 2007 06:29:44 -0400 (EDT)


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 

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)?


C. Seja

  • Prev by Date: Optimization with symbolic paramters
  • Next by Date: Re: Timeout in HTML export?
  • Previous by thread: Re: Optimization with symbolic paramters
  • Next by thread: Re: numeric integration