# Questions tagged [mathematical-optimization]

Questions on the optimization functions of Mathematica such as FindMinimum/FindMaximum, Minimize/Maximize, NMinimize/NMaximize, etc.

1,916 questions
Filter by
Sorted by
Tagged with
164 views

### Kronecker Square Roots

I'm interested in computing the 'Kronecker Square Root' $\mathbf{A}_{n\times n}$ of a matrix $\mathbf{M}_{n^2\times n^2}=\mathbf{A}\otimes\mathbf{A}$. In case it doesn't exist, I'd like to find the ...
115 views

191 views

### Is it possible to calculate the desired area analytically?

I have the three two-variable curves $f,g,h$ with $0\leq x\leq \frac {\pi}{2}$ and $0 \leq y \leq \pi$ I use ContourPlot as ... 1 vote
38 views

### Why do I get the (NMinimize::nrnum) error and how to fix it?

I have an energy function which depends on the angles of the electrons({x} symbol for theta) and phase of electrons({y} symbol for phi). I am using NMinimize to minimize the energy with respect to {x}...
168 views

### MaxCut SDP primal in mathematica

How could one formulate the primal SDP for MaxCut in Mathematica. I am aware of this tutorial using the dual: https://www.wolfram.com/language/12/convex-optimization/max-cut-problem.html?product=...
190 views

### Are there any alternatives for NIntegrate to calculate the area for which $f(x,y)<0$?

I have this two-variable function $$f(x,y)= (8 \cos (x+y)+7)\cos \left(\frac{x}{2}\right)+\cos \frac{x-2 y}{2}+2 \cos \left(\frac{3 x}{2}\right)$$ where $0<x,y<\pi$. I want to calculate ... 146 views

### Integral with exponential function

Could you please help me in solving the following integration. Thank you in advance. Integrate[((Sqrt[g*(x + h)/y])^V) * Exp[-u * Sqrt[g*(x + h)/y]/n] * Exp[-L*x], {x, 0, Infinity}]
1 vote
84 views

...
2k views

### How can I use Python's SciPy and NumPy functions in Mathematica to find the minimum of a function?

I have written my code in Mathematica, final aim of this code is to find the minimum of a function. I found that FindMinimum and ...
17 views

### Using FindArgMax in NSolve with dependant variables

I have a function for a current through a series circuit containing a capacitor(c) and a resistor(r) and a battery(Ebatt) when the capacity increases from c0 to c. ...
120 views

### Portfolio optimization

Mathematica provides codes for a portfolio optimization https://www.wolframcloud.com/objects/summerschool/pages/2017/AndresLopezMartinez_TE that do not work anymore. Any reason why? I have been trying ...
70 views

### Simplify a heavy calculation

I'm aware that this may be regarded as too non-specific and with too little information, but I hope that someone will be able to help me nonetheless or to request information which would be imperative ...
80 views

### Can't find parameter with findFit NMinimize

I have a data list and a function being to be fitted to the data to get parameters of the function as below. I can't find the parameters a, b, c, d with different below methods. Can you help me to ...
60 views

### ArgMax : Variable Domain Error [closed]

I'm attempting to utilize the ArgMax function, but am receiving the error "ArgMax::vdom: Variable domain ... should be either Reals or Integers." ...
62 views

### Minimize with conditions on Integers does not find a correct answer

I want to find the minimum m which satisfies conditions as below: Minimize[{m, m > 0 && Mod[m 3.1, 0.5] == 0}, m, Integers] (* {1., {m -> 1}} *) ...
87 views

### LinearOptimization duality

I'm solving a linear program using LinearOptimization. I'm curious why "DualityGap" does not return zero (as described in the docs). Here's the code: ...
1 vote
80 views

### Plot "Findroot" with very complex variables

I ran into an extremely complex "zero problem" and don't know how to solve and plot it. Can anyone help with this, please? [Pi]s and [Pi]r are objective functions, pd, po, qd, qo, and [Phi] (...
1 vote
173 views

...
81 views

1 vote
70 views

### List of constraints in Minimize

I'm seeking a technique to automate a list of constraints in Mathematica. A sample piece of code is given below; it's designed to take a 3D cube [0, 1]^3, sample 5 points uniformly randomly from this ...
500 views

### Problem with optimal control and Pontryagin's maximum principle

For dynamic system: $\dot{x}=\frac{df}{dx}+u$ where $f=e^{-x^2}$ It is necessary to develop optimal control, minimizing criterion: $J= \int_{0}^{t_f} ((\frac{df}{dx})^2+u^2) \,dt$ Algorithm: We ...
89 views

### Problem with RandomSearch option

Solving an optimization problem with Method->"RandomSearch" option ...
{"ft_lang_label":"__label__en","ft_lang_prob":0.8835043,"math_prob":0.93712217,"size":10647,"snap":"2022-27-2022-33","text_gpt3_token_len":3514,"char_repetition_ratio":0.17288359,"word_repetition_ratio":0.023784354,"special_character_ratio":0.3449798,"punctuation_ratio":0.17158818,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9973819,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-29T06:33:46Z\",\"WARC-Record-ID\":\"<urn:uuid:8f64094f-58d3-461f-9a6b-967abf9c3384>\",\"Content-Length\":\"369710\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bcf52ae4-d723-48ca-8bf8-fd2d94188b4f>\",\"WARC-Concurrent-To\":\"<urn:uuid:0af639b5-cde2-4630-a337-1baae5c4fbb3>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/tagged/mathematical-optimization?tab=newest&page=5\",\"WARC-Payload-Digest\":\"sha1:NYWODLRJQJUQNZVH2TATBKETIDSQSCVT\",\"WARC-Block-Digest\":\"sha1:W7TESWNRSC4UXK2RCH2H52BX45PFYX34\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103624904.34_warc_CC-MAIN-20220629054527-20220629084527-00124.warc.gz\"}"}