# Questions tagged [mathematical-optimization]

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

1,897 questions
Filter by
Sorted by
Tagged with
3 votes
1 answer
246 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 ...
2 votes
1 answer
63 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: ...
• 43
0 votes
1 answer
91 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 ...
• 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 ...
• 77
7 votes
3 answers
564 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 ...
• 107
1 vote
2 answers
151 views

• 493
2 votes
2 answers
135 views

• 199
0 votes
1 answer
112 views

### Mathematica does not show anything after running for higher iterations

Consider a BVP: $y^{\prime\prime}=\frac{3}{2}y(t)^{2}$ with the boundary conditions $y(0)=4$ and $y(1)=1$. The exact solution is $y(t)=\frac{4}{(1+t)^{2}}$ and the initial guess is $y(t)=4-3t$. Now I ...
• 169
0 votes
0 answers
33 views

### problem In NMinimize and large number of variables and constraints

I Try to solve TSP problem by writing the linear program of this problem (I know that FindShortestTour Function can solve it but I need to solve it manually), I generate the linear program correctly ...
• 73
1 vote
0 answers
37 views

### Expressions using matrix variables in SemidefiniteOptimization

The SemidefiniteOptimization function allows one to specify the region for the optimization variable, such as in ...
• 11
0 votes
0 answers
51 views

### extremum points

I'm trying to find Min and Max points of the polynomial below, but it seems that the expression is very complicated to mathematical, I've tried a numerical function, such as NMinimize, NRoots, Solve, ...
• 5
3 votes
1 answer
71 views

### How do I use a FunctionCompile(d) function in FindMInimum

Suppose I would like to speed up the function in FindMinimum[function[variables],startingPoint] by compiling function I've constructed a minimal working example to describe what I would like to do. ...
• 2,068
0 votes
1 answer
68 views

### How do I find the maxima of the function x+y such that x^2+y^2=1? [closed]

It is a simple question. I am trying to maximise x+y for coordinates {x,y} that lies on a circle of radius one. I tried using FindMaximum. ...
0 votes
0 answers
19 views

### Table of time-varing calculation slower to the point of kernel blowing up

There is a complicated function obtained by numerically solving a pde, let us call it $u(t,x,z)$. For this $u$, I want to calculate the global maximum of $u^2$ at a fixed position of $z$, and plot ...
• 43
1 vote
1 answer
155 views

### Need to find a unique mathematical expression (not in documentation) that is as short as possible but takes a good amount of time to evaluate

I am writing a public ResourceFunction and I need a good clever use case that should not appear to emulate any examples in the official documentation but will ...
• 1,787
3 votes
2 answers
164 views

### Easier way to find integers for complex^complex

If I have (a+b I)^(c+d I) and the result is e+f I a,b,c,d should be integers e >= 2 or e <= -2 f so close to zero as possible .. this is the object function I want to minimize How to do this in ...
• 33
0 votes
1 answer
98 views

### Fitting data in a matrix

Consider the 'm' matrix: Link to 'matrix.dat': https://drive.google.com/drive/folders/1COdMCCBKq85vMDj6Jrb2qqoUlE9eTk6w?usp=sharing ...
• 939
3 votes
1 answer
167 views

### Solve an equation

I have this equation in terms of x0 and I need to find x0 in terms of Theta . ...
• 61
10 votes
1 answer
126 views

### Accumulate matrix elements

Consider the 'm' matrix: Link to 'matrix.dat': https://drive.google.com/drive/folders/1COdMCCBKq85vMDj6Jrb2qqoUlE9eTk6w?usp=sharing ...
• 939
0 votes
0 answers
49 views

• 1,028
1 vote
2 answers
99 views

### How to get x and y values and function of xy pairs (H[x,y]) from Histogramlist?

So I have generated a set of random data points as shown below sample1 = RandomVariate[BinormalDistribution[{0, 0.4}, {1.2, 1.2}, 0], 250]; From the sample, I ...