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
4
votes
1answer
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 ...
1
vote
0answers
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 ...
12
votes
4answers
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: ...
0
votes
0answers
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 ...
3
votes
1answer
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, ...
2
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
31 views

Using results from Nmaximize in loop

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

For any countable totally-ordered $A$, how can mathematica show my choice function gives a unique collection of finite sets whose union is $A$?

Suppose $A=\sqrt{\mathbb{Q}}_{>0}$. We want a unique $\bigcup\limits_{i\le j}A_i$ for $i,j\in\mathbb{N}$ such that $A_i$ is finite, $A_i\subseteq A_{i+1}$, and $\lim\limits_{j\to\infty}\bigcup\...
4
votes
1answer
124 views

Any trick to solve this optimization problem?

I'm relatively new to solving optimization problems using Mathematica. I have an optimization problem but Mathematica does not seem to be able to solve it. I have tried all sorts of way to re-write it ...
2
votes
2answers
162 views

Continuous Min-Max problem

Being new to Mathematica, I tried my best to find some built-in functions or guides on how to solve the classical min-max problem $$ \min_{x} \max_{k} f(x,k,params) $$ with some additional variables $...
6
votes
2answers
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 ...
0
votes
2answers
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 ...
0
votes
1answer
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 ...
1
vote
2answers
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....
2
votes
1answer
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
6
votes
0answers
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). ...
0
votes
1answer
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 ...
0
votes
1answer
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+...
1
vote
0answers
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 ...
2
votes
1answer
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 ...
1
vote
0answers
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 ...
0
votes
3answers
77 views

How to find maxima of a numerical calculation

Suppose I have the following code: ...
2
votes
2answers
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?
1
vote
0answers
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{, ...
5
votes
0answers
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 ...
1
vote
0answers
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 ...
1
vote
0answers
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 ...
1
vote
0answers
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}...
0
votes
1answer
58 views

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

I have the following function: ...
0
votes
0answers
38 views

Finding the minimum of a complicated Function

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

Finding minimum of a function in Mathematica

I am trying to find the minimum of the following function $\frac{1}{2} \left(-\alpha ^2 \sin (\theta )-\alpha ^2 \cos (\theta )-\alpha ^2 \sin (\theta ) \tan (\theta )+\frac{4 \alpha ^3 \sin ^3(\...
0
votes
0answers
38 views

Maximization by imposing an asymptote constraint

I am trying to plot the profit curve for optimal e(or effort) with respect to c. ...
1
vote
0answers
77 views

Using Experimental`OptimizeExpression for expression optimization

I am trying to optimize the following expression (example only) expr = Normal[Series[(1 - y - 2 z)^-2, {z, 0, 3}]] whose output becomes ...
1
vote
1answer
45 views

How to optimize a function with two variables such that the constraint is satisified

I have a hollow bar with outer diameter d1 and inner diameter d2. One end of the bar is fixed and the other is subjected load. ...
0
votes
3answers
143 views

NMinimize: How to avoid solutions that do not satisfy constraints within a certain tolerance?

I just started to use Mathematica a few weeks ago. Using NMinimze, I would like to avoid solutions that do not satisfy certain constraints (although they "almost" satisfy them). Do you know ...
1
vote
0answers
64 views

Maximize taking too long

I just started to use Mathematica a few weeks ago. I am afraid there is something that does not work on my laptop because, for the following simple command, it takes too much time. Do you know if ...
0
votes
0answers
29 views

Reduce does not solve a 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 V3 as a function of the exogenous parameters. I am using the following code: <...
1
vote
1answer
73 views

How to express that at least 4 of 14 variables in linear programming are greater than 10?

A restriction condition in linear programming/non-linear programming problem (function Maximize), t1, t2,..., t14, how to express that at least 4 of the variables are greater than 10?
0
votes
0answers
129 views

Nmaximize error : The function value Indeterminate is not a number at

I have been looking on the StackExchange for solutions to my issue... but I can't find. So I am asking for a solution to the following problem: First I define some functions, the function to be ...
0
votes
1answer
29 views

How to define the judgment function of extremum points

I encountered a problem in solving the math problem in China's 2019 postgraduate entrance examination. I need to judge whether $f(x)=\left\{\begin{array}{cc} x|x|, & x \leq 0 \\ x \ln x, & x&...
3
votes
0answers
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=...
7
votes
3answers
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, ...
0
votes
1answer
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 ...
2
votes
0answers
72 views

Optimizing the edge lengths of a graph (again)

This is a follow up to my previous question posted here The code below is from the answer provided here ...
1
vote
1answer
17 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 ...

1
3 4
5
6 7
35