MathGroup Archive 2005

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

Search the Archive

Re: NIntegrate with Minimize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53558] Re: NIntegrate with Minimize
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 18 Jan 2005 05:07:58 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <csffh8$6h2$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

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


Regards

  Jens

"Oz" <x_download at hotmail.com> schrieb im Newsbeitrag 
news:csffh8$6h2$1 at smc.vnet.net...
> Hiya,
>
> 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
> complicated):
>
> 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.
> Ideas?
>
> Thanks,
> Oz
>
> 



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