# Questions tagged [mathematical-optimization]

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

2,160 questions
Filter by
Sorted by
Tagged with
87 views

### Given square matrices A and B, how to solve T obeys Transpose[T]. A . T = B?

Dear Mathematica experts, Given two square matrices, A and B, how do we use Mathematica to solve a matrix T such that T satisfies this matrix equation? (Here we have A,B,T $\in$ general linear matrix ...
246 views

### How to find the nearest element that is bigger than x?

Consider some list list=RandomReal[{0,1},10^6]; I would like to find the closest element to some value of x that is larger than it, and also extract its position. ...
120 views

36 views

### NonlinearModelFit with NMinimize Submethods and Selective or Mixed-Head Constraints

Problem: I believe I've found a two related bugs associated with using NonlinearModelFit while making a Method call to NMinimize's submethods, e.g. "RandomSearch" and "...
78 views

### Finding the maximum of a function [closed]

I can’t find the maximum of the function, although the graph shows that it exists. Maximaze and FindMaximum give different results. However, these results do not coincide with the graph. ...
168 views

### Can I use WolframScript to solve this system of equations?

I have these three equations: ...
2k views

### Efficiently Mowing Grass with Mathematica

Recently, I was mowing my yard and was thinking about how to use the least amount of time/fuel and how to simulate. Mowing a yard that is shaped as a convex polygon is not difficult, you can just make ...
1 vote
118 views

### Find the point with the largest slope change

I have a list of x-y data: ...
1 vote
79 views

### Minimization of an implicitly specified function

exp - an experimental data, where expT - temperature, expChi - magnetic susceptibility I ...
144 views

### Numerical Galerkin method with parametrized interpolation function

modified Here I try to realize a numerical fit (Galerkin method) using parametrized Interpolation function to fit examplary Exp[x] in a given grid. So far I tried <...
43 views

### FindMinimum with many Sums and NIntegrates is very slow

I want to calculate the global minimum of an equation which has several hundred Sums (I used 300 in this code), but the calculation is very slow. My code is as ...
1 vote
83 views

### How to calculate maximum between two or more lists element by element and also the index corresponding to the maximum element?

I am looking for a function say f such that for example f[{a1,b1,c1},{a2,b2,c2}] will give {Max[a1,a2],Max[b1,b2],Max[c1,c2]} and also a function g say such that g[{{a1, a2, a3}, {b1, b2, b3}},{{c1, ...
164 views

### Problem with FindGeometricTransform and NMinimize

I'm interested in Centroidal Voronoi tessellation. Here are two examples of unit disk tessellations: They are the same with respect to rotation. Recently, I've found ...
97 views

### How to optimize the sum of squared values?

How can we optimize the sum of squared values (or the sum of multiple absolute values)? I found that using ArgMin is very slow. Are there any other methods to accelerate the solution? Edit：I am ...
1 vote
85 views

### Nearest inside Minimize

How to use Nearest inside Minimize? The following returns errors but if # - {a, b} is ...
1 vote
253 views

### How to interpolate an implicit function?

chi(t) is implicit function. The implicit function can be plotted by ContourPlot. Is it possible to obtain chi(t) explicitly using function interpolation? ...
91 views

### Why doesn't NMinimize work with NSolve?

Why does NMinimize throw the error and how to fix it? ...
255 views

### Packing unequal spheres into minimal cuboid

There are several non-overlapping spheres in 3D. How to find a cuboid Cuboid[{a,b,c}] containing these spheres with minimal ...
281 views

### How to solve this equation over the integers with Mathematica?

I try to solve with Mathematica 13.3.1 on Windows 10 the problem $$x^2+2^{x^2+1990}-y^2=2^{y^2+y}+y-1990\land x+y>1990,\, x\in \mathbb{Z},\,y\in \mathbb{Z}$$ which originates from Bauman Moscow ...
114 views

### Problem with Min and Max [closed]

s=min{max{0,a}, max{0,b}, 1/(1-a) max{0,1-a}} is there any alternative way to make this more concise without condition and in one expression. Condition is -infty<a<infty and -infty<b<1
1 vote
135 views

### How to calculate the depth of the lake in mathematica?

I want to calculate mean depth of Goose lake (mean depth=4.6 m), I use bellow command for this operation, But this command is not automatic and we have to create the coordinates manually, and on the ...
101 views

### Why can't NSolve find values that FindInstance can?

I am trying to solve for \[Epsilon], given three input paramters n, x and ...
190 views

### Finding a fixed point of function without a closed-form solution

I am trying to find a fixed point of a function that does not have a closed-form solution (it is the solution to a NMaximize problem). The following simplified problem, which would have an easy ...
1 vote
57 views

### FindMinimum can't evaluate Nearest numerically

I'm trying to use Nearest as a function to minimize over: a toy example is ...
121 views

### How to estimate Lake area and volume in Mathematica?

I have a satellite image of the lake and I want to estimate its area and volume. Actual volume:1.49*10e8 m^3 Actual Area:36.9 km^2 I did the following command to find the volume, but it is not very ...