# Questions tagged [mathematical-optimization]

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

1,721 questions
Filter by
Sorted by
Tagged with
80 views

### Weird behaviour of FindMinimum

On Mathematica 12.1, I tried to do FindMinimum[Sin[x] + 1, {x, 55.00000000000001, 54, 56}, Method -> "PrincipalAxis"] It gives the output ...
34 views

### Minimize doesn't work with more parameters

In the code I wrote there is a ParametricNDSolve with four parameters. I want to minimize an error function with Minimize. If I consider ParametricNDSolve with just one parameter everything works, and ...
455 views

### Finding the largest disk within a convex region using Region primitives

This question asks to find the largest circle within a convex polygon, specifically this one: ...
41 views

### How do I extract the minima from a list of NMinimize outputs in a smart way?

I am trying to find the absolute minimum of a potential surface on the x-y plane as a function of a third parameter p which changes the shape of this surface. In other words: at p=1, I want the ...
98 views

### Issue while evaluating Mathematica expressions from Python [closed]

This is a follow up to my question posted here I am trying to run the code posted here as an answer in the above-mentioned link here from Python I tried, ...
85 views

### Smoothen the result of FindRoot

I have a set of code for which it involves finding the corresponding c for each a (although I will give a value of ...
52 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 ...
31 views

### Using results from Nmaximize in loop

I try to Append the vector S by z+x whereby z and ...
34 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 ...
78 views

236 views

### 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 ...
48 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 ...
107 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 ...
104 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....
69 views

### Generate constraints that ensure positive definiteness

What is a good way to generate algebraic constraints that ensure matrix be positive definite? Ideally, I'd be able to do something like below ...
36 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 ...
49 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 ...
29 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 ...
145 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). ...
45 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 ...
52 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+...
45 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 ...
80 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 ...
36 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 ...
77 views

### How to find maxima of a numerical calculation

Suppose I have the following code: ...
70 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?
43 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{, ...
63 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 ...
37 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 ...
66 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 ...
107 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}...
58 views

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

I have the following function: ...
38 views

### Finding the minimum of a complicated Function

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

58 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=...
319 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, ...
108 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 ...