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 vote
1 answer
51 views

Find minimums of a 2D list by the absolute value

I have a list that reads ...
user avatar
  • 631
-4 votes
2 answers
64 views

Least norm solution to a set of linear equations [closed]

Suppose I have a set of linear equations $M x = y$ where there are infinitely many solutions. I want to find a solution $x$ with the smallest $l_2$ norm $\|x\|_2$. Is there an efficient way to do this?...
user avatar
2 votes
2 answers
74 views

Optimization problem with parameter dependent interval of functions

I am working on an optimization problem but ran into a problem. Here is a simplified version of the problem: ...
user avatar
  • 23
5 votes
1 answer
110 views

Express polynomials as sum of squares

Well, while SOStools of Matlab can express a polynomials as SOS (Sum Of Squares) by the following theorem: A multivariate polynomial p in n variables and of degree 2d is a sum of squares if and only ...
user avatar
  • 153
0 votes
0 answers
38 views

Choice of initial values for FindMinimum

I have been using the FindMinimum function in Mathematica to implement nonlinear regression (for function $f(x,y)$, say). I am curious to find how the starting ...
user avatar
7 votes
1 answer
112 views

Using Compile on Gradient within FindMinimum efficiently

This is an example from the documentation: ...
user avatar
  • 2,160
0 votes
1 answer
51 views

Real valued solution

I want to obtain the critical points or if you like a real solution for the first derivative of the function set to zero, and the second derivative also vanishes of the function : ...
user avatar
4 votes
1 answer
139 views

Nonnegative Least Squares Algorithm (NNLS) [closed]

Can anyone optimize the code below which is developed in an old version of Mathematica (2003) both in terms of efficiency and adaption to the latest versions of Mathematica? Description of the code: ...
user avatar
2 votes
2 answers
88 views

Solution to a linear equation with minimum rank

Suppose I have a linear equation, $X.M=A$, for given matrices $M$ and $A$. I can use FindInstance to produce a solution $X$. How can I add the constraint that $X$ has the least rank? Indeed, I could ...
user avatar
9 votes
3 answers
194 views

How to make these callout labels not overlap

This is my code: ...
user avatar
  • 23.9k
0 votes
0 answers
53 views

Minimum of a function that depends on several variables

I have a function, $$A=\sum_{m}mx$$ provided $$x=\frac{2(y1+iz)}{2t1-\left|\frac{t2}{iy2}+z\right|}$$ Here $$y1,z,t1,t2,y2$$ all are varying. But $x$ needs to be in the limit of $-1$ and $0$. Is there ...
user avatar
  • 1,173
1 vote
2 answers
42 views

Find min value of a complex Root function [closed]

Could someone tell me how to obtain the min value of this function when lambda is between 0 and 1: ...
user avatar
  • 11
5 votes
1 answer
99 views

Optimize cost when ordering wood boards (cutting stock problem)

That is probably a common optimization problem, but I don't know how to solve it efficiently. Say you want to buy the following wood boards: 2 to 1m, 3 of 1.5m, 2 of 2m. The shop has the following ...
user avatar
  • 13.8k
1 vote
1 answer
117 views

Find the maximum of a given function

I calculate a target function f about two variates a and b. ...
user avatar
0 votes
2 answers
72 views

How to take the derivative with respect to a function with more than one variable?

I have a function that includes another function inside. I want to know the derivative at every point x. I have spent a lot of time trying to figure out how to do this, but I am very lost. I have ...
user avatar
0 votes
0 answers
38 views

NMinimize and DE

I would like to use the Differential Evolution option of NMinimize to find the "optimal" solution for the hyper-sphere function defined as follows, ...
user avatar
1 vote
1 answer
72 views

How to get a rational solution of the linear system efficiently?

I got a large linear system ...
user avatar
  • 71
0 votes
0 answers
38 views

Is is possible to specify use of a non-Euclidean norm for NonlinearModelFit

When using NonlinearModelFit with Method->NMinimize I have received the warning message NonlinearModelFit::lmnl, which includes the text ""The model -cVar+Log[1+0.00821596 t] is linear in ...
user avatar
  • 83
2 votes
2 answers
121 views

A problem of nonlinear multi-objective optimization

I have two variables x1 and x2 and I use them to calculate 4 metrics y1,y2,y3, and y4. now I want to solve for the value of x1 and x2 so that these four metrics are as large as possible. Can anyone ...
user avatar
1 vote
1 answer
43 views

