# FindMinimum with constraint produces incorrect results

Issuing the following:

FindMinimum[{x, ((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10}, {x, 2}]


produces a value of 13.1686 . The constraint for that value is: 1.50531*10^-7 . I get the same result for an exponent of -20 or even -100 . Changing the starting point, even as far as 200, produced similar results.

I have used FindMinimum for many other examples, with consistent success -- until now.

Where is my error?

Thank you.

• If I understand correctly, the answer is zero (from @user64494 's answer). But all values immediately surrounding that value are complex. Wouldn't that isolated real point be expected to cause FindMinimum some problems? Your function is not monotonic over all values of $x$.
– JimB
May 3 at 14:54
• Plot[((2 x + 1)/(3 x - 2))^(4 x - 3), {x, 2, 20}] seems to be pretty well-behaved, monotonically decreasing, and (obviously) a nice negative derivative. May 4 at 15:39
• It is well-behaved in that range of $x$ values. But the global (real) minimum occurs when $x=0$.
– JimB
May 4 at 16:06

Try NMinimize

mini=NMinimize[{x, ((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10, x > 2 }, x ]
(*{17.7168, {x -> 17.7168}}*)

((2 x + 1)/(3 x - 2))^(4 x - 3) /. mini[]
(*1.*10^-10*)


To make FindMinimum work the constraint has to be modified( don't know why):

FindMinimum[{x, Log[10, ((2 x + 1)/(3 x - 2))^(4 x - 3)] <= -10,2 < x < 20}, {x, 2} ]
(*{17.7168, {x -> 17.7168}}*)

• 1) TYVM. 2) I was using FindMinimum as it finds local minima. I would prefer that. 3) With your way, I was able to rid of the NMinimize::incst warning but adding the partially-undocumented range for the initial range of the second argument. 4) Stil this only worked until 10^-27. After that, the results with unchanged and garbage. 5) I still do not understand how FindMinimum finishes with an incorrect result, without even a warning. Is this a bug to report? May 3 at 11:32
• Your function decreases monotonically for x>2, x->Infinity and you are looking for the smallest x for which the constraint holds! What's the reason to expect local minimas? May 3 at 12:29
• But my function is just the monotonic increasing x, with that monotonic decreasing constraint. So why would this not work (like it does for all of the dozens of other constraints I used)? May 3 at 12:38
• It works as expected, NMinimize evaluates the unique solution! May 3 at 12:42
• I am sorry that I was not clear enough. I was asking why FindMinimum does not behave correctly. May 3 at 13:49

Let us look at the result of

Reduce[((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10, x, Reals]


x==0||x==1/2||2/3<x<=0.667[Ellipsis]||x>=17.7[Ellipsis]

Then FindMinimum does its best by

FindMinimum[{x,Reduce[((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10, x, Reals]}, {x,2}]


{0.666667, {x -> 0.666667}}

and Minimize does its best by

Minimize[{x, Reduce[((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10, x, Reals]}, x]


{0, {x -> 0}}

• NMinimize[{x, Reduce[((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10, x, Reals]}, x] results in {0., {x -> 0.}}. May 3 at 13:57
• Thank you for this reply. You have added Reduce which according to the manual page: "The result of Reduce[expr,vars] always describes exactly the same mathematical set as expr." But why then are your and my results different? And, my result does not have a constraint of less than 10^-10? May 3 at 14:05
• @AharonNalman: Yes ((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10 and Reduce[((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10, x, Reals] define the same sets over the reals, but not the same sets over the complexes.as RegionPlot[ Re[(2 (x + I*y + 1)/(3 (x + I*y) - 2))^(4 (x + I*y) - 3)] <= 10^-10, {x, -1, 20}, {y, -1, 1}] shows. Also the result of Reduce have a simpler form which is more convenient for FindMinimum. Don't hesitate to ask for further explanation in need. May 3 at 14:27
• @AharonNalman: Also see ContourPlot[ Im[(2 (x + I*y + 1)/(3 (x + I*y) - 2))^(4 (x + I*y) - 3)] == 0, {x, -1, 20}, {y, -1, 1}, PlotPoints -> 50]. These plots together show complex solutions of the inequality ((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10.. May 3 at 14:59
• Thank you again for these explanations. I have tried to introduce x being real other ways (Assuming, as a constraint, with Re, etc.), to no avail. I am still stymied how FindMinimum can return a value for x, with the constraint not at all fulfilled. May 3 at 19:12