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

learn more… | top users | synonyms (4)

0
votes
1answer
22 views

Calculate Max-Min value and corresponding parameters

I have two functions funA and funB which are also functions a,b,x,and ...
8
votes
0answers
69 views

FindMaximum failing on a trivial problem

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 ...
2
votes
1answer
31 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
2answers
171 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
37 views

In NMinimize, how can I efficiently handle NIntegrate errors for non-integrable functions?

I am using NMinimize to find parameters that minimise the integral of a function in the least squares sense: ...
1
vote
0answers
31 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 ...
1
vote
0answers
35 views

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

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 ...
3
votes
1answer
231 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}]$ ...
2
votes
0answers
46 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 ...
2
votes
1answer
66 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
25 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 ...
1
vote
1answer
57 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 ...
3
votes
1answer
84 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
0answers
38 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: ...
1
vote
2answers
115 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 ...
2
votes
1answer
105 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
61 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. ...
-2
votes
0answers
59 views
4
votes
0answers
112 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 ...
4
votes
2answers
244 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
1answer
47 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. ...
5
votes
3answers
196 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. ...
4
votes
1answer
78 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: ...
0
votes
0answers
52 views

Maximizing a 3-variable function

I want to find the maximum of the following function $$f(x,y,z) := -y^2 - 3 z^2 + xy + 2xz - 2yz + my + (m + n + t)z - nx,$$ where $m,n,t$ are indeterminate constants, subject to the constraints ...
0
votes
0answers
48 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
79 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, ...
1
vote
1answer
79 views
4
votes
1answer
125 views

NMinimize fails on Mesh?

Context I want to identify the minimum of a solution of a PDE found on a mesh. Problem I do not understand why NMinimize fails on a mesh? As a test case, ...
0
votes
0answers
6 views

Can these steps be converted to a mathematical expression using equations/graph theory/Calculus/Set theory/functions/? [migrated]

Want to convert below algorithm into a mathematical model:- General points 1. Let there be a Connected Directed Graph. G = (V, E) V vertices or nodes E edges. This graph can be seen as a network ...
0
votes
1answer
31 views

How can I name to a saved file with the numerical values of some specific parameters? [duplicate]

I'm using some parameters to determine the elements of a list. I want to save this list with DumpSave, but I need to name it with its parameters. For example, I use the following parameters ...
0
votes
0answers
18 views

How to get rid of numerical scope error? [duplicate]

I am trying to perform a numerical maximization routine on a setdelayed function which involves a numerical integral and I'm getting an error message. The evaluation continues and gives the right ...
2
votes
0answers
84 views

Appropriate method for a Non-linear Optimisation Problem, With Linear Constraints,

I have a small non-linear, chess related, program with linear constraints and an objective function obtained from a polynomial probability generating function including some decision variables . At ...
8
votes
2answers
140 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 ...
4
votes
1answer
248 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 ...
2
votes
0answers
100 views

Precision and accuracy in NDSolve and NMinimize

I use NDSolve quite a lot and have noticed that setting values for AccuracyGoal and ...
6
votes
1answer
110 views

NMinimize Example from Wolfram Documentation Center

Here is the third example of NMinimize function from Wolfram Documentation Center at Possible Issues section. ...
6
votes
1answer
115 views

ParametricNDSolve[ ] and NMinimize[ ] in Combination

I have the following code that is used to simulate a spacecraft orbiting Mars, and uses ParametricNDSolve to vary the spacecraft's initial conditions using a parameter value ...
0
votes
1answer
45 views

Finding function by constraints

I have the following coefficient finding problem: f[x] := a * Log[b*x + c] + d Constraints: f[0] = 1 f[80] = 0.5 I want to find the coefficients of f that ...
5
votes
1answer
261 views

Need help with the Lagrange multiplier method

Well I am new to Mathematica and got really stuck solving this problem. In class, I was ask to use the Lagrange multiplier method to find the maximum and minimum value of $f(x,y) = x^2+y^2$ which ...
1
vote
0answers
33 views

Method used by NMaximize with a binary linear problem

I'm using Mathematica 7's NMaximize to solve a linear programming problem with thousands of 0/1 integer variables, thousands of linear constraints and a linear target. I suppose I could use ...
0
votes
0answers
35 views

Optimization over 6 vectors

Suppose I have an expression which depends on 6 unit vectors (3 dimensional). Hence, I need to optimize over 12 parameters (every vector contains 3 parameters, but one we can reduce by considering ...
0
votes
0answers
34 views

Numerical minimization hangs at some steps

Let me briefly explain what I observe and cannot really explain by myself. I occasionally use NMinimize to find optimal parameter sets and sometimes it happens that ...
6
votes
0answers
139 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
0answers
45 views

Calculations using imported .csv files

How do I co calculations after I have imported two files (in my case .csv files). I want to take the average of the columns/ rows and then display them to the user in a new chart. Example A1 of one ...
0
votes
0answers
46 views

L1-Norm Minimization

I need the function for the L1-Norm Minimization problem formulated here https://reference.wolfram.com/language/tutorial/ConstrainedOptimizationLinearProgramming.html#261990371 ...
4
votes
1answer
104 views

Question about FindMaximum

I must advise you that I am an almost total novice in mathematica.. However here is my very simple question.. I know the command FindMaximum[{f},{x}] to find the maximum point and maximum value of a ...
2
votes
1answer
53 views

Transforming an Optimization Problem into a multi-vector Optimization Problem

I am sitting on an MultiAgent optimization problem trying to solve for a quadruple of variables {e,l,b,c} In a single agent (...
7
votes
1answer
136 views

Finding the least positive integer satisfying a quantified statement

I'm studying the convergence of the sequence of functions $f_n:[0,1]\subset\mathbb{R}\to\mathbb{R}$ defined by $$f_n(x)=n^2x(1-x^2)^n$$ for $n\in\mathbb{N}$. These functions converge pointwise to the ...
1
vote
0answers
41 views

reset the value of a variable [closed]

Folks, I have a problem in populating a matrix without overriding the values. After performing computations for various values for j, I want to store these values in following matrix. Here is the ...
1
vote
0answers
55 views

Finding the global extrema of a surface? [closed]

I am trying to figure out how to find the global extrema of the function surface shown below and can't seem to get answers that make any sense. I am using the FindMinimum and FindMaximum functions ...