# Questions tagged [mathematical-optimization]

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

1,532 questions
Filter by
Sorted by
Tagged with
29 views

### Plot Table of Equations

I have a code where the first line of the body consists of an algebraic equation involving NIntegrate and the parameter a, for a ...
19 views

### Using results from Nmaximize in loop

I try to Append the vector S by z+x whereby z and ...
29 views

### Steady state customer behavior in queuing model — Numerical Optimization

With the following code I try to calculate the steady-state equilibrium waiting time at two different queues. A fraction tau of users turns away entriely, a ...
30 views
+100

164 views
+100

### Optimizing the edge lengths of a graph

This is a follow up to my question posted here The following code scales the edge lengths of a graph to be equal to edge weights ...
37 views

### FindMaximum under binary constrains

I'm trying to find a maximum for a function whose variables have binary values (either -1 or 1). The clumsy code for that constraint I use is shown below. There must be a more compact code, and I ...
59 views

### Maximize an expression with respect to a variable after its minimization with respect to other variables

I started to use Mathematica a few time ago. I want to minimize the following expression (function of $l,p,q,r,c$) with respect to variables $l, p, q, r$ and then maximize the result obtained with ...
79 views

### Maximize: x in Vectors[5, R] is not a valid variable

I am learning how to do optimization with a variable number of variables in Mathematica. I tried to write one experiment that I need to do but I have failed to get even a stripped-down version working....
32 views

### Speeding up a Table with NMinimize

I have a parametric system of differential equations (a and b are the parameters). For every value of the parameters in a given range I want to find the right initial conditions to fit some ...
33 views

### Minimize a function of a variable of four variables and one parameter with constraints

I just started to use Mathematica. Using the following simple command to minimize a function of variables $a,b,c,d$ with parameter $n$, it takes too much time. Do you know if there is a mistake in ...
23 views

### Minimize and ParametricNDSolve

I'm trying to fit an observed orbit data={years,xobs,dx,yobs,dy} where xobs and yobs are the observed coordinates and dx,dy the corresponding errors. I must fit ...
113 views

### SemidefiniteOptimization for operator norms: Stuck at the edge of dual feasibility

Can someone give a workaround and/or explanation why Problem 1/Problem 2 fail to solve through SemidefiniteOptimization? Problem 3 works. (I'm using 12.1.0 on Mac). ...
41 views

### Maximize does not work properly

I am trying to use Maximize to find the maximum value of f, which is a polynomial in terms of ...
48 views

### NMaximize seems to be returning the wrong result

I'm trying to use NMaximize to show that entropy is maximized when the distribution is uniform. It seems to work when the random variable is valued, but breaks at 4+...
41 views

### Find parameter ranges of a function whose value is within a window by sampling points

Problem: I want to find the ranges of the parameters for a function $f(x,y,z)$ when $0.9 < f(x,y,z) < 1.1$. All parameters are bounded $x , y, z \in [0,1]$. In the real problem the function ...
72 views

### Analytical value of minima of a function involving Logarithm and exponential

I am trying to derive the analytical expression for the point of minima of the function $$\frac{c+ x \ln(-2+2 e^{c/x})-\ln (-1+e^{2c/x})}{x [\ln(-1+e^{c/x})-\ln (-1+e^{2c/x}) ]}$$ Here $x$ is the ...
32 views

### True global minima of 6 parameter rational function

I need to find the value and positions of the global minima of a 6 parameter rational function. My current try is something like ...
66 views

### How to find maxima of a numerical calculation

Suppose I have the following code: ...
65 views

### Multiple minimas position in a list

Suppose I have a list of data which is oscillating. I want to calculate the positon of multiple local minimas present in the data. How can i do this?
39 views

### ArgMin returning unsolved solution

I have been trying to get the ArgMin function to work so that I can find the value of $s$ that minimizes this function:  f(s)=e^{-sa}\left(pe^s+(1-p)\right)^n\style{font-family:inherit;}{\text{, ...
40 views

### Effectivelly using Compile for calculate a Unitary transformation

I am new to Mathematica, and this is my first post, so if my question is not clear enough, I would be glad to read the comments and edit my question to add more information. The problem I need to ...
33 views

### Find the (unique) 9-dimensional ellipsoid of maximum volume lying with the convex set of 4 x 4 symmetric, positive-definite (trace 1) matrices

Find the unique (JohnEllipsoid) maximum volume ellipsoid lying within the 9-dimensional convex set formed by the $4 \times 4$ symmetric, positive-definite ("density") matrices with fixed ...
41 views

### FindInstance taking too long

I just started to use Wolfram Alpha Notebook Edition. I am using FindInstance command to evaluate the sign of an expression with $8$ variables, under simple constraints, but it takes too much time. Do ...
62 views

### Multi-objective nonlinear programming [closed]

How to use mathematica to solve multi-objective nonlinear programming. These are two objective functions: \begin{array}{l} M{\rm{ = }}{{\rm{C}}_1}{\rm{ - }}\sum\limits_{i = 1}^{15} {\sum\limits_{j = 1}...
57 views

### How could I know if this function is strictly decreasing in m?

I have the following function: ...
31 views

### Finding the minimum of a complicated Function

I want to find the minimum of the following function ...
56 views

50 views

### How to generate a large number of constraints for all indices ($\forall i$)

Is it possible to generate a set of constraints in the form "$\forall$". For example: \begin{align} \min\ & f\left(\sum x_i\right)\\ s.t.\ & \\ & x_i\geq 17 && \forall i=...
258 views

### How to choose the shortest route? (Vehicle routing problem)

This question is about a small instance of the classical vehicle routing problem (VRP). Someone needs to start from home and complete the three tasks of going to the post office to send a letter, ...
40 views

### How to minimize a function taking a matrix argument

I have an objective function objective which takes an arbitrary-sized matrix as input and returns a positive real scalar. I would like to minimize this function ...
101 views

### How do we use mathematica to apply my average to this example? [closed]

I have defined a set function and an average. If you need help understanding my definitions, let me know. I will do my best to explain. Question How do I use Mathematica to apply my definition of ...
18 views

### Scaling the edge length of a graph to be equal to edge weight for 3D graphs

This is a follow up to my previous post here The following is the solution provided here to set the edge length of a graph equal to the edge weights for a 2D graph posted in the previous post. The ...
15 views

### Errors giving … is not a number when Trying to minimise a function [closed]

I'm trying to minimising the following equation wrt ssq and mq ...
120 views

### Furthest point from nearby objects, packing a sphere on a region interior

Suppose I have a boundary $\partial\Omega$ of a region $\Omega\subset \mathbb{R}^3$ and within this are some compact objects $B_i\subset\Omega$. They could be points, lines, polygons, complex 3D ...
95 views

### Mathematica does not solve system of equations

I am trying to solve a system of 7 equations and 7 unknowns given a set of assuptions. I am only interested in obtaining V1 as a function of the exogenous parameters. I am using the following code: <...
52 views

### Argmax - all maximizer positions

Generally the Argmax function returns one position, where a function is maximized. Is there a easy way to obtain a list of rules for all maximizer points?
While trying to maximize the function fun[x_, a_, b_], over parameters $a$ and $b$, and plotting the resulting maxima with respect to $x$, I encountered the error ...