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

learn more… | top users | synonyms (4)

0
votes
0answers
41 views
1
vote
1answer
79 views

Complicated equation solving

I want to find the maximum point or optimal value $y$ of Rx1[y_, a_, b_]. ...
6
votes
2answers
68 views

Maximise output issue

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

Minimizing a function which involves Maximize [duplicate]

I have a mathematical function: $f = \frac{c^3}{2 a (k T)^3} \sqrt{\frac{\pi u v w}{2 b}} \exp \left[ - \frac{c}{k T} \sqrt{\frac{x^2+y^2}{a}+\frac{z^2}{b}} + \frac{1}{2} \left( \frac{x^2}{u} + ...
1
vote
0answers
105 views

How can I speed up this NM optimization? Most delay seems to be due to long analytic expression

I am struggling with computational speed of a NelderMead optimization. Nevertheless my impression is that I lose lots of speed not only due to the NM optimization itself but rather to for instance ...
0
votes
0answers
20 views

NMinimize using NIntegrate functions

I'm looking for a minimization problem. I have a numerical function which is defined through a numerical intregation, which, in turn, have two parameters. The numerical integration is a very demanding ...
-1
votes
1answer
67 views

Looping within linear programming

I am trying to do some network programming around optimization. Here is a reduced sample: ...
0
votes
0answers
40 views

imaginary part in optimization problems

I have some trouble with an optimization problem. The constraints are always real, but in the first place there are also complex parts in the expression (which all sum up to 0). The problem now is ...
1
vote
0answers
66 views

Imposing constraints to NMinimize/NMaximize leads to wrong function values

I wrote a function that uses NMaximize to find certain parameters (using NelderMead simplex algorithm). My objective functional $J({x_i})$ is real-valued and its ...
0
votes
0answers
33 views

Passing complicated functions to NMinimize [duplicate]

I am using NMinimize to do a minimization of sum of squares. I have a module based on the following code ...
0
votes
0answers
58 views

Minimizing/maximizing function and selected parameters simultaneously

I have a function over several variables which I would like to minimize while maximizing (or minimizing) at least one other variable subordinate to the global function minimum. As a trivial ...
0
votes
0answers
40 views

How to add a positive definiteness of a unsymmetric matrix as a constraint to a Findminimum problem

The problem is I have a function which has 33 variables, and which to minimize it in a given set of contraints. I have also a matrix consisting of these 33 variables. The condition is that this matrix ...
10
votes
0answers
167 views

Bug in plotting function using FindMinimum?

Bug introduced in 10.0.1 (or 10.0.0) and persisting through 10.1 or later While working on an answer to RegionPlot from NDSolve, I came across this strange behavior of ...
0
votes
0answers
9 views

Add positive definite matrix constraint to an optimization problem [duplicate]

The problem is I have a function which has 33 variables, and which to minimize it in a given set of contraints. I have also a matrix consisting of these 33 variables. The condition is that this matrix ...
1
vote
2answers
139 views

Minimizing the largest difference between two functions

I have two functions defined on the same domain, $f(x)$ and $g(x)$ where $x$ is in $(0,1)$: f[x_] := (-1 + x) Log[1 - x] - x Log[x] g[x_] := Log[1 + 2 (-1 + x) x] ...
0
votes
2answers
55 views

Vector optimization with vector length as a free variable

I'm trying to solve the following problem: For a vector $v$ of length $c$, $\min \frac{\sum v[i]^4}{(\sum v[i]^2)^2}$ subject to $\sum v[i] = N$. I can solve this numerically for a given $c$ using ...
1
vote
1answer
71 views

Optimizing matrix inequalities over trace

I need to solve the following problem. Given $n \times n$ Hermitian matrices $A\geq 0$ and $B_1, ~ B_2$ (need not be positive semidefinite), with $Tr(AB_1)<0~,Tr(AB_2)<0$ construct a ...
0
votes
0answers
30 views

FindMaximum slow for fixed parameters

I hope my problem can be solved by just showing you this tiny part of my code which does not run on its own. I have an optimization problem and want these functions to work on various data sets. ...
0
votes
0answers
38 views

Parallelize: No speed-up when using with FindMaximum

I have developed a program to compute the maximum value of an specific function multiple times, with different parameter values each time. I've been using the ...
1
vote
1answer
50 views

Precision of starting values in FindMinimum [closed]

I am currently working on an optimization of chemical kinetic model. Starting points for FindMinimum are defined as: ...
7
votes
3answers
660 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 ...
2
votes
2answers
99 views

Only one root at specific interval

I need a help to find k here: $f(x)=-k^x + x^2$ It is not too simple. I have interest to find the single value of "k" where, inside interval {x,2,3}, the function have only one value to x when f(x) ...
50
votes
4answers
11k views

How to find all the local minima/maxima in a range

I want to find : all local maxima in range all local minima in range From those points I can interpolate and combine functions upper and lower boundary. What I am really interested in, is the ...
22
votes
4answers
5k views

Finding Local Minima / Maxima in Noisy Data

I'm trying to find local minima / maxima in noisy data, consisting of data values taken at certain time intervals. Ideally, the function should take a pair of lists (one containing time values and one ...
0
votes
0answers
53 views

Mathematica global optimization add ons

Can somebody tell me the major differences between Global Optimization add on, MathOptimizer Professional, and NMinimize which does global optimization in ...
0
votes
0answers
77 views

How to find Multiple Maxima/Minima

I am trying to solve a problem that requires finding multiple maxima of a numerical function. So the function generates some numbers that are coming out of an experiment. I tried using NMaximize or ...
2
votes
2answers
79 views

Finding large Collatz Sequences, trying to improve speed

Background: I am already very much in love with Mathematica but I am also a novice. So far I have only gathered experience in procedural programming in Python. Generally speaking I am trying to ...
2
votes
1answer
85 views

Simple-looking Minimize takes for ever

Consider the following: Minimize[{(ξ - x)^2 + (η - y)^2, a ξ + b η == c}, {ξ, η}, Reals] After asking Mathematica to do this yesterday afternoon and forgetting ...
2
votes
1answer
125 views

How to implement the dual Lagrange?

I have seen in the Pang book of data mining the following example: ...
0
votes
1answer
56 views

Optimizing complex functions

I am trying to optimize a function containing complex numbers, however I keep running into errors. Consider the simple optimization problem: ...
0
votes
1answer
59 views

Incorporate error bars to best-fit curve [closed]

I have managed to get mathematica to perform a best fit curve. However, I wish to add error bar to the curve, how do I do so?
0
votes
0answers
15 views

NMinimize as objective function of NMinimize [duplicate]

Let f[x_,z_]:=... g[x_,z_]:=... fully numerical apart for x and z. Then, I want to find z by minimizing f^2 for given x. Then, I want to find x that maximize g for z in the first step (which is a ...
1
vote
2answers
178 views

How do I disorder a list in Mathematica?

Given a list like this (the original list is much longer), how I can get a completely unordered list and save it in plain text? I change the file names (names at random), using a length of 5 digits, ...
0
votes
0answers
42 views

Some of System words in Mathematica 10 doesn't show right

Does anyone have any idea about why this happens and how to solve it? thanks.
2
votes
0answers
35 views

Where can I find detailed information about the SystemOptions?

I'm looking to optimize my Mathematica script, and I'm willing to go spelunking with low-level system options. The problem is that I've been looking in the Mathematica documentation, but there ...
4
votes
1answer
63 views

FindMinimum's WorkingPrecision behaviour

I discovered the following behaviour when using FindMinimum for constrained optimization: ...
0
votes
0answers
35 views

Convex problem solution

I have the following optimisation problem, where $l,m,n$ are positive. It is a convex problem. I need to find the optimum under a budget constraint. ...
0
votes
0answers
116 views

Is there a way to give Mathematica extra memory?

I am running Mathematica 10 (Student Edition) on Mac OS X 10.7.5 on an old Mac Pro. I have lots of extra RAM that the system isn't touching, and I would like to give some of it to Mathematica in the ...
5
votes
1answer
113 views

Slow-down encountered when using NMinimize with a compiled function

I'm minimizing a large function. Evaluating the function is very slow symbolically but using Compile I can get ~100x speed-up on this step. However, despite this, the NMinimize process is only ...
0
votes
0answers
63 views

How to properly pass function as argument here? --> NMinimize & NIntegrate involved

I had a problem of a similar kind here which was solved. Now after changing a few things in my problem setting I am suffering from the following problem. Let me first introduce methods/functions that ...
1
vote
1answer
89 views

The problem (time) caused by ?NumericQ

In here, I asked a related (similar) question. Using ?NumericQ seems have slowed down the entire calculation. But I now have a more serious problem: ...
0
votes
0answers
46 views

Fit a complicated function to a constant with NonlinearModelFit

I wish to fit a complicated parametric function (logder, with lambda parameters) to a constant (L) in order to minimize its dependence with the variable k in a given interval. To do that, I use a ...
6
votes
1answer
232 views

How trustworthy is NMaximize?

Suppose I solve a constrained optimisation problem using NMaximize. How confident can I be of the accuracy of the result? For concreteness, suppose that F,G are ...
1
vote
1answer
48 views

Getting result from Maximize

I'm trying to get maximization result from Maximize function to use it in later calculations. At the moment I use the following code: ...
0
votes
0answers
29 views

Variables input generation for Minimization in High dimensional space

I'm currently doing optimization in a high dimensional space. I was thinking of giving FindMinimum (or NMinimize not certain ...
14
votes
1answer
732 views

Is Mathematica `ContourPlot` function really so efficient?

I wanted to find the roots of the function $f(x,y)=\sin(3.2x)\sin(1.3y)-2.1 \sin(1.3x)\sin(3.2y)$. This is what the function looks like: ...
0
votes
0answers
29 views

How to evaluate NMinimize inside a function

I want to define a function that returns a sum of differences of some points to a given function. To obtain these differences I would like to use NMinimize, but if I implement that straightforwardly, ...
0
votes
0answers
31 views

Tricks to speeding up optimisation of a function involving a heavy integration

This is the code, and energycoeffs[] is the function that takes in a dxd matrix and spits out a scalar value. ...