The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [mathematical-optimization]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
59 views

Minimization of objective function 300000 xy [closed]

How could I minimize the following in Mathematic? 300000 xy under the constraints ...
1
vote
3answers
113 views

How to find the maximum?

I have in mind $$\max\left( \sqrt{(x-1) (y-x)}+\sqrt{(1-x) (7-y)}+\sqrt{(y-7) (x-y)}\right)$$ for $x\geq -2\land x\leq 3\land y\geq 0\land y\leq 11 $, of course, taking into account real values of the ...
-1
votes
1answer
78 views

NMinimize in NMinimize …why doesn't work?

I want to use NMinimize in NMinimize. What I want to do is 1) Make and Input the candidate of numbers to func by 1 st NMinimize. 2) replace numbers with the candidate. 3) evaluate and seek the "t" ...
1
vote
1answer
762 views

Numerical saddle point problem of a function of many variables

I want to find the following saddle point of the function of 10 variables: . I am not able to find the stationary points by setting the first derivatives to 0, so I need do optimize the function ...
3
votes
0answers
214 views

Automated searching for maximal 2D point configurations

I have some black-box function that takes lists of 2D points, and I would like to find some practical methods of searching for collections of points that maximize it. Motivation I've come across ...
1
vote
0answers
68 views

Integer linear programming can't find global minimum

I was working with Project Euler Problem 418 using Mathematica and got in trouble. I wrote a function to find the unique factorization triple which minimizes c / a for integer n. ...
1
vote
3answers
83 views

NMaximize not solving my problem

Check the following, integer problem: ...
1
vote
1answer
50 views

How to take a point randomly from a region [duplicate]

I want to take some points randomly by the limits above, I had try to use FindInstance method but it always out (0,0) ...
0
votes
0answers
53 views
0
votes
2answers
51 views

NSolve does not return a value

I'm interested in obtaining the KKT multipliers in a constrained optimization problem. I've checked the NMaximize documentation, but I've been unable to find how to ...
0
votes
0answers
21 views

Nmaximize with array in ConvexhullArea

I want to find maximum of convexhull area for n points. I try to give a small example (n=4) as follow ...
4
votes
1answer
225 views

estimation of values using NMaximize over symbolic array entries

I'm trying to generate instances of a dataset that satisfy specific conditions, based on the following equation: Each of four non-zero terms (term 1, A; term 3, B; term 4, C; term 5, D) is a scalar. ...
0
votes
1answer
67 views

How to extract the minimal value from NMinimize? [closed]

According to the manual, if I calculate NMinimize[x^4 - 3 x^2 - x, x] that returns {-3.51391, {x -> 1.30084}}, I can extract the minimal value -3.51391 using <...
1
vote
0answers
57 views

L1-norm optimization algorithm crashes kernel on large datasets

I have an A.X-B linear system which I have transformed into A.x-b to be solvable as a linear program using the code below: ...
2
votes
1answer
47 views

Having trouble with Maximize

The following code doesn't yield any results from Mathematica: ...
1
vote
2answers
145 views

The Levenberg-Marquardt method for nonlinear least squares curve-fitting

There is a function with unknown coefficient $a$, $b$, $c$ $$t(k)=\frac{1}{a b}(c-arcsinh(\sinh(c \cdot e^{a\cdot k\cdot 2\pi}))$$ I have a measurements $t_k$ from observed data. $(t_1 =0.4,t_2 =...
0
votes
1answer
41 views

How can I specify the region for every variable simultaneously in NMinimize?

I want to use NMinimize to find the unknown unitary matrix that solves a (possibly nonlinear) matrix equation. For example, the one that transforms the Pauli matrix ...
1
vote
2answers
111 views

Is it possible to find a closed solution for this problem?

I need to find the global minimum of the following function: ...
0
votes
1answer
103 views

Minimizing a function problem

I'm solving an elastoplastic problem of the Ducker Prager model using the closest point projection method, which consists of minimizing a distance between a trial stress and the yield surface in the ...
0
votes
1answer
68 views

Finding the minimum points of a discrete trigonometric equation

Basically I'm trying to solve the equation $$A\Big(\sin(\theta_a-\theta_{a+1}) + \sin(\theta_a-\theta_{a-1})\Big) + B\Big(n_a^z \sin(\theta_a) - n_a^x \cos(\theta_a)\Big) = 0$$ subjected to the ...
2
votes
0answers
179 views

How to find which automatic method is used by FindMinimum?

This question has already been addressed here and here. The second link consists of an answer by halirutan, which clearly states which method is used in which situation. However, while trying to check ...
4
votes
1answer
116 views

Speedup of DimensionReduce

I am interested in accelerating DimensionReduce using the "TSNE" method. I have a matrix with a size of 30000 * 10, and I want to reduce to 30000 * 8. But the calculation is very slow, any suggestions ...
1
vote
2answers
47 views

Define x as a multiple of a number as a constraint in the Maximize function

I am trying to optimize a linearly constrained Production Function. I have three inputs and want them all to be multiples of 150. I can make all the inputs to belong to the Integer Domain but is there ...
1
vote
0answers
48 views

Making a function $ f(n) $ tangential to another function $ g(n) $ by choosing appropriate constants

I have two functions $ f(n) = 1/(1+n) + b, (n \geq 0,b \geq 0) $ and $ g(n) = pn^2 + qn + r $. Assuming that I know the value of $ p, q $, and $ r $, I am trying to find a value for the constant $ b $ ...
0
votes
0answers
24 views

NMinimize calling an own defined function [duplicate]

I want to call an own defined function through NMinimize. For the sake of simplicity, let us define the problem as follow: ...
3
votes
0answers
60 views

Plotting gradient and newton directions for parametric system of nonlinear ODEs

I have a bucket (system) of chemical kinetics models, a nonlinear dynamical system given by: where kf >= 0 and kr >= 0 are the parameters. The initial conditions are A(0) = B(0) = 1 and C(0) = 0. I'...
6
votes
1answer
350 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 ...
0
votes
1answer
289 views

Translating the Newton-Raphson method from Matlab to Mathematica

I am trying to optimize the variables of two (or three depending on how you think about it) matrices using the Newton-Raphson Method. I made the bottom code in Matlab. The code is pretty simple it ...
0
votes
0answers
86 views

solving the game of fiver

Up to an error by myself, the following code is an implementation of the mixed integer linear programming of the game of Fiver : ...
5
votes
2answers
272 views

Minimize distance between two lists

Writing: ...
1
vote
2answers
157 views

Anyway to Speed up this code?

I have the following code: ...
2
votes
2answers
196 views

How to find second,third,etc maximum peak of list

I need to find all values of peaks. I have Table with 10000 elements in it and I plot a graphic using ListPlot. Then I tried to ...
0
votes
0answers
63 views

Minimize and Table of variables

I use a list of variables to Minimize a particular quantity { Q, val1, Table[Pi, {i, 1, m, 1}} where i is the subscript of P. However in this way I have ...
0
votes
0answers
74 views

An optimization problem

I have the following two quantities denoted by $LHS$ and $RHS$: ...
3
votes
1answer
37 views

evaluation about Exp[] and Complex problem [closed]

Exp[I*Pi*0.75]*Exp[I*Pi*0.75] Exp[I*2*Pi*0.75] the results are: -2.22045*10^-16 - 1. I -1.83697*10^-16 - 1. I I know it is ...
3
votes
1answer
133 views

Generate convex-hull of a 15 dimensional space

This question follows my last post. I have a function $ \vec{f}: S^6 \times S^6 \rightarrow \mathbb{R}^{13} $ defined on two 6-dim hyperspheres. We will denote the function $ \vec{f}(\vec{x},\vec{y}) ...
0
votes
1answer
67 views

How can I optimize plotting the solution to ParametricNDSolve as a function of a range of values of the parameter?

I'm using ParametricNDSolve to find a solution to a set of first order ODEs which have one independent variable, z. The set of initial values contains a function of t. ...
0
votes
0answers
35 views

`Minimize` keeps running

I'm trying to determine the effect of small changes in one parameter of my problem on the KKT multipliers. The program computes the values of those multipliers (γVec...
0
votes
1answer
43 views

How to find minima for non scalar-valued [closed]

I want to find minima. My code: ...
1
vote
0answers
39 views

Finding zero linear combinations of polynomials (numerically)

I have two functions of real variables defined on two compact spaces ...
1
vote
2answers
80 views

Solve multiple equations and getting solutions [duplicate]

This is my first post here so I'm not really sure how all of this works, but I'll try my best to explain my problem. I'm supposed to solve the equation system ...
3
votes
2answers
160 views

Formulating a tailor-made Maximum Flow problem in a directed graph

Let a digraph, G, be given, where t[i,j] and a[j,i], respectively, denote transfer capacity ...
0
votes
1answer
53 views

How to optimize this script?

fx8350, 16Gb ram just need to solve this: 13, 19, 19, 16, 26, 33, 26, 31, 5, 24, 21, 34, 35, 35, 35, 20, 7, 12, 18, 17, 6, 8, 15, 24, 2, 17, 15, 22, 29, 15, 21
3
votes
2answers
109 views

Programming with Mathematica Syntax - Dunford decomposition

I am always amazed while I am reading some solutions of problems in mathematical problems of this site with Mathematica. For instance, look at the problem 48. Whereas I am writing 100 lines of code ...
3
votes
2answers
58 views

Find the base vectors of a point set

I have a list of coordinates that fits into a 2D periodic lattice, with some error ( $\vec{R}=n\vec{i}+m\vec{j}+\vec{\varepsilon}$). Is there a way to find the base vectors of the lattice? I guess the ...
3
votes
0answers
165 views

Speeding up an optimization problem

I have the following code which is working well but for matrices $M_i$ of size $40000\times 4$ the optimization problem takes extremely long. ...
4
votes
1answer
58 views

AccuracyGoal & PrecisionGoal: how to know which was used to yield the result?

With NMinimize (or many other functions), when an answer is found without any warnings, this means that a certain convergence criterium was achieved. It could be ...
2
votes
1answer
51 views

FindInstance for all real values satisfying a condition

I seek at least one instance of positive fractions $p,q,r$ where $p,q,r \in \mathbb{Q}^+$, for which $$\frac12 (a - 2 b + c)^2 \ge pa^2 + qb^2 + rc^2\quad \forall\ a,b,c \in \mathbb{R}.$$ I used this ...
2
votes
2answers
53 views

SearchPoints -> Automatic within DifferentialEvolution: what's its meaning?

A simple question: what is the meaning of the standard option (Automatic) for SearchPoints within the ...