# Questions tagged [mathematical-optimization]

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

1,551 questions
Filter by
Sorted by
Tagged with
2answers
2k views

### Can't find maximum of a function on a region

for h=0.2 I'm trying to find the maximum value of (-h^2/3)*(-1/x^2) subject to ...
4answers
471 views

### How to use genetic algorithm to calculate the maximum value of this matrix

1-9 the 9 numbers are arranged into 3 * 3 matrix without repetition.How to select the matrix with the largest determinant value: ...
1answer
209 views

### Assign Error bars for y-intercept

I have some data (x,y) with error bars in y direction: ...
1answer
2k views

### Packing squares into a circle

I am currently trying to solve and understand a problem about packing the maximum of squares into a circle. What I am trying to do, is to calculate the maximum number of variable sized squares (with ...
3answers
994 views

### How to use a compiled function in numerical optimization

I'm trying to wrap my head around function Compile. So, this is a spin-off question from: a previous question on using compile[] correctly. I have a function that ...
1answer
3k views

### Inequalities with assumptions and constraints

I'm using Mathematica 8 I've been searching the net without luck for this specific solutions: Suppose I have an inequality f(x;M,m)>0 where I KNOW that M>4m and m>0. How can I let Mathematica know ...
2answers
565 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 ...
1answer
521 views

### Which algorithm does Mathematica use for “RandomSearch”?

Recently I have used Mathematica for minimization of certain functions and I have realized that even though it lasts much longer, the method "RandomSearch" functions much better than the other methods ...
3answers
1k views

### How to fit parameters in a system of coupled differential equations

Problem description: I'm studying a chemical reaction that can be modeled by a system of coupled differential equations, and I want to use measured data to determine the parameters that appear in the ...
1answer
346 views

### Optimizing a rank 3 tensor

Assume we have the following elements $$F_i{}^j \;and\; S_{ij}{}^k,$$ which represent the components of tensorial objects of ranks 2 and 3 respectively, with Complex ...
1answer
521 views

### Defining a non-linear optimization-problem

Consider the following non-linear optimisation problem: ...
2answers
105 views

### Strange results when finding a maximum subject to constraints?

I'm using 11.1.1, and I tried running the following: ...
1answer
3k views

### Working precision and pure functions in FindMinimum

I have this function: fun = (# - 5.0)^2.0 & Then, I want to find the minimum: ...
1answer
393 views

### Different results for MaximumLikelihood depending on method?

When I used this command: ...
2answers
124 views

### Best 5 segment piecewise linear fit

I'm trying to get a piecewise linear best-fit for the closing price of one of the stocks I'm interested in. The logic seems ok, and the workflow works for a straight-line (ie 2 pts, ie 1 segment) ...
1answer
202 views

### Print out parameters at every 100 iterations

I am fitting some data to my model. I would like to print out parameters values say every 100 iterations (or 500) to check values getting steady state. Actually, I have a larger data and more ...
1answer
135 views

### Understanding KnapsackSolve

I was playing around with the new KnapsackSolve function in Mathematica 11 and came across something odd that I don't understand. Perhaps someone could shed some ...
1answer
597 views

### Maximize vs FindMaximum

This can be thought of as follow-up to this question. The question is, simply, can anyone explain why both Maximize[] and ...
1answer
346 views

### What is wrong about Abs[x]-a? Is it a bug?

Why is the Out[74] not {1 - a, {x -> -1}}? ...
1answer
155 views

### Steiner Trees for Unit Polygons?

I know this is a longshot, and it's a rather broad question, but hopefully someone can help. Is there a simple or fast way to find Steiner Trees for unit polygons using Mathematica? By unit polygon, I ...
1answer
191 views

### Why don't optimization functions like FindMinimum work with functions like BSplineFunction? [duplicate]

Take a simple BSplineFunction and evaluate it at 0.25. ...
1answer
219 views

### Easy FindMaximum returns a wrong answer

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

### Using least independent rectangle area to separate every point

Description I want to add vertical line and horizonal lines between data to make every point have an independent rectangle area. In addtion, every independent rectangle has a number $1,2,3,4,5,\ldots$ ...
1answer
351 views

### Numerical problems with calculation of function

I have a problem with a calculation which I try to do with Mathematica (8.0.1). I have the following function which describes a cone (with half opening angle theta)...
5answers
220 views

### Maximizing efficiency of a power-tower (tetration) calculation

I'm working on a power tower $\displaystyle z^{z^{.^{.^{.}}}}$ and wish to maximize the efficiency of my algorithm to compute a cycle map. This is a color-coded diagram of the cycle period of each ...
1answer
402 views

### How is INTEGER linear programming implemented in the Mathematica LinearProgramming function?

I was surprised to see that, for d = 1000, b = 800, Mathematica solves an integer linear (LP) program such as ...
2answers
129 views

### Maximise output issue

When I execute the following command, I get a numerical output as follows: ...
1answer
542 views

### Mathematica vs Sigmaplot (Non LinearModelFit)

I asked a question in a previous post that was closed because "The title of the question is not correct and the issue here is too trivial to help anyone later". https://mathematica.stackexchange.com/...
1answer
217 views

### Tremendous bug using EstimatedDistribution (using NMinimize) in v8.0 and v10.2

Let's define F4 and estimate the distribution of the data: ...
1answer
370 views

### Simulated Annealing, SearchPoints and InitialPoints options set at the same time

I have a function that needs to be minimized. Since the function depends on real-time data (which is fetched every few hours, and the function is redefined according to the new data), I have to run ...
1answer
2k views

### How to make Maximize function successfully maximize in general?

Having looked at Maximize Documentation SO: Mathematica: Commands return no output, but itself. Bug? Problem with Maximize Why won't Mathematica Solve a set of two equations for one variable? ...
1answer
397 views

### Speeding up the non-negativity algorithm for multilinear function with interval probabilities?

The algorithm is a branch-and-bound algorithm that calculates the non-negativity of a multilinear function with interval probabilities. The lines 9-11 has an optimization that is explained on the 10-...
0answers
118 views

### SemidefiniteOptimization for operator norms: Stuck at the edge of dual feasibility

Can someone give a workaround and/or explanation why Problem 1/Problem 2 fail to solve through SemidefiniteOptimization? Problem 3 works. (I'm using 12.1.0 on Mac). ...
0answers
89 views

### Caveats of LinearProgramming on Integers domain

When using LinearProgramming with the Integers domain, Mathematica issues the following warning: ...
0answers
118 views

### Optimize a network topology?

I'd like to know if one can use optimization function like Maximize[] or BayesianMaximize[] to optimize the hyper-parameters of ...
0answers
258 views

### How to perform Bayesian optimization with Mathematica? [duplicate]

Does Mathematica have any Bayesian optimization methods for learning hyper-parameters? Practical Bayesian Optimization of Machine Learning Algorithms Jasper Snoek, Hugo Larochelle and Ryan P. ...
0answers
470 views

### Custom Methods for NMinimize/NonLinearModelFit

Is there a way to write custom methods for NonLinearModelFit or NMinimize? To give background, I currently have a batch of code ...
0answers
91 views

### Listable compiled functions used in NMinimize [duplicate]

This is an example from MMA: cListable = Compile[{x}, (x-1)^2, RuntimeAttributes -> {Listable}] In case of single entry: ...
0answers
387 views

### Problems extending NelderMeadMinimize into 2D

Update The eventual route I followed was to adapt a version of the NM-simplex written in C and link to it with MathLink. Once I've tested this out fully I'll post it here. I've been playing around ...
0answers
480 views

### Simulated Annealing Parameters and Results [closed]

I am using SimulatedAnnealing method for a simulation based optimization problem and was wondering if someone can enlighten me on the following features: Is there ...
0answers
207 views

### Issue with FindCurvePath

I have a problem with the function FindCurvePath. In some cases it crashes the Mathematica 9 Kernel. Here an example, where it crashes the kernel: ...
4answers
853 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 ...
5answers
182 views

### For a polynomial F with dependence on a parameter beta, find the value of beta for which F has 2 positive roots

Good morning, I have the following polynomial with degree 4 and its coefficients are quadratic functions of a parameter beta: ...
2answers
202 views

### Finding the maximal t at which u[x,t] == 1?

Given the smooth function u[x,t] on a domain, how do I find the maximal t at which ...
2answers
979 views

### Finding minimum and maximum of implicit functions

The equations of the system are ...
3answers
326 views

### How to Minimize a problem with a big number of variables?

Here is a problem from math folklore. Minimize $$\sum_{j=1}^{j=n} x_j$$ under the constraints $$x_1+x_2\ge 1,\, x_2+x_3\ge 2,\dots,x_n+x_1 \ge n .$$ The Mathematica codes ...
3answers
708 views

### Use of LinearProgramming

Consider the following: ...
2answers
423 views

### Optimum number of cog teeth for two step helical gearbox

Note: Cross-posted at http://community.wolfram.com/groups/-/m/t/137895?p_p_auth=8QnKtT9I. I am to design a two step gearbox. The first step is to choose the number of teeth in each cog wheel in ...
2answers
794 views

### What alternative notation of subscripts/superscripts that are also treated as SYMBOLS in Mathematica?

I tried to avoid using the subscript $A_0$ in the Module, and get an error with $A[0]$. ...
3answers
1k views

### FindMinimum works only if you know the answer

I am processing SNe Ia data and using FindMinimum to try and extract two values: t1 and a0. The FindMinimum value works only if I supply values that are close to the answer. If I provide no starting ...

1 2 3
4
5
ā¦
32