I am trying to find the global minimum of this simple function for real x and y
f = x^2*(1 + Sin[y]);
Of course, I know it is 0. But Mathematica seems not be able to handle this expression since
MinValue[f, {x, y}, Reals]
only returns itself (so Mathematica was not able to find a solution with its rules). As far as I have read, this is due to the capabilities of Minimize and its buddies (MinValue, ...) only to handle polynomial expressions, right? I have read this questions
Simple minimization not evaluating
Mathematica: commands return no output, but itself. Bug?
Question: are there any further general tricks or further specifications you can use for non-polynomial expressions without constraints? Asking for a vanishing derivative is naturally a good option here. But for uglier high-dimensional expressions (with a lot of minima and maxima), it would still be needed to check the second derivative for positive definiteness and so on.
I am actually only interested on the minimal value (or infimum), not on all possible spots for it. I have naturally a more complicated expression, but I wanted to just discuss a simplified problem. I tried some non-polynomial expressions with Maple (yuck!) and, sadly, it works. But before I write my complete code and problem in Maple I just wanted to ask. Thanks!
EDIT 1 (2015-10-26): My actual function is
f = 10381/65536 + (105 Cos[4 nphi])/16384 + (6125 Cos[8 nphi])/
196608 + (1225 Cos[4 nphi - 8 nth])/
98304 + (175 Cos[8 nphi - 8 nth])/
393216 - (175 Cos[4 nphi - 6 nth])/
4096 - (175 Cos[8 nphi - 6 nth])/
49152 + (1295 Cos[4 nphi - 4 nth])/
24576 + (1225 Cos[8 nphi - 4 nth])/
98304 - (105 Cos[4 nphi - 2 nth])/
4096 - (1225 Cos[8 nphi - 2 nth])/49152 + (2485 Cos[2 nth])/
24576 + (2345 Cos[4 nth])/16384 + (2275 Cos[6 nth])/
24576 + (5775 Cos[8 nth])/65536 - (105 Cos[4 nphi + 2 nth])/
4096 - (1225 Cos[8 nphi + 2 nth])/
49152 + (1295 Cos[4 nphi + 4 nth])/
24576 + (1225 Cos[8 nphi + 4 nth])/
98304 - (175 Cos[4 nphi + 6 nth])/
4096 - (175 Cos[8 nphi + 6 nth])/
49152 + (1225 Cos[4 nphi + 8 nth])/
98304 + (175 Cos[8 nphi + 8 nth])/
393216 + (1155 Cos[4 nphi - 4 th])/
32768 + (175 Cos[8 nphi - 4 th])/
393216 + (35 Cos[4 nphi - 8 nth - 4 th])/
196608 + (5 Cos[8 nphi - 8 nth - 4 th])/
786432 + (35 Cos[4 nphi - 6 nth - 4 th])/
8192 - (5 Cos[8 nphi - 6 nth - 4 th])/
98304 - (105 Cos[4 nphi - 4 nth - 4 th])/
16384 + (35 Cos[8 nphi - 4 nth - 4 th])/
196608 - (385 Cos[4 nphi - 2 nth - 4 th])/
24576 - (35 Cos[8 nphi - 2 nth - 4 th])/
98304 + (525 Cos[2 nth - 4 th])/
16384 - (385 Cos[4 nphi + 2 nth - 4 th])/
24576 - (35 Cos[8 nphi + 2 nth - 4 th])/
98304 + (5705 Cos[4 nth - 4 th])/
98304 - (105 Cos[4 nphi + 4 nth - 4 th])/
16384 + (35 Cos[8 nphi + 4 nth - 4 th])/
196608 - (415 Cos[6 nth - 4 th])/
49152 + (35 Cos[4 nphi + 6 nth - 4 th])/
8192 - (5 Cos[8 nphi + 6 nth - 4 th])/
98304 + (165 Cos[8 nth - 4 th])/
131072 + (35 Cos[4 nphi + 8 nth - 4 th])/
196608 + (5 Cos[8 nphi + 8 nth - 4 th])/
786432 - (315 Cos[4 nphi - 3 th])/4096 - (175 Cos[8 nphi - 3 th])/
49152 - (35 Cos[4 nphi - 8 nth - 3 th])/
24576 - (5 Cos[8 nphi - 8 nth - 3 th])/
98304 - (35 Cos[4 nphi - 6 nth - 3 th])/
2048 + (5 Cos[8 nphi - 6 nth - 3 th])/
12288 + (245 Cos[4 nphi - 4 nth - 3 th])/
6144 - (35 Cos[8 nphi - 4 nth - 3 th])/
24576 + (35 Cos[4 nphi - 2 nth - 3 th])/
2048 + (35 Cos[8 nphi - 2 nth - 3 th])/
12288 - (245 Cos[2 nth - 3 th])/
6144 + (35 Cos[4 nphi + 2 nth - 3 th])/
2048 + (35 Cos[8 nphi + 2 nth - 3 th])/
12288 - (315 Cos[4 nth - 3 th])/
4096 + (245 Cos[4 nphi + 4 nth - 3 th])/
6144 - (35 Cos[8 nphi + 4 nth - 3 th])/
24576 + (205 Cos[6 nth - 3 th])/
6144 - (35 Cos[4 nphi + 6 nth - 3 th])/
2048 + (5 Cos[8 nphi + 6 nth - 3 th])/
12288 - (165 Cos[8 nth - 3 th])/
16384 - (35 Cos[4 nphi + 8 nth - 3 th])/
24576 - (5 Cos[8 nphi + 8 nth - 3 th])/
98304 + (245 Cos[4 nphi - 2 th])/8192 + (1225 Cos[8 nphi - 2 th])/
98304 + (245 Cos[4 nphi - 8 nth - 2 th])/
49152 + (35 Cos[8 nphi - 8 nth - 2 th])/
196608 + (35 Cos[4 nphi - 6 nth - 2 th])/
2048 - (35 Cos[8 nphi - 6 nth - 2 th])/
24576 - (805 Cos[4 nphi - 4 nth - 2 th])/
12288 + (245 Cos[8 nphi - 4 nth - 2 th])/
49152 + (175 Cos[4 nphi - 2 nth - 2 th])/
6144 - (245 Cos[8 nphi - 2 nth - 2 th])/
24576 - (455 Cos[2 nth - 2 th])/
12288 + (175 Cos[4 nphi + 2 nth - 2 th])/
6144 - (245 Cos[8 nphi + 2 nth - 2 th])/
24576 - (1505 Cos[4 nth - 2 th])/
24576 - (805 Cos[4 nphi + 4 nth - 2 th])/
12288 + (245 Cos[8 nphi + 4 nth - 2 th])/
49152 - (385 Cos[6 nth - 2 th])/
12288 + (35 Cos[4 nphi + 6 nth - 2 th])/
2048 - (35 Cos[8 nphi + 6 nth - 2 th])/
24576 + (1155 Cos[8 nth - 2 th])/
32768 + (245 Cos[4 nphi + 8 nth - 2 th])/
49152 + (35 Cos[8 nphi + 8 nth - 2 th])/
196608 + (35 Cos[4 nphi - th])/4096 - (1225 Cos[8 nphi - th])/
49152 - (245 Cos[4 nphi - 8 nth - th])/
24576 - (35 Cos[8 nphi - 8 nth - th])/
98304 + (35 Cos[4 nphi - 6 nth - th])/
2048 + (35 Cos[8 nphi - 6 nth - th])/
12288 + (35 Cos[4 nphi - 4 nth - th])/
6144 - (245 Cos[8 nphi - 4 nth - th])/
24576 - (35 Cos[4 nphi - 2 nth - th])/
2048 + (245 Cos[8 nphi - 2 nth - th])/
12288 - (35 Cos[2 nth - th])/6144 - (35 Cos[4 nphi + 2 nth - th])/
2048 + (245 Cos[8 nphi + 2 nth - th])/
12288 + (35 Cos[4 nth - th])/4096 + (35 Cos[4 nphi + 4 nth - th])/
6144 - (245 Cos[8 nphi + 4 nth - th])/
24576 - (245 Cos[6 nth - th])/
6144 + (35 Cos[4 nphi + 6 nth - th])/
2048 + (35 Cos[8 nphi + 6 nth - th])/
12288 - (1155 Cos[8 nth - th])/
16384 - (245 Cos[4 nphi + 8 nth - th])/
24576 - (35 Cos[8 nphi + 8 nth - th])/98304 + (5285 Cos[th])/
24576 + (9275 Cos[2 th])/49152 + (4595 Cos[3 th])/
24576 + (49325 Cos[4 th])/196608 + (35 Cos[4 nphi + th])/
4096 - (1225 Cos[8 nphi + th])/
49152 - (245 Cos[4 nphi - 8 nth + th])/
24576 - (35 Cos[8 nphi - 8 nth + th])/
98304 + (35 Cos[4 nphi - 6 nth + th])/
2048 + (35 Cos[8 nphi - 6 nth + th])/
12288 + (35 Cos[4 nphi - 4 nth + th])/
6144 - (245 Cos[8 nphi - 4 nth + th])/
24576 - (35 Cos[4 nphi - 2 nth + th])/
2048 + (245 Cos[8 nphi - 2 nth + th])/
12288 - (35 Cos[2 nth + th])/6144 - (35 Cos[4 nphi + 2 nth + th])/
2048 + (245 Cos[8 nphi + 2 nth + th])/
12288 + (35 Cos[4 nth + th])/4096 + (35 Cos[4 nphi + 4 nth + th])/
6144 - (245 Cos[8 nphi + 4 nth + th])/
24576 - (245 Cos[6 nth + th])/
6144 + (35 Cos[4 nphi + 6 nth + th])/
2048 + (35 Cos[8 nphi + 6 nth + th])/
12288 - (1155 Cos[8 nth + th])/
16384 - (245 Cos[4 nphi + 8 nth + th])/
24576 - (35 Cos[8 nphi + 8 nth + th])/
98304 + (245 Cos[4 nphi + 2 th])/8192 + (1225 Cos[8 nphi + 2 th])/
98304 + (245 Cos[4 nphi - 8 nth + 2 th])/
49152 + (35 Cos[8 nphi - 8 nth + 2 th])/
196608 + (35 Cos[4 nphi - 6 nth + 2 th])/
2048 - (35 Cos[8 nphi - 6 nth + 2 th])/
24576 - (805 Cos[4 nphi - 4 nth + 2 th])/
12288 + (245 Cos[8 nphi - 4 nth + 2 th])/
49152 + (175 Cos[4 nphi - 2 nth + 2 th])/
6144 - (245 Cos[8 nphi - 2 nth + 2 th])/
24576 - (455 Cos[2 nth + 2 th])/
12288 + (175 Cos[4 nphi + 2 nth + 2 th])/
6144 - (245 Cos[8 nphi + 2 nth + 2 th])/
24576 - (1505 Cos[4 nth + 2 th])/
24576 - (805 Cos[4 nphi + 4 nth + 2 th])/
12288 + (245 Cos[8 nphi + 4 nth + 2 th])/
49152 - (385 Cos[6 nth + 2 th])/
12288 + (35 Cos[4 nphi + 6 nth + 2 th])/
2048 - (35 Cos[8 nphi + 6 nth + 2 th])/
24576 + (1155 Cos[8 nth + 2 th])/
32768 + (245 Cos[4 nphi + 8 nth + 2 th])/
49152 + (35 Cos[8 nphi + 8 nth + 2 th])/
196608 - (315 Cos[4 nphi + 3 th])/4096 - (175 Cos[8 nphi + 3 th])/
49152 - (35 Cos[4 nphi - 8 nth + 3 th])/
24576 - (5 Cos[8 nphi - 8 nth + 3 th])/
98304 - (35 Cos[4 nphi - 6 nth + 3 th])/
2048 + (5 Cos[8 nphi - 6 nth + 3 th])/
12288 + (245 Cos[4 nphi - 4 nth + 3 th])/
6144 - (35 Cos[8 nphi - 4 nth + 3 th])/
24576 + (35 Cos[4 nphi - 2 nth + 3 th])/
2048 + (35 Cos[8 nphi - 2 nth + 3 th])/
12288 - (245 Cos[2 nth + 3 th])/
6144 + (35 Cos[4 nphi + 2 nth + 3 th])/
2048 + (35 Cos[8 nphi + 2 nth + 3 th])/
12288 - (315 Cos[4 nth + 3 th])/
4096 + (245 Cos[4 nphi + 4 nth + 3 th])/
6144 - (35 Cos[8 nphi + 4 nth + 3 th])/
24576 + (205 Cos[6 nth + 3 th])/
6144 - (35 Cos[4 nphi + 6 nth + 3 th])/
2048 + (5 Cos[8 nphi + 6 nth + 3 th])/
12288 - (165 Cos[8 nth + 3 th])/
16384 - (35 Cos[4 nphi + 8 nth + 3 th])/
24576 - (5 Cos[8 nphi + 8 nth + 3 th])/
98304 + (1155 Cos[4 nphi + 4 th])/
32768 + (175 Cos[8 nphi + 4 th])/
393216 + (35 Cos[4 nphi - 8 nth + 4 th])/
196608 + (5 Cos[8 nphi - 8 nth + 4 th])/
786432 + (35 Cos[4 nphi - 6 nth + 4 th])/
8192 - (5 Cos[8 nphi - 6 nth + 4 th])/
98304 - (105 Cos[4 nphi - 4 nth + 4 th])/
16384 + (35 Cos[8 nphi - 4 nth + 4 th])/
196608 - (385 Cos[4 nphi - 2 nth + 4 th])/
24576 - (35 Cos[8 nphi - 2 nth + 4 th])/
98304 + (525 Cos[2 nth + 4 th])/
16384 - (385 Cos[4 nphi + 2 nth + 4 th])/
24576 - (35 Cos[8 nphi + 2 nth + 4 th])/
98304 + (5705 Cos[4 nth + 4 th])/
98304 - (105 Cos[4 nphi + 4 nth + 4 th])/
16384 + (35 Cos[8 nphi + 4 nth + 4 th])/
196608 - (415 Cos[6 nth + 4 th])/
49152 + (35 Cos[4 nphi + 6 nth + 4 th])/
8192 - (5 Cos[8 nphi + 6 nth + 4 th])/
98304 + (165 Cos[8 nth + 4 th])/
131072 + (35 Cos[4 nphi + 8 nth + 4 th])/
196608 + (5 Cos[8 nphi + 8 nth + 4 th])/786432;
Just a bunch of sines and cosines. Using NMaxValue I get a value around -0.481481, but naturally I dont know if this is a global minimum.
NMinValue[f, {nth, nphi, th}]




Reduce, but that simple approach might fail with the actual expressions you get. – Szabolcs Oct 26 '15 at 13:54NMinimizeseems to suggest that multiple (infinite?) equivalent minima exist. Is there a range of variables you could restrict yourself to? – MarcoB Oct 26 '15 at 15:09