Message Boards Message Boards

[?]  Avoid problem with FindMinimum in 11.2.0.0?

Posted 6 years ago

Hi,

I am running Mathematica 11.2.0.0 on Ubuntu 16.04.3 64 bit. I ran Interpolation and FindMinimum on a couple of two-dimensional data sets and FindMinimum seems to always find a 'minimum' at x->1. I am quite sure this was not the case with version 11.1.x, but the notebook is six month's old and I do not have the datasets used by that notebook any more, so I cannot compare. I have attached a notebook with an example dataset. ListPlot does not hint there is a minimum at x->1 but rather around x->160:

Regards, Gijsbert

Attachments:

The problem is that the derivative at 1 is small enough to be considered zero (according to the AccuracyGoal):

f'[1]
(*  -2.26383*10^-9  *)

Pick an AccuracyGoal several orders of magnitude above 9:

FindMinimum[f[x], x, AccuracyGoal -> 16]
(*  {0.0024294, {x -> 160.}}  *)

There is a FindMinimum::lstol warning because at x -> 160., the interpolating function is not differentiable.

If the singularity or the warning troubles you, consider a method that does not use derivatives:

FindMinimum[f[x], x, Method -> "PrincipalAxis", AccuracyGoal -> 16]
(*  {0.0024294, {x -> 160.035}}  *)

Alternatively, one might use the "Spline" method of interpolation:

Clear[f];
f = Interpolation[d, Method -> "Spline"];
FindMinimum[f[x], x, AccuracyGoal -> 16]
(*  {0.00242939, {x -> 160.498}}  *)

Of course, with the error inherent in interpolation, any of the answers is probably sufficiently accurate (or if not sufficient, then as accurate as is possible).

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract