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

learn more… | top users | synonyms (4)

2
votes
0answers
78 views

Findminimum fails in loops

Introduction to the problem: the function F[x][u,v,w] I'm currently dealing with a very strange minimalization problem. I have a function F[x][u,v,w] which is ...
7
votes
1answer
277 views

NMinimize with NIntegrate (crash in symbolic evaluation, memory leak)

This is a "common" problem from what I've seen, but with a different spin. I have a function I use often that finds a fit of an expression to another expression with some free parameters (e.g. for ...
0
votes
2answers
97 views

Lagrange multipliers code runs forever

I am writing a code for a Lagrange multipliers problem with three variables. My code looks like this: ...
1
vote
0answers
47 views

Evaluation of likelihood very slow

I am trying to implement a simple statistical model for the first time in Mathematica. My model is made my one random variable which is the sum of background and signal. Background is an exponential ...
1
vote
1answer
88 views

FindMinimum with LevenbergMarquardt Method: syntax to set lower/higher bounds for parameters

I use the LevenbergMarquardt method of the FindMinimum function to minimize a residual function (mathematical-optimization). The 2013 post Is it possible to use the LevenbergMarquardt (LM) algorithm ...
3
votes
0answers
87 views

Using NMaximize to get integer results for a fractional programming problem

I have an optimization problem that I am trying to model in mathematica (wolfram cloud, to be precise). Link to notebook for code described here: ...
1
vote
0answers
64 views

Findminimum evaluates input for NIntegrate at non numerical value (NIntegrate::inumr:) [duplicate]

The goal is to minimise a functional in this case I want to find the input function, defined by its (many) values on a grid for which the functional attains its minimum. Below is a piece of code where ...
5
votes
1answer
104 views

Simple minimization not evaluating

I tried to solve a rather simple optimization problem, which Mathematica apparently cannot handle. A minimal example is the following: ...
5
votes
4answers
456 views

Minimal overlap area of circles

I have 20 points in the 2D plane with $(x_i,y_i)$ coordinates. I want to use Mathematica to optimally distribute 10 circles with equal radius of a given positive value $R$, i.e. to determine with the ...
2
votes
1answer
84 views

Using ouput of ParametericNDSolve as argument in NMinimize: NMinimize::nnum: function value not a number

I am trying to fit some experimental data and I am trying to use NMinimize function to calculate the parameters that fit the experimental dataset. I am also using ...
5
votes
2answers
154 views

Techniques to find all local minima of black box function with n continuous derivatives?

