User Portlet User Portlet

Frank Kampas
Discussions
The purpose of the post is to show that converting Or constraints to a Max function runs faster in FindMinimum. In[1]:= (* Or Constraints For a Point To Be Outside a Pentagon Centered \ at the Origin *) cons =...
Thank you everybody for your help.
In[1]:= AbsoluteTiming[Length@ (l1 = Select[Range[10^6], PrimeQ])] Out[1]= {0.307672, 78498} In[2]:= AbsoluteTiming[ Length@ (l2 = Table[Prime[k], {k, 1, PrimePi[10^6]}])] Out[2]= {0.0268336, 78498} ...
MinValue is 100 times faster than Solve In[6]:= AbsoluteTiming[ Solve[{res == b/a, a == 9^k, b == 15^k, a + 2 b == 25^k, a > 0, b > 0}, {a, b, k, res}] // FullSimplify] Out[6]= {84.9759, {{a ->...
Added notebook shows some of the intermediate results.
The technique I recently posted for [plotting FindMinimum internal steps][1] also works for NMinimize. The code is attached. ![enter image description here][2] [1]: https://community.wolfram.com/groups/-/m/t/2274764 [2]:...
The procedure consists of using compiled functions (for speed) to have StepMonitor return the maximum constraint violation and objective function value at each step. These are then partitioned into pairs and plotted using the Arrow function.
I think you need a differential equation.
version 2.2