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

learn more… | top users | synonyms (2)

2
votes
1answer
290 views

Finding a fixed vector which minimizes the pairwise distance between noisy elements in two unordered arrays

Let $A$ and $B$ be two sets of $d$-dimensional coordinates of comparible (though not necessarily equal length). For example, here we can set $d = 3$ and have normalized values like: ...
4
votes
1answer
102 views

Exiting FindMinimum when a condition is met

I want to determine if a function f[x] can take negative values. f is expensive to compute and ...
9
votes
3answers
384 views

FindShortestTour for charity (or: How can I optimize meal delivery with FindShortestTour?)

I've been wondering about this for a while - but never got around to asking - until I saw faleichik's incredible answer to Mathematica Minecraft. I did some work at a not-for-profit a little while ...
3
votes
1answer
492 views

How to maximize a function over a rotation matrix?

I have list of pairs of points: $\{(x_i,y_i)\}_{1\le i\le n}$, $x_i \in \mathbb{R}^3$, $y_i \in\mathbb{R}^2$ and would like to optimize over a rotation $R \in SO(3)$, a translation $t \in ...
1
vote
2answers
168 views

Need an efficient method for finding certain matrices

I am trying to write a function which produces square matrices with certain characteristics. The function should have two inputs: number of the rows, n number of ...
1
vote
1answer
123 views

Working precision for each variable

How can I define working precision for each variable individually for example: Maximize[x y< 100, {x, y}] where the working precisions for ...
0
votes
0answers
146 views

Non linear constrained interger Optimization

I need to maximize the equation below which is subjected to some nonlinear constraints Maximize hsum + isum + jsum + ksum + lsum + msum + nsum + osum ...
0
votes
1answer
297 views

Maximizing trig functions in Mathematica

Just to give some context, my motivation for this programming question is to understand the derivation of the CSHS inequality and basically entails maximizing the following function: ...
1
vote
2answers
259 views

Finding normals to a curve through a given point

I want to find x on curve $y(x)$, where curve $y(x)$ is perpendicular to point $(x_0,y_0)$. for this I minimize the distance between points $(x,y(x))$ and $(x_0,y_0)$, here's an example for point ...
0
votes
0answers
55 views

NMinimize and FindRoot Issues with System of Equations [duplicate]

