MathGroup Archive 2005

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

Search the Archive

NIntegrate with Minimize


I'm having trouble performing a numerical integration that involves a 
Minimize. I think it might have something to do with HoldAll, but am not 
sure how to fix it (couldn't find any actual solutions that worked in 
the archives). Any help most appreciated. Here is a simplified version 
of the code (the function and constraints I'm actually using are more 

ff[a_] := First[Minimize[{x + a, 0 â?¤ x â?¤ 2}, {x}]]
NIntegrate[ff[a], {a, 0, 6}]

Mathematica raises a Minimize::objv error, complaining that a+x contains 
a nonconstant expression independent of x, and so the NIntegrate fails. 


  • Prev by Date: Re: Colored Surface
  • Next by Date: Re: Colored Surface
  • Previous by thread: Re: GUIKit: <<file quirk
  • Next by thread: Re: NIntegrate with Minimize