# Questions tagged [mathematical-optimization]

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

1,915 questions
Filter by
Sorted by
Tagged with
58 views

### Dividing a list of integers into a list of sub-lists?

Suppose we have a list of integers for arbitrary $n\in\mathbb{N}$ Range[1,n] We take the integer in the list that rounds closest to $x=1$, $x=n$, and $x=1+(n-1)/2$....
• 199
60 views

### How to plot the peak of a wavefunction depending on time

I am trying to define a function to find the spatial peak of some interpolation function of two variables (one spatial variable and one temporal variable) which is the output of ...
• 51
53 views

### How to use ConvexOptimization on a piecewise function?

I define a simple piecewise convex function, but ConvexOptimization does not take it as a valid input: ...
• 332
105 views

### How to use ConvexOptimization on a function constructed from data?

Given the following data points sampled from a convex function, how could I construct a convex function that can be minimized using ConvexOptimization? ...
• 332
1 vote
137 views

### Mathematica: How can I solve the problem "The Kernel Local has quit (exited) during the course of an evaluation"

I am using a Mac Book with Monterey and 16GB RAM for a calculation with 2 nested For loops. I am relatively new to Mathematika and still trying to learn the language properly, so I hope the problem is ...
90 views

### Solving or Minimizing the Norm of the matrix equation $M^TAM - M^TB - B^TM =C$

I am trying to solve the matrix equation $M^TAM - M^TB - B^TM=C$ where I know A, B and C. My unknown matrix is M which has the special form that all the rows and columns sum to zero. i.e. I have four ...
• 495
1 vote
63 views

### Can LinearOptimization (ex. LinearProgramming) support other methods (Ellipsoid method)?

Can LinearOptimization (ex. LinearProgramming) support methods other than "InteriorPoint", "Simplex", "RevisedSimplex"? Specifically, I need the Ellipsoid Method. Are ...
• 622
67 views

### Tips and tricks for minimization problem

I am quite new to Mathematica and would like to use it for a minimization problem. The function I like to minimize is: ...
• 19
63 views

### Formalization of one optimization problem or solution of inequalities - Part №2

Continuing the question: Formalization of one optimization problem or solution of inequalities Let's consider a more complex problem. We have two polynomial: $p_1=A_2t^2+A_1t+A_0$ $p_2=B_2t^2+B_1t+B_0$...
• 1,721
73 views

### Formalization of one optimization problem or solution of inequalities

I have polynomial: $p=A_2t^2+A_1t+A_0$ $A_0=(x^2-y^2)+xz$ $A_1=x^2+y^2+z^2+\sin(x)$ $A_2=x^4+y^3+z^2$ $x,y,z$ - parameters, moreover $z$ - the value of which varies in the range $[0,1]$. Polynomial $p$...
• 1,721
1 vote
104 views

### How to set Initial Points for optimization problems

How to set Initial Points for optimization problems in MMA? In this case,we do not need to set the range of the variable x1, x2. ...
• 1,746
212 views

### Can FindMinimum and NMinimize be so wrong?

Here is a whole block of code that computes a function at the point vx0=2.2 and returns 61.9113, which is much lower than the ...
• 1,350
1 vote
29 views

### mistake results when using SDP for large-scale matrix

Recently I am struggling with a question during my research. Using the following Wolfram Mathematica code I could create any even-order symmetric matrix (matriceNew in mathematica) whose entries is ...
• 11
30 views

...
• 11
1 vote
32 views

...
• 11
67 views

### How to create an animating torus using mathematica or python? [duplicate]

I want to create this animating torus using mathematica or python. If anyone knows how to make this please try to explain the steps. Thank you zo much.
70 views

### How to use FindMaxium for a list of parameters?

How to use FindMaxium for a list of parameters? In the following code, if I assign single values to z and Rth, it works fine. How do I do the same for a list? ...
• 11
75 views

### How to prevent unwanted output in NMaximize or NMinimize

I have problems with unwanted outputs of NMaximize. I tried to use the command Quiet[] and Off[] in order to turn off the warnings and unwanted outputs but no avail. You can see the NMaximize part of ...
• 2,365
85 views

### Is an analytic solution possible?

I have this problem: the parameters are T1, T2, R, Rthhot, Rthcold, and Z with feasible range >0. The variables are Rth and Rload. X and Y are functions of Rload and Rth given by the 2 equations: <...
• 11
107 views

### Min and Max of a function

I need to obtain for what $a_i$'s the function: $$a_1 \ln (\sqrt{2\pi e} s_1) + a_2 \ln (\sqrt{2\pi e} s_2),$$ has a maximum and minimum, under the constraint $a_1 + a_2 = 1$; also, $s_1, s_2 > 0$. ...
121 views

• 3,832
1 vote
49 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: ...
69 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)....
111 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 ...
• 313
1 vote
55 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 ...
• 13
24 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 <...
• 353
1 vote
90 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 ...
• 27
32 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 ...
200 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 ...
• 823
154 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 <...
• 339
26 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 ...
• 353
68 views

### FindMinimum/FindRoot failed to converge

I have a function SQ where it is also determined by sig. For b=0.1 and ...
• 339
1 vote
109 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 ...
• 17.1k
43 views

### NMinimize too slow with non-linear constraints. Help to speed it up

First, let me introduce some parameters: ...
1 vote
38 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
63 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 ...
• 6,898
75 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+\...
• 173
94 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. ...
• 2,825
1 vote
80 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 ...
72 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 ...
209 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 ...
104 views

### Solving a system of equations as part of maximizing a multivariable function

This is my code ...
• 268