Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Possible simple bug in NMaximize

  • To: mathgroup at
  • Subject: [mg71061] Re: [mg71040] Possible simple bug in NMaximize
  • From: Andrzej Kozlowski <akoz at>
  • Date: Wed, 8 Nov 2006 06:01:39 -0500 (EST)
  • References: <>

On 6 Nov 2006, at 16:52, Nick Grishin wrote:

> (* does not work *)
> func = Hold[NIntegrate[t^3, {t, x, 0}]];
> NMaximize[func, x]
> (* works *)
> func = Hold[NIntegrate[t^3, {t, 0, x}]];
> NMinimize[func, x]
> $Version
> 5.2 for Microsoft Windows (June 20, 2005)

A bug in NMaximize? Why? It behaves exactly as it should do with this  
kind of input.  The problem is with MMinimize, because you when you  
give it nonsensical input it actually produces output, which  
unfortunately (by sheer accident),  looks as if it might be right.  
But it is nonssense nonetheless (nonsense in - > nonsense out)  
nonsensical, and  to convince you of it I will slightly change your  

func = Hold[NIntegrate[t^3, {t, 10, x}]];

NMinimize[func, x]

{-2500.0000000000005, {x -> -0.0002833987269403981}}

Now, does this look like it "works"?

Andrzej Kozlowski

  • Prev by Date: CleanSlate
  • Next by Date: Re: building a list containing elements f(i,j)
  • Previous by thread: Re: Possible simple bug in NMaximize
  • Next by thread: Re: Possible simple bug in NMaximize