I have a blackbox function f on [a,b] that is known to be continuous, and has n continuous derivatives. The function uses polynomial interpolations (but isn't a polynomial interpolation itself), so no ...
3
votes
2answers
160 views

Maximizing a function defined using NIntegrate [duplicate]

I have two functions fn[x,y,z] which is in integral form and I have another function gn[x,y] which is also in integral form ...
0
votes
0answers
116 views

Linear interpolation over 2 variables [duplicate]

I'm tuning a function to data over 4-5 variables using Differential Evolution. The objective function calls frequently interpolation function. I came to a point, where compiling the objective function ...
8
votes
1answer
125 views

FindMaximum failing on a trivial problem [closed]

I am trying to solve a trivial optimization problem with FindMaximum but for some reason it is not going. I reduced the problem down to the following non-working ...
0
votes
1answer
80 views

Calculate Max-Min value and corresponding parameters

I have two functions funA and funB which are also functions a,b,x,and ...
0
votes
1answer
391 views

Finding resolution of an optical system using Rayleigh criterion

I want to use the Rayleigh criterion to find the resolution of an optical system. I have two functions f1 = Sinc[x]^2 and ...
2
votes
1answer
58 views

Numerical functions as constraints for NMaximize

I want to use NMaximize to solve a problem like this: $\quad \quad \max_y f(y) \text{ subject to } \max_x g(x, y) \leq c.$ Rather than reproduce my (messier) ...
4
votes
1answer
332 views

Using ParametricNDSolve and NMinimize to find accurate interplanetary trajectory arrival periapse radius

I have an interplanetary trajectory simulation that calculates the required velocity (using a Lambert solver) and escape angle for a spacecraft to travel from Earth to Mars. This model does not use a ...
3
votes
1answer
73 views
8
votes
1answer
1k views

Which methods are available for NMinimize?

I can't find in the documentation the list of methods available to NMinimize[]. Is there a way to get this? The NMinimize page in Documentation Center mentions only ...
4
votes
2answers
329 views

Maximization in Mathematica using matrix and vector notation

I am trying to solve a simple maximization problem in Mathematica, using matrix and vector notation. ...
3
votes
1answer
265 views

Simulating an optimization problem

I have an optimization problem like below: $\text{minimize } - \sum_k w_k \log r_k$ $ a \leq r_k \leq b_k, k = 1, \cdots, 10$ Here, $w $ and $b$ is a set of constant: $w = [w_1, \cdots, w_{10}]$ ...
1
vote
0answers
68 views

Solving a Nonlinear Optimization using Primal-Dual Interior point method [closed]

I want to solve an optimization problem using the Primal-Dual Interior Point Method. Although Mathematica gives the result directly when I use the command ...
2
votes
0answers
143 views

Linear Programming Using Dual Simplex method

I want to solve an optimization problem using the Dual Simplex Method. Although Mathematica gives the result directly when I use the command Minimize but I want to ...
2
votes
0answers
68 views

FindMinimum pre-conditioning

I am wondering about what kind of pre-conditioning FindMinimum performs on the user specified function (to be minimized) before the actual minimization starts, and ...
1
vote
1answer
663 views

FindMinimum [] methods [closed]

Which algorithm is used when we do not use the option Method of FindMinimum[] function. FindMinimum[f,{x,x0}]
2
votes
1answer
95 views

How to find the local minimum points in the multi-dimensional numerical data?

I am trying to get some local minima of an n-dimensional function (which only has numerical form). For two-dimensional function data, we can find the local minimum points from the contour plot easily. ...
1
vote
0answers
27 views

Minimizing values of expressions dependent on more variables [closed]

I need to enforce seven expressions dependent on seven variables to be zero. However, the expressions are quite complicated and generaly I get a system of transcendental equations which only sometimes ...
4
votes
1answer
122 views

Sparse Hessian for FindMinimum? Broken?

Is the sparse Hessian mechanism for FindMinimum[] (Method->"Newton") broken? Or am I simply not apprehending its proper setup? Here's what's happening. Below is for solving the example problem ...
0
votes
1answer
111 views

FindMinimum runs out of Memory

I have a function which runs fine when I evaluate it. However, when I try to find its optimal parameters using FindMinimum it quickly consumes all available memory ...
1
vote
1answer
78 views

How to Minimize a Log/Linear function symbolically?

I have my objective function as : $\hspace{25mm} \text{Minimize} \sum_k- \alpha_k \log_2 W_k$ $\hspace{25mm} \text{subject to}: 0\leq W_k \leq q', 0 \leq \alpha_k \leq 1 $ $\hspace{25mm} k ...
4
votes
2answers
278 views

NMinimize Constraints on Interpolating Functions

I have the following piece of code and am trying to use NMinimize (the last line in the following chunk of code) to minimize ...
1
vote
2answers
138 views

Doing same operation on multiple files

Is there a way in mathematica to do same operation on multiple files at once? And preferably have the output in a table or list form? I want to do the following operation preferably in few non-labor ...
0
votes
0answers
61 views

Simplifying sums of rational trigonometric functions

After simplifying the trigonometric functions as advised before (cf. Simplifying Expressions for FindMinimum), I obtained a sum of 62 similar expressions, the first three as in the below: ...
2
votes
1answer
202 views

Solve overdetermined set using Mathematica?

As shown below, this is a overdetermined system. Could you teach me how to find the optimized solution in Mathematica? I know it could be solved by the method of least square, but how to realize it in ...
3
votes
2answers
92 views

FindMinimum[] complains about values outside its constraints

The following optimization has a constraint that b<0, but it's failing because the integral diverges when it tries a small positive b. ...
5
votes
0answers
209 views

Visualizing the Lagrange Multiplier Solution

This question is based on work in Susan Colley's Vector Calculus, 4th ed. The question is to find and classify critical points of $f(x,y,z)=3xy-4yz+5xz$ subject to the constraint ...
5
votes
3answers
282 views

Extrema of a function of three variables

To identify and classify the critical points of the function $f(x,y,z)=x^3+xz^2-3x^2+y^2+2z^2$, I used the Hessian matrix method. ...
1
vote
1answer
94 views

How to repeatly use random number generator in optimization problem

I am looking to run the optimization problem. I already finish my optimization code as below. ...
0
votes
1answer
225 views

Mathematica won't maximize my function

I am trying to maximize two functions. For the first one, the code runs correctly and returns the desired answer: ...
0
votes
0answers
59 views

Solving matrix optimization

I have the following problem. Let $X_1, X_2, \cdots, X_k$ are $n \times n$ Hermitian matrices (need not be positive) given. Let a $n \times n$ positive matrix $A$ is given such that $Tr(A.X_j)<0$ ...
2
votes
1answer
115 views

Simplifying Expressions for FindMinimum

I am currently trying to apply the FindMinimum function to find the lowest energy of an expression. My current expression as of now is relatively complicated. It is the summation of 48 similar terms, ...
6
votes
1answer
159 views

Easy FindMaximum returns a wrong answer

FindMaximum in region is a new function in mma10,but when I tried the following example: ...
1
vote
2answers
410 views

Problems finding intersection points between line and generic function

I'm trying to find Intersection points between a line, which is given by 2 points, and a generic function (I want it to be able to handle polynomial functions, circles/ovals, lines and all ...
4
votes
1answer
334 views

Maximizing functions with Which statements

I'd like to be able to find the maximum value that my Capex function (see below) generates. This is a fairly simple function so I could just add it up but I have more complex functions of a similar ...
2
votes
1answer
135 views

NMaximize and Accuracy

I have a problem with NMaximize which is best depicted by the following figure. The result indicates, that the solution mathematica finds seems to be smooth except a few outliers. How can I get rid of ...
20
votes
2answers
423 views

Maximize[Cos[x - 1], x] is not evaluated

No explanation needed: Maximize[Cos[x + 1], x] Maximize[Cos[x - 1], x] producing ...
8
votes
2answers
214 views

Efficient solution for a discrete assignment problem with pairwise costs

Let's consider a simple graph with N vertices, and a corresponding set of N items. The goal of the problem is to assign every item to a vertex on the graph so that sum of a per-edge (that is ...