I am trying to solve a constrained optimization problem with a system of transcendental equations and am running into issues with NMinimize. I have a system of equations (...
1
vote
0answers
132 views

Conditional solution for system of linear equations

I have a linear equation system Q.m = t, with m unkown and where Q has dimensions ...
4
votes
1answer
287 views

Using a user defined NormFunction in FindFit or NDSolve

I would like to use a different norm instead of the 2-norm in FindFit (Mathematica 9). For example, instead of using $$\sqrt{\sum (x_{\mathrm{model}} - ...
3
votes
0answers
146 views

Trouble with Minimize

Minimize[{t^2, 1 == 3*t + 16*u}, {t, u}, Integers] It does not give the solution t = -5 and u = 1. Am I missing something? The solution being known and ...
1
vote
1answer
144 views

Feasibility of Linear Program

I have a set of (real) linear equations/inequalities and I want to know whether they have a solution, and to find at least one. The goal is to do this quickly. ...
1
vote
1answer
305 views

using array elements in minimization

I have switched from mupad to Mathematica, however the syntax is completely different here. I want to ...
0
votes
0answers
64 views

Initializing Minimization [duplicate]

I am trying to implement a model predictive control scheme in Mathematica, e.g. I optimize input sequences by predicting future outputs. So every time I call the cost function it will simulate the ...
4
votes
1answer
189 views

How to solve this simple equation?

I want to minimize a quadratic equation, but Mathematica does not solve it and only rewrites the solution. I wonder if there exist any way I can skip the computation by hand (I can solve it using ...
2
votes
2answers
272 views

Optimizing functions taking matrix arguments

I'm looking for general information on how to optimize matrix valued functions, I have the following function I'm looking to maximize (or figure out if this is possible at all). ...
1
vote
1answer
1k views

Using NonlinearModelFit to fit data with errors

Assume we have some data of measurements SeedRandom[9]; data = Table[{i,2*(1 + 5*RandomReal[])*Exp[-0.01*(1 + RandomReal[])*i]}, {i, {0, 100, 200, 400, 700}}]; ...
2
votes
0answers
168 views

Speeding up a numerical constrained quadratic optimization

I'm trying to solve a quadratic optimization problem in 35 variables, $\vec{α} = \left< α_1, \ldots, α_{35}\right>$: $$ \begin{aligned} &\operatorname*{maximize}_\vec{α}&&1.0\cdot ...
12
votes
2answers
594 views

Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function?

I have a black-box multiargument multiparametric function of the type SRD[dataPoint_List,params_List] which accepts experimental data along with the parameters of ...
4
votes
0answers
418 views
2
votes
1answer
180 views

How can I change the MPS format in Linear Programming samples of Mathematica?

I am trying to play with some linear programming examples of Mathematica as ExampleData[{"LinearProgramming", "blend"}, "Equations"]. It gives me the MPS format of ...
4
votes
1answer
130 views

Minimize failing on a polynomial

Calling: Minimize[{-0.4877 - 0.1190 r^2 - 0.1885 r^4 + 2.9703 z - 0.5531 z^2, 0 <= z <= 3.5 ∧ 0 <= r <= 1.75}, {r, z}] returns ...
5
votes
1answer
240 views

FindMaxValue specifics

I'm using FindMaxValue to study the distribution of maxima of Abs[RiemannSiegelZ[t]] between consecutive values of ...
1
vote
1answer
172 views

List comparison in constraints for Minimize

I am trying to solve an optimization problem, a simplified version of which is as follows: ...
4
votes
3answers
384 views

How to find the minimum of this constrained expression?

Let $x$, $y$, $z$ be three nonegative real numbers and $x^2 + y^2 + z^2 = 5.$ Find the minimum of the expression $$E=\dfrac{1}{2}x^2 y^2 + y^2 z^2 + z^2 x^2 + \dfrac{96}{x + y + z + 1}.$$ I tried ...
3
votes
1answer
188 views

Distance between two functions satisfying a constraint

My problem is that I have two functions that are described as follows: ...
1
vote
1answer
189 views

How does FindShortestTour work?

How are FindShortestTour and the algorithms therewithin implemented internally? Also: Can I access some form of incremental, in-progress result during evaluation? ...
0
votes
1answer
709 views

How to find the global maximum of a function? [closed]

I tried the following but plotting the function clearly reveals that there is a global maximum around $r = 7$ (here $a = 0.53$) ...
2
votes
1answer
420 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 ...
1
vote
2answers
491 views

Area of the largest rectangle bounded by $y=x^2$ and the x-axis within the unit interval

I am trying to find the area of the largest rectangle (whose sides are parallel to the coordinate axes) contained in the region bounded by the graphs of $y = 0, y = x^2,$ and $x = 1$ using ...
6
votes
0answers
201 views

Speeding up multilinear PRA branch-and-bound algorithm with worst-case exponential time scenario with respect to basic events

The algorithm is a branch-and-bound algorithm that calculates dominances for PRA, probalistic risk assessment. The task was to find faster ways to do it in numerical software such as Matlab but we ...
2
votes
1answer
108 views

InterpolatingFunction with growing Domain

I want to find roots of a function that is very slow to calculate (the function itself involves a bunch of FindMaxima) so I interpolate the function in a region where I think it likely the the root ...
2
votes
2answers
253 views

NMinimize problem again

Following up my previous question which got great replies, I am now trying to do ...
8
votes
4answers
1k views

NMinimize usage

I would like to minimize functions including the following. NMinimize[{1 - (1 - 1/n)^x - x/n, n > x, x > 1}, {n, x}] However Mathematica complains about ...
0
votes
1answer
162 views

Alleviating a bottleneck involving a function call with symbolic derivatives

I have a bottleneck problem involving a function call with symbolic derivatives. I don't have much experience with Mathematica (or any dynamic language) and I'm certain that the way I've set this up ...
0
votes
1answer
304 views

What is the correct way to use NIntegrate inside the FindMinimum function?

I'm having minor issues with the FindMinimum function when using NIntegrate inside. The functions work perfectly well but I get ...
5
votes
3answers
1k views

Travelling salesman with start and end points for 30 points

I am doing a route optimisation for delivery vehicles and failing dismally. Please see problem statement below. My current solution uses FindShortestTour, but this does not have defined start and end ...
2
votes
1answer
460 views

Problem using the DifferentialEvolution method of NMinimize [closed]

I have a function of 20 parameters, which 3 of the parameters are my physical parameters, and the others are pull terms to fix the errors. The goal is finding the global minimum of this function, to ...
13
votes
3answers
810 views

Strategies to avoid LessEqual::nord in NMinimize?

When using NMinimize on functions with complex intermediate expressions (but a real end result), quite often one gets the error ...
0
votes
1answer
81 views
10
votes
1answer
1k views

Combined numerical minimization and maximization

I want to numerically calculate the maximum of a function defined by the minimization of another function, like the following: ...
0
votes
0answers
308 views

Mathematica, nested optmization [duplicate]

I want to use the solution of Maximize, defined as a function, in another function. Here's an example: ...
3
votes
2answers
137 views

Find condition under which variables fall away

I have a somewhat lengthy expression, looking like expr = 1 + x + b + Pi + 2*a Is there some way of generating a relationship between ...
6
votes
2answers
450 views

Built-ins for discrete ArgMax or ArgMin?

Wondering whether there are discrete versions of ArgMax / ArgMin, that is, something that will find the part of an expression at ...
1
vote
0answers
124 views

How to express this output in the form $X=A.x$?

This problem arose in my stereo vision project. I have two matrices: $$ A = \left( \begin{array}{ccc} \text{x1}*\text{p131}-\text{p111} & \text{x1}*\text{p132}-\text{p112} & ...