# 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 ...
• 20.4k
115 views

• 5,699
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=...
• 45
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}]
• 21
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 ...
• 1,431
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 ...
• 353
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 ...
• 125
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}} *) ...
• 735
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: ...
• 159
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

...
• 164
81 views

• 1,721
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 ...
• 138
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 ...
• 1,721
89 views

### Problem with RandomSearch option

Solving an optimization problem with Method->"RandomSearch" option ...
• 17.1k