MathGroup Archive 2010

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

Search the Archive

problems with NMinimize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109341] problems with NMinimize
  • From: Neil Broderick <ngb at ecs.soton.ac.uk>
  • Date: Thu, 22 Apr 2010 06:43:29 -0400 (EDT)
  • References: <7421ECC6-40B8-47B3-B7E5-04BC68BFCEE1@ecs.soton.ac.uk>

Hi,
I am trying to use NMinimize to find the solutions to various numerical equations and I keep getting error
messages concerning non-numerical values. For example consider the following:

In[2]:= NMinimize[Abs[NIntegrate[Sin[x], {x, -a, b}]]^2, {a, b}]

During evaluation of In[2]:= NIntegrate::nlim: x = -1. a is not a valid limit of integration. >>

During evaluation of In[2]:= NIntegrate::nlim: x = -1. a is not a valid limit of integration. >>

During evaluation of In[2]:= NIntegrate::nlim: x = -1. a is not a valid limit of integration. >>

During evaluation of In[2]:= General::stop: Further output of NIntegrate::nlim will be suppressed during this calculation. >>

Out[2]= {5.08978*10^-24, {a -> 0.0994414, b -> 0.0994414}}

My actual problem involves taking Fourier transforms of lists of numbers but you get the picture. Why is
NMinimize putting variables into the function rather than just numbers and is the likely to cause a problem
in some cases?

regards,
Neil=


  • Prev by Date: Re: Find (cyclic) Sequence
  • Next by Date: Re: Unevaluated functions
  • Previous by thread: Re: NDSolve cannot solve set of ODEs
  • Next by thread: Re: problems with NMinimize