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
-1
votes
1answer
36 views

Need help to find a value to linearize the data [closed]

I have a two column data which is y vs x. I want to linearize the data by this formula 1/(x-b) but I don't know how to determine the b value such that the ln(y) vs 1/(x-b) becomes a linear line. So I ...
6
votes
3answers
384 views

How to make Minimize with Sqrt calculate faster?

This code ran a long time without getting a result (v12.0 & v11.3) Minimize[{Sqrt[3 + x] + Sqrt[3 - x*y], x^2 + y^2 == 9}, {x, y}] But with $x=3\cos t,y=3\...
1
vote
1answer
72 views

How to get ReplaceAll to happen before function call

I have a problem I am attempting to solve with NMinimize. I have a scoring function, which will give me a final score. The problem has many variables, so instead of having them as parameters, they ...
0
votes
0answers
44 views

Using Globally Convergent Newton's Method to solve for minimum of function [closed]

My goal is to write a function for the Globally Converging Newton's method to find the minimum of a function. It should stop when the derivative of it is less than 10^-6. This is what I have so far ...
1
vote
1answer
78 views

Find (numerically) point where derivative is infinite

I have a function that is shown in the image, below. The point I am interested in extracting (numeric fine) is, in this case, 200. This appears to be the point at which one derivative is infinite. It ...
6
votes
3answers
480 views

How to make the computation of a minimum efficient?

I have a $80\times 80$ matrix $A$ and a vector $P$ and I want to compute efficiently the following minimum $$ \min\{n\in \Bbb N :\|A^nP\|_\infty < 1\} $$ Then I defined my matrix and vector in ...
1
vote
1answer
53 views

Finding minimum for a function of four variables [closed]

I would like to find the min of the following function, -5 + 2 Sqrt[5] + 4 (5 - 3 Sqrt[5]) b^2 + Sqrt[2] (-1 + 2 b^2 - 2 a Sqrt[1 - a^2 - 2 b^2] Cos[ρ - ϛ]) for ...
-1
votes
0answers
35 views

smallest distance to place the capital? [migrated]

A country has four cities where should the capital be built. it is desirable that the sum of distances of the cities from the capital be as small as possible? how do i solve it ?
0
votes
1answer
38 views

All positive integer points up to a certain distance from a hyperplane

I have the hyperplane $\sum_{i=1}^{d} x_i c_i = z$ for $x \in \mathbb{R}^d$, defined by the vector of postivive numerical coefficients $c_i \in \mathbb{R}, c_i > 0$, and the value $z > 0$. I ...
1
vote
1answer
20 views

cannot get EvaluationMonitor to output number of iterations taken to find a root

I was given the following problem: Consider the equation x = exp(-x2). Plot the two curves on the same plot to get a rough idea of the intersection point. Then use a built - in function (e.g. ...
1
vote
2answers
96 views

Is a seven-dimensional constrained maximization problem too demanding for meaningful analysis?

I am interested in finding the maximum of a[1]^2 a[2]^2 a[3]^2 a[4]^2 a[5]^2 a[6]^2 a[7]^2 subject to the (entanglement) constraint ...
0
votes
3answers
88 views

Finding the maxima of a function of two variables

I am trying to understand how Mathematica finds the local maxima of a function of two variables, but I am a bit lost here. For example, consider: ...
17
votes
4answers
485 views

Optimization of function taking a permutation

I have a function $f$ which takes a permutation $P$ of the integers 1-100 in order to give a numerical value $f(x)$. The function is given by a black box, but is relatively "smooth", so should be ...
0
votes
1answer
73 views

Maximize a six-dimensional function subject to joint positive-semidefiniteness constraints

I want to maximize Abs[a1 b1] + Abs[a2 b2] + Abs[a3 b3] subject to the joint constraints ...
6
votes
4answers
339 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: ...
12
votes
1answer
896 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 (...
0
votes
1answer
67 views

Fitting different data sets with different models and 2 free variables using FindFit

I have a T1 equation from which I got two noisy datasets, one for y=0 (datax) and the other for x=0 (datay) (t is always equal to 1): ...
9
votes
2answers
423 views

ABC analysis in Mathematica

I would like to take a table with columns for the product name and total profit and segment it into three categories. Each category would have ~1/3 of the total profit (for all products). The first ...
2
votes
1answer
121 views

How to interpolate {{xi,yi},… ,{xn,yn}} with minimum bending energy?

Thin Plate Splines are explained here, and a Mathematica implementation of that for real samples { { x1, y2, z1 }, { x2, y2, z2 }, ... , { xn, yn, zn } } is ...
0
votes
1answer
113 views

Why the returned value is complex while my input is all real in Nminimize

My goal is trying to solve eq2 == 0 && eq3 == 0 simultaneously in the region -200 < H < 400 and ...
1
vote
1answer
41 views

Plotting “Maximize” function takes long time!

In the following code, I am trying to plot the function GG[DM_] that contains Maximize problem as shown in Fig: where /omega_a and ...
1
vote
0answers
56 views

Minimal and maximal angular separation of two spheres as viewed from surface of third sphere

Short version: find the values of theta and phi that make overlapValue (defined below) maximal and the values of theta and phi that make it minimal, given that all other values are constants and ...
8
votes
1answer
303 views

Maximizing over a 1D region

Why does the following not compute? MaxValue[-y^2, y ∈ Interval[{-1, 1}]] I expect it to compute the maximum value of the funtion over the interval from -1 to 1 ...
2
votes
2answers
111 views

Finding the global maximum of a function

I've the following code: ...
0
votes
0answers
55 views

Optimizing a nested function in mathematica getting stuck at local maximum and giving wrong answer

I am trying to maximize this function over the value "p": ...
0
votes
0answers
35 views

How to compute Max function of the following form:

I knew that in Mathematica, the "Max" function yields the largest element of any of the lists, for example, Max[x,y,z,....]. How do I implement this function with Mathematica? and what does this ...
1
vote
1answer
73 views

Issue with NMaxValue Constrained to an ImplicitRegion

I am trying to find the maximum (and minimum) value of an interpolated function constrained to an ImplictRegion with a (partly) curved boundary. I have followed the documentation carefully and tried ...
0
votes
1answer
46 views

Plotting NMinimize function

I want to plot the following NMinimize function: I used GGPlot = Plot[GG[DM], {DM, 0.02, 10}, PlotRange -> All] But I get nothing! My code is ...
3
votes
2answers
206 views
2
votes
1answer
66 views

The maximum value under the condition of complex constraint

Let a<0, (3x^2+a)(2x+b)>=0 be permanent established on (a, b), and what is the maximum value of b-a? Code 1 ...
1
vote
0answers
39 views

Minimize with constraints on parameters does not stop running [closed]

I have the following simple optimization problem, but when I tried to put the values into Mathmatica, it does not stop running for hours. Actual problem is: $\qquad min_{x1, x2, x3} : a1\,x1 + a2\,...
8
votes
2answers
3k views
2
votes
1answer
37 views

Nested maximum function not working

I am trying to maximize a function which is itself a maximized function. For example, see the below. Can someone explain this error: ...
2
votes
0answers
39 views

ArgMax problem with Piecewise function

I'm having an issue with finding the maximizer of a very simple piecewise function. ...
1
vote
1answer
46 views

How to solve an optimization problem with multiple constraints? [closed]

I would like to minimize a function in four variables with respect to multiple constraints. $a+b+c+d\leq 1$ and $a, b, c, d \geq 0$, i.e. minimizing on the unit simplex in 4D. How do I incorporate ...
2
votes
1answer
54 views

Maximizing Output from ParametricNDSolve [closed]

Given a system of differential equations that are dependent on two parameters, such as the system below (the equation below is not that important, I am interested in a general procedure given a ...
2
votes
0answers
57 views

Multiple agents routing optimisation problem

We are given an array of nodes of the form {{xcoordinate,ycoordinate}, weight, "name"}. This represents nodes on a 2D euclidean coordinate system. Further, we are given a number n which is the number ...
1
vote
1answer
41 views

NDSolve with Events that reevaluate with different Discrete Variables

I have the following problem: I have a set of ODEs and some discrete variables which I can solve successfully. Now I want mathematica to check at every $0.1 \,t$ time step, wether it would increase ...
9
votes
3answers
247 views

FindRoot evaluates the exact same point multiple times. Why?

This is a follow-up question to this question. Let's say we want to minimize the following function f wrt. x and ...
6
votes
5answers
187 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 ...
4
votes
1answer
63 views

Using preconditioners efficiently

I am trying to numerically solve a linear system of equations of the form A x = a where A is really ill-conditioned and ...
3
votes
1answer
101 views

How to provide an RNN various type of inputs?

I'm trying to build an RNN in Mathematica. My window is only 2 but the variables are of different types: ...
0
votes
0answers
58 views

NDSolve with Functions Depending on time and time dependent Functions

EDIT: following the advice of using Raw Input Form, the equations have the following form ...
4
votes
1answer
55 views

Calculating the volume of a paraboloidal region

I have an inequality that defines a paraboloid. I would like to calculate the volume of the intersection of this paraboloid and a cylinder of radius R. ...
0
votes
1answer
99 views

Maximize this function

For the following matrix $$M = \begin{pmatrix} f1[x,y,z] & f2[x,y,z]\\ g1[x,y,z] & g2[x,y,z]\\ h1[x,y,z] & h2[x,y,z] \end{pmatrix} $$ with ...
0
votes
2answers
95 views

Is it possible to minimize this function in Mathematica/wolframAlpha?

I want to minimize this function $f(x, y)=\left(n_{1}\right)\left(1-x(1-x)^{k_{1}}(1-y)^{k_{2}}\right)^{T}+\left(n_{2}\right)\left(1-y(1-x)^{k_{1}}(1-y)^{k_{2}}\right)^{T}$ Though it is a function in ...
16
votes
2answers
369 views

Scheduling Optimization

I asked this question here 2 years ago. I didn't know this website at that time. I just realized I could ask it here. Here is the problem statement. Assume I have 20 trucks, $t_j$, $j=1...20$ and ...
7
votes
6answers
406 views

Finding a center and radius that minimizes total distance

I have a list of $d$-dimensional data points $x_i$, and I want to find a $d$-ball which minimizes the sum of the squares of distances between the surface of the ball and the points. In other words, I’...

1 2 3 4 5 28