Boolean constraint in an interval for FindMinimum

I have a function with a large number of variables that I am trying to minimize subject to some constraints, but for simplicity let us say that it only has two variables, f[x, y]. The constraint is ...
user avatar
  • 121
4 votes
1 answer
565 views

My model has not finished evaluating in more than a day so can't test if it works, what is wrong with it?

Hello I have this modified monocentric city model that I have been working on for a while. Sorry for the long post, I wanted to add the whole code, because it's all connected. My suspicion is that it ...
user avatar
2 votes
1 answer
74 views

Local extrema points of a function of two variables

i need to find local extrema points of a function of two variables, but it doesnt work FindMaximum[x^3 - 2 y^3 - 3 x + 6 y, {x, y}] I have this error: ...
user avatar
  • 43
0 votes
1 answer
99 views

Finding local minimum of a 2D potential

I tried to find a local minimum point of a 2D potential U[\[Chi],\[CurlyPhi]] with both FindMinimum and ...
user avatar
  • 13
0 votes
0 answers
32 views

Norm adding up residual

For FindFit I want to have a norm that just sums up all residuals. For the sum of absolute values there is NormFunction -> (Norm[#, 1] &), but I don't know ...
user avatar
  • 77
7 votes
3 answers
588 views

How can I quickly find the coordinates of key points? [closed]

There are 1000 points in the space. The coordinates are (0,0,0) - (9,9,9). Any point can cover all points on the three straight lines (parallel to the X, Y and Z axes respectively) where this point is ...
user avatar
  • 301
1 vote
2 answers
165 views

Minimax / Minmax optimization

For the complex polynomial $$P_n(z) := 1+z+\frac{z^2}{2} + \sum_{j=3}^n \gamma_j z^j,\quad z \in \mathbb C.$$ I want to solve the following minimax/minmax optimization problem: $$\min_{\gamma_j} \max_{...
user avatar
  • 113
0 votes
0 answers
22 views

Issues with ConvexOptimization and SetPrecision

I am completely new to Mathematica (second day), so do not expect things to look polished. I am trying to perform a ConvexOptimization over a List/Array (dimensionality ...
user avatar
  • 113
3 votes
1 answer
1k views

Is there a faster way to solve this linear programming problem?

I need to get a rational solution of the linear constraints ...
user avatar
  • 71
2 votes
1 answer
80 views

Parametric minimization of a quadratic expression in two variables

I am not an expert in using Mathematica, and I do not understand the following result (apologies if it appears trivial). I want to find the general solution to minimize the following expression over $...
user avatar
0 votes
1 answer
49 views

Finding element selected in NMaximize[{Min[...], constraints},{vars}]

How can I determine which element of Min[] is being selected in a NMaximize[{Min[...], constraints},{vars}] problem? For example,...
user avatar
2 votes
1 answer
109 views

Weakness in Maximize

Solving a minimization problem in version 13 on Windows 10, I obtain ...
user avatar
  • 17.2k
1 vote
0 answers
36 views

When can you guarantee Minimize outputs the global minimum? [closed]

In the Minimize documentation, it's stated that "Minimize will return exact results if given exact input. With approximate input, it automatically calls NMinimize." What is an approximate ...
user avatar
3 votes
1 answer
81 views

Convex optimization of a least squares regularized objective function [closed]

Given, a vector of observations $\mathbf{y}=(y_1, y_2,\ldots,y_n)$ I am trying to find the soltuion to the following optimization problem: $$ \min{ (1/2) \|\mathbf{y-x}\|_2^2 + \lambda \|\mathbf{Dx}\|...
user avatar
2 votes
2 answers
137 views

Find the maximum value of the minimum eigenvalue of the matrix

There is a $4×4$ matrix $Q$ where $c,d,e,m,n$ are variables. How to get the maximum value of the minimum eigenvalue of $Q$? $Q=$ $$\\\left( \begin{array}{cccc} \frac{12058305}{23104}-304 c & -849 ...
user avatar
  • 71
0 votes
0 answers
90 views

Simplification of long trigonometric expression taking a long time

I have tried to Simplify as well as FullSimplify a long trigonometric expression to get a simplified form of the expression but it takes a very long time almost hours and sometimes it also shows error ...
user avatar
1 vote
0 answers
38 views

Selecting a set of points from a region to maximize the smallest pairwise distance

Suppose, we have a region (say, for simplicity, a unit cube) and a distance function that, given the coordinates of any two points in the region, calculates the distance between them. It is not simply ...
user avatar
1 vote
1 answer
131 views

How to numerically solve an equation

I would like to solve for $r_2$ the following two (independent) equations: $x_{Min}(a,b,c,r_1,F)=x_{Max}(a,b,c,r_2,F)$ (1) and $x_{Min}(a,b,c,r_2,F)=x_{Max}(a,b,c,r_1,F)$ (2) where $a$, $b$, $c$, $r_1$...
user avatar
2 votes
2 answers
79 views

Plot issue : put a legend instead of a top label

I have an issue about putting a legend consisted of a text and numerical value instead of a label. For example, with this command line : ...
user avatar
1 vote
1 answer
53 views

Plot issue : bad label ordering with concatenation of strings

I have an issue about a label which is consisted of a variable name [Omega]BD and a numerical value associated. Firstly, I put the BD subscript to ...
user avatar
1 vote
0 answers
65 views

Find Max Instance Over Permutations

I would like to find the maximum of some objective function over all possible permutations ...
user avatar
1 vote
1 answer
102 views

How to Plot 3D plot for optimized values in Mathematica

I have the following ODE from the paper https://sci-hub.hkvisa.net/10.1016/j.aml.2018.02.016 $y^{\prime\prime}(t)=-ay^{\prime m}(t)+y(t)(b y^{2}(t)-\frac{3}{2}y(t)+\frac{1}{2})$. The boundary ...
user avatar
  • 169
1 vote
1 answer
56 views

PlotMarkers in Mathematica with using an iteration scheme

I have the following operator $T:[0,1]\rightarrow[0,1]$ by $Tx=\frac{x}{2}$. I use the following method for two different initial point $x_{0}\in[0,1]$ as $x_{n+1}=Tx_{n}$ $n=0,1,2,3,...$ I have set ...
user avatar
  • 169
1 vote
1 answer
95 views

How to optimize the $L^{2}$ norm in Mathematica for an iteration scheme and How to plot its 3D graph?

Consider the BVP $y^{\prime\prime}(t)=\frac{3}{2}y(t)^{2}$ with boundary conditions $y(0)=4$ and $y(1)=1$. The initial iterate is in this case $x_{0}=4-3t$. The higher iterates are given by the ...
user avatar
  • 169
0 votes
0 answers
30 views

Minimizing and marginalizing in Mathematica

Suppose there is a chi-squared function of several parameters, f(x,y,z), and I have to fit one parameter, say "x", while the rest "y" and "z" have to be dealt with in a ...
user avatar
1 vote
2 answers
95 views

Please I need help to define a function of two variables (t,x)!

Let's define the following function: f[t_, x_] = t^2 + t*x*(1 - x) such that $x \in (0,1)$ and `$t \in (0,0.02)$ The problem is when I want to define the following ...
user avatar
0 votes
0 answers
64 views

Solve two equation by fixed point iteration method

I am tryin to reproduce the figure.2 of this paper. In order to obtain this plot, I need to find the global minimum of equation.(7) or equivalently solving two coupled equations of $\frac{\partial \...
user avatar
  • 1
1 vote
2 answers
125 views

How do I find the minimum and maximum values of a function of two variable with constraints? [closed]

The question is find the minima and maxima of the function $$f(x,y)= x^2+5y^2+11x-12y+30$$ on $(x^2)/81+(y^2)/49 \leq 1.$ I've been trying to use FindMaxValue and <...
user avatar
  • 115
0 votes
1 answer
40 views

Why do I get NMinimize::nrnum error?

I have this minimization program and although I've restricted my variables to be non negative, I get a nrnum error in the NMinimize step. I'm guessing this is what ...
user avatar
  • 543
0 votes
1 answer
45 views

Maximizing arbitrarily scaled step function

I am attempting to maximize a function dependent on a single variable (x) that contains multiple parameters. The case of a simply loaded beam with discontinuities in the loading. However so far I have ...
user avatar
3 votes
1 answer
69 views

Finding maximum of 2D interpolating function as a function of one of the variables

I am solving a 2D PDE in space and time b(r,t) and would like to find the maximum value of b in space as a function of time t. Using the solution for maximising a 1D interpolating function from here, ...
user avatar

1
2 3 4 5
39