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
8
votes
1answer
232 views

How to compute RandomReal faster?

I have variables $E_{1},E_{3}$ that are bounded in the following way: $$ \tag 1 E_{1}>m_{1}, \quad E_{3}>m_{3}, E_{2}\equiv m-E_{1}-E_{3}>m_{2}, \\ -1 < \frac{E_{2}^{2}-m_{2}^{2}-(E_{1}^{2}...
1
vote
0answers
41 views

Plotting a user-defined function with NMaximize

I am not sure what is going on with this plotting. I see that the following code works: ...
2
votes
1answer
44 views

Constrained Optimization with Interpolating Functions

My goal is to use a gradient descent type method to maximize interpolating function1 with respect to the constraint that interpolating function2 <= 0.5. I am working with 4D data (please see below)....
0
votes
1answer
73 views

Two problems with ConjugateGradient

I am trying to solve a maximization problem for which I give you the code and try to step by step show you were it broke down. The first issue is that I have a constrained problem, which I try to ...
1
vote
1answer
46 views

Optimization problem with input variables

I've been trying to solve an optimization problem using Mathematica. I'm 100% familiar with the programme, I just practised a few tutorials available online, but they were very small and the problem ...
0
votes
0answers
23 views

How could I define a different tolerance for each constraint?

I'm minimizing a single variable subject to several different constraints of several variables (all of which are part of the set of numbers to be found). Some of they obey a hierarchy of the form <...
1
vote
1answer
74 views

optimization with multiple parameters and differential equations

There might be some relevant questions and answers, but I couldn't complete my code by myself just by reading them. Sorry that I am very new to Mathematica and my question could be a bit rough and not ...
0
votes
0answers
31 views

How to simply this maximization problem with too many variables and parameters?

I'm someone who is trying to teach himself economics. My training in math is minimal. Forgive any inexact and/or irregular notations and terminologies below. I'm trying to find out if the following ...
2
votes
2answers
180 views

Draw a (1/4) partial 3D cylinder in a quadrant

Here is a code to draw a full cylinder $\theta \in [0, 2\pi)$: Graphics3D[Cylinder[{{0, 0, 0}, {1, 0, 0}}, 1/2]] My question is that how do we draw a 1/4 of the cylinder, such that it only appears in ...
2
votes
2answers
144 views

FindMinimum::lstol

I have a function SQ[b,zQ,zh] where I want to find at which zQ it is a minimum given b and <...
0
votes
0answers
23 views

Maximize function parameter such that constraint is satisfied on entire domain

I want to find the greatest value for At such that the constraint f[At,x]<=0.5 is satisfied for every value of x. I would try ...
0
votes
0answers
63 views

FindMinimum/FindRoot failed to converge

I have a function SQ where it is also determined by sig. For b=0.1 and ...
1
vote
0answers
103 views

How to find quadrilateral with maximum area?

Let the lengths of the sides of a quadrilateral equal a,b,c,d. What is the maximum area of such quadrilaterals? Wiki says that the quadrilateral with its maximum ...
0
votes
0answers
36 views
1
vote
0answers
30 views

How to give constraints of two parameter optimization in Lagrange multiplier?

In the lagrange multiplier method, the equations are : f[x_,y_]:=x^2+y^2 g[x_,y_]:=6x+8y The range of x and y values are 0<=x<=0.9, 0<=y<=10. How can I give the mentioned range of values ...
1
vote
0answers
50 views

Computing Jacobians and Hessians directly for IPOPT optimizer

I've got a complicated expression for my constraint function $g(x)$, too complicated to let Mathematica compute the derivatives symbolically. By forcing only numeric inputs, IPOPT does (it appears) an ...
0
votes
0answers
69 views

Maximize algebraic trigonometric function

I'm trying to maximize an algebraic function containing trigonometric functions: $$\mathrm{sol}=\frac{\sin\theta \cos(\alpha +\beta)\cos(\theta+\alpha+\phi)\cos\bar{\delta}}{\cos^2\alpha\cos(\alpha+\...
0
votes
2answers
78 views

NMaximize - global maximum fail - How to?

Problem : Let x,y,z be non-negative real number whose sum is 1. Find maximum of 0.2x + 0.2y + x^2*z + y*z^2 What I did first was reducing variable. ...
1
vote
0answers
72 views

How to solve ODEs using deep learning in Mathematica [closed]

I have a number of ODEs (58) with 16 parameters and 9 variables. I want to solve the ODEs to obtain the analytical relationship between the parameters and variables. It is obviously that the ODEs ...
2
votes
0answers
64 views

Lanczos method to tridagonalize a matrix

I want to tridagonalize a sparse matrix using the Lanczos algorithm. I am working with a very large sparse matrix and I need some speed. In the following for example ...
4
votes
1answer
177 views

Issue with ConvexOptimization over Matrices with Mathematica 12.2

With Mathematica 12.2, ConvexOptimization was introduced, which, as its name suggests, can solve arbitrary convex optimization problems over matrices [Language ...
27
votes
1answer
696 views

Efficient multidimensional optimization while constraining some coordinates

I have a function f[x] with a high-dimensional vector input and a scalar output. I am looking to minimize this function while constraining some of the components of ...
0
votes
0answers
45 views

Multiple layered FindMinimum

I have a function SQ[b, zQ, zh] where I can find at which zQ it is a minimum, b=0.1 and <...
0
votes
0answers
44 views

Finding minimum in a list of lists

Imagine I have the following list {{0, {2,3}}, {-1, {5,3}}, {2, {2,6}}, {5, {5,0}}, {0, {1,1}}, {-2, {10,2}}, {3, {4,2}}}; I want to pick the element in the list ...
1
vote
1answer
101 views

Finding the smallest bounding simplex [closed]

I would like to find the subset of points from a set of d-dimensional points that defines the smallest bounding simplex around a given point. For example, given a set of 3-dimensional points S1 and ...
0
votes
1answer
126 views

Equation of motion through the Lagrangian with Lagrange multipliers

I ask for advice, I'm a little confused. I have such a Lagrangian. $L=\frac{1}{2}m(\dot{x}^2+\dot{y}^2)-\lambda(2x^2+3y^2-1^2)$ Here $\lambda(2x^2+3y^2-1^2)$ is the constraint on the phase variables. ...
1
vote
2answers
101 views

NMinimize incorrectly says "The problem is unbounded"

I am solving some quadratic optimization problems in Mathematica 12.2 using NMinimize. Mathematica incorrectly gives the error ...
0
votes
2answers
188 views
2
votes
3answers
192 views

Finding the Global Minimum

Consider the function ...
-1
votes
1answer
62 views

Trying to solve a basic Lagrangian optimisation problem

New to Mathematica, trying to solve a simple economics problem but having troubles with using Solve and Eliminate. The question: Now suppose that this agent makes two choices, expressed by x and y ...
0
votes
1answer
53 views
0
votes
0answers
56 views

NMaximize computes wrong value

This question is a continuation of NIntegrate with a complicated function over the 4-sphere . Now I define a certain new function called "improvement" via: ...
7
votes
1answer
166 views

Rectangle packing, fixed sizes

I have rectangles of a given size to fit into a larger rectangle of a fixed size, with a specified gap between the packed rectangles. I would like to write some code that optimises the number of ...
2
votes
1answer
62 views

Parametric Optimization In Mathematica

I want to solve the following problem: $$ \max_q \dfrac{q}{a}\left[ (-\log(1-q))^{-a} - (-\log(q))^{-a} \right] $$ subject to $1\geq q \geq 0$ for each $a\neq 0$. Here is the code I used: ...
2
votes
0answers
104 views

Dense packing of disks with different radii

Let's consider a disk ($D_{1}$) whose center position is randomly generated, but the radius is fixed at $r_{1}$. A second disk ($D_{2}$) of fixed radius $r_{2}$ (with $r_{2} < r_{1}$) is randomly ...
2
votes
1answer
70 views

Minimizing functional using FindMinimum

Suppose you are given some functional $S$, (with some 'Lagrangian' $L$) $$S[f]=\int_{t_i}^{t_f}L[f(t),f'(t)]dt$$ and you want to find the function $f$ that minimizes it, subject to some boundary ...
3
votes
1answer
64 views

Finding convex envelope

I need to find largest $a$ such that $1/(ax+1)\ge g(x)$ for all $x$ in $[0,0.5]$. Both functions are convex, and $f$ is implicitly defined below. What is a good way to approach this in Mathematica? <...
0
votes
0answers
40 views

NMinimize with elimination returns strange results

I have a parameter vectors pars, par1, and a matrix data1 together with a vector result <...
0
votes
1answer
39 views

NMinimize extremely slow for simple, non-oscillatory function on an interval

The minimum of $f(x) = -(x+1/2 \sqrt{1-x})$ for $x$ between $0$ and $1$ occurs at $x=15/16$ with $f(15/16)=-17/16$. This is a function that Mathematica evaluates quickly, and I have plotted the ...
1
vote
0answers
75 views

Fail to inverse the Piecewise function embedded in a NDSolveValue

I am trying to estimate a function consisting of a Piecewise function that included in a FEM solver. I firstly developed my mesh for the FEM model based on @Tim Laska's work. The code is shown as <...
0
votes
1answer
48 views

Finding lower and upper limits of a function of four variables [closed]

Is it possible to tell Mathematica to find the lower and upper limits of the following function ...
0
votes
0answers
74 views

How to prove the following optimization result from Mathematica?

Currently, I am working on a decision problem in Telecommunication. This problem is reformulated under a form of Optimization problem that is: $$\begin{gathered} {\text{Minimize}}\,\,\,A \hfill \\ ...
0
votes
1answer
68 views

Nonlinear Model Fitting to Numerical Data with automatic elimination

I have an experimental data set {f,x,y,z} as {{300., 2., 4., 6.}, {500., 0., 4., 25.}, {6600., 1., 15., 9.}, {100., 5., 0., 2.}, {1100., 10., 8., 1.}, {1300., 7., 8., 18.}, {300., 23., 5., 0.}, {400....
1
vote
0answers
32 views

some details of Differential Evolution

I use NMinimze Function with method Differential Evolution method, to get the optimal solution I don't give any parameters for this method, I accept the default values that mathematica gives as ...
1
vote
1answer
44 views

Increment FindMinimum range

I have a function SQ[b,zQ,zh] where I want to find at which zQ it is a minimum. The parameters are ...
0
votes
2answers
77 views

Constricting variables in NMinimize to binary (0,1) value

I am trying to optimize a large function with 1024 input variables using NMinimize. The caveat is, that the function should only be called with each of the variables as a binary value (0 or 1). The ...
2
votes
1answer
29 views
0
votes
0answers
73 views

Implementing an optimization algorithm in WL

I am trying to implement the Jaya optimization algorithm (Jaya). This is a flowchart from the Author 's webpage showing the details of the Algorithm. Note that there is a typo in the equation in the ...

1
2 3 4 5
36