MathGroup Archive 2007

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

Search the Archive

numeric integration


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




  • 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