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
0
votes
1answer
41 views

Plotting NMinimize function

I want to plot the following NMinimize function: I used GGPlot = Plot[GG[DM], {DM, 0.02, 10}, PlotRange -> All] But I get nothing! My code is ...
0
votes
1answer
53 views

Issue with NMaxValue Constrained to an ImplicitRegion

I am trying to find the maximum (and minimum) value of an interpolated function constrained to an ImplictRegion with a (partly) curved boundary. I have followed the documentation carefully and tried ...
0
votes
0answers
28 views

How to compute Max function of the following form:

I knew that in Mathematica, the "Max" function yields the largest element of any of the lists, for example, Max[x,y,z,....]. How do I implement this function with Mathematica? and what does this ...
1
vote
0answers
38 views

Minimize with constraints on parameters does not stop running [closed]

I have the following simple optimization problem, but when I tried to put the values into Mathmatica, it does not stop running for hours. Actual problem is: $\qquad min_{x1, x2, x3} : a1\,x1 + a2\,...
0
votes
0answers
38 views

Optimizing a nested function in mathematica getting stuck at local maximum and giving wrong answer

I am trying to maximize this function over the value "p": ...
2
votes
1answer
35 views

Nested maximum function not working

I am trying to maximize a function which is itself a maximized function. For example, see the below. Can someone explain this error: ...
2
votes
0answers
38 views

ArgMax problem with Piecewise function

I'm having an issue with finding the maximizer of a very simple piecewise function. ...
1
vote
1answer
41 views

How to solve an optimization problem with multiple constraints? [closed]

I would like to minimize a function in four variables with respect to multiple constraints. $a+b+c+d\leq 1$ and $a, b, c, d \geq 0$, i.e. minimizing on the unit simplex in 4D. How do I incorporate ...
2
votes
1answer
54 views

Maximizing Output from ParametricNDSolve [closed]

Given a system of differential equations that are dependent on two parameters, such as the system below (the equation below is not that important, I am interested in a general procedure given a ...
2
votes
0answers
55 views

Multiple agents routing optimisation problem

We are given an array of nodes of the form {{xcoordinate,ycoordinate}, weight, "name"}. This represents nodes on a 2D euclidean coordinate system. Further, we are given a number n which is the number ...
6
votes
3answers
460 views

How to make the computation of a minimum efficient?

I have a $80\times 80$ matrix $A$ and a vector $P$ and I want to compute efficiently the following minimum $$ \min\{n\in \Bbb N :\|A^nP\|_\infty < 1\} $$ Then I defined my matrix and vector in ...
0
votes
1answer
71 views

Find (numerically) point where derivative is infinite

I have a function that is shown in the image, below. The point I am interested in extracting (numeric fine) is, in this case, 200. This appears to be the point at which one derivative is infinite. It ...
8
votes
1answer
289 views

Maximizing over a 1D region

Why does the following not compute? MaxValue[-y^2, y ∈ Interval[{-1, 1}]] I expect it to compute the maximum value of the funtion over the interval from -1 to 1 ...
1
vote
1answer
41 views

NDSolve with Events that reevaluate with different Discrete Variables

I have the following problem: I have a set of ODEs and some discrete variables which I can solve successfully. Now I want mathematica to check at every $0.1 \,t$ time step, wether it would increase ...
3
votes
2answers
196 views

Levenberg-Marquardt method for fitting

I have a model function: ...
4
votes
1answer
63 views

Using preconditioners efficiently

I am trying to numerically solve a linear system of equations of the form A x = a where A is really ill-conditioned and ...
6
votes
5answers
179 views

Maximizing efficiency of a power-tower (tetration) calculation

I'm working on a power tower $\displaystyle z^{z^{.^{.^{.}}}}$ and wish to maximize the efficiency of my algorithm to compute a cycle map. This is a color-coded diagram of the cycle period of each ...
0
votes
0answers
57 views

NDSolve with Functions Depending on time and time dependent Functions

EDIT: following the advice of using Raw Input Form, the equations have the following form ...
4
votes
1answer
55 views

Calculating the volume of a paraboloidal region

I have an inequality that defines a paraboloid. I would like to calculate the volume of the intersection of this paraboloid and a cylinder of radius R. ...
0
votes
2answers
94 views

Is it possible to minimize this function in Mathematica/wolframAlpha?

I want to minimize this function $f(x, y)=\left(n_{1}\right)\left(1-x(1-x)^{k_{1}}(1-y)^{k_{2}}\right)^{T}+\left(n_{2}\right)\left(1-y(1-x)^{k_{1}}(1-y)^{k_{2}}\right)^{T}$ Though it is a function in ...
7
votes
6answers
402 views

Finding a center and radius that minimizes total distance

I have a list of $d$-dimensional data points $x_i$, and I want to find a $d$-ball which minimizes the sum of the squares of distances between the surface of the ball and the points. In other words, I’...
0
votes
3answers
101 views

Find the minimum of an expression with multiple constraints

I need help to find a value for "d" which the expr has the minimum value at that "d" value. Constraints are added to the code ...
0
votes
3answers
71 views

Finding the maxima of a function of two variables

I am trying to understand how Mathematica finds the local maxima of a function of two variables, but I am a bit lost here. For example, consider: ...
1
vote
1answer
65 views

Minimization problem!

Im probably not seeing the obvious question but i want to minimize an expression like: Func[A_,B_,θ_,θ1_]:= A Cos[θ-θ1] + B Sin[θ]^2 where i do to minimize in ...
2
votes
2answers
100 views

How can I find the coefficients which minimize my non elementary integral?

I have the integral which I express in Mathematica code as: Integrate[ (-((x^2 (c + x^2 (b + a x^2)))/(m + x^2 (v + d x^2))) + Abs[x])^2, {x, -1, 1}] I ...
0
votes
2answers
96 views

Finding the global maximum of a function

I've the following code: ...
1
vote
1answer
52 views

How to interpolate a set of points with given local extrema?

I have a set of points on the 0xy plane: say (-3,0), (-2,4), (-1,0), (1,2), (3,0), (5,1), (6,0), (8,-2), (10,0) I would like to use software, like Mathematica, ...
2
votes
2answers
42 views

Maximise a function over real and complex parameters [closed]

I have the function f[b_x_] := Exp[-I b] Sin[I x], where $x$ is real and $b$ is complex. I want to maximise the function $f$ over $x$ and $b$, but it is ...
1
vote
2answers
62 views

Plotting only one piece of an implicit 3d surface (the one value of the order parameter wich minimizes some free energy function)

I would like to plot a graphic of spontaneous magnetization vs T vs h for a Curie Weiss Model. The equation for stationary ...
1
vote
1answer
54 views

Question for function FindMaximum

I need some advice on using the function FindMaximum as follows. I find the function y(x) from a differential equation as below, and then for each c and each xMax I have different solutions y(x) and ...
0
votes
0answers
45 views

Prime Number Generator using Sieve of Eratosthenes

I was trying to apply the Sieve of Eratosthenes to find the prime numbers within the range of 100. I understand that Mathematica has a built in procedure to find prime numbers, but I was trying to ...
2
votes
0answers
26 views

NMinimize : Finding which method was used [duplicate]

Is it possible to find out which method Mathematica used when using the NMinimize method? Ie, either Nelder-Mead, differential evolution, etc... Thanks.
1
vote
1answer
36 views

Problem when using NMinimize in a RecurrenceTable

I have a problem when I'm trying to use NMinimize in my RecurrenceTable, like in this example : ...
0
votes
1answer
42 views

Position of maximum element in list under optimisation

For a list of several functions: functions = {a[x,y,z],b[x,y,z],c[x,y,z],d[x,y,z]}; I want to maximize the maximum value of a function of three variables. This ...
0
votes
0answers
21 views

NMaximize scrambles constraints

There have been lots of questions around regarding the issue that NMaximize/NMinimize may give results - or at least evaluate ...
2
votes
0answers
44 views

Simultaneous Peak and Background Fit

I'm not sure if this is the proper way to do this, but I have a question related to another open question of mine. In this post, I'm looking at analyzing some quantum dot UV-Vis absorbance spectra (...
3
votes
1answer
72 views

Proving the positive semidefiniteness of a 6X6 symbolic matrix

Specifically, I want to check the positive semidefiniteness of the following 6X6 symbolic matrix ...
0
votes
1answer
98 views

Maximize this function

For the following matrix $$M = \begin{pmatrix} f1[x,y,z] & f2[x,y,z]\\ g1[x,y,z] & g2[x,y,z]\\ h1[x,y,z] & h2[x,y,z] \end{pmatrix} $$ with ...
0
votes
1answer
38 views

Maximise over functions in Mathematica

Define the functions $h$, $j$, and $k$ that are each functions of 3 variables: h[x,y,z] j[x,y,z] k[x,y,z] How can I find the max of these functions? I want the ...
25
votes
2answers
881 views

Possible bug in NMaximize function?

Bug introduced in 12.0 In 12.0.0 for Microsoft Windows (64-bit) (April 6, 2019) writing: ...
0
votes
0answers
54 views

How to find, for a temp. equation, Maxmum valus of position and time?

I have to find the position x and the time t for which the temperature is a maximum. I have a function ...
1
vote
1answer
46 views

ArgMin over intervals and discrete sets

I was playing with ArgMin but I'm not sure how to use it for constrained optimization. For example, ArgMin[x^2, x] returns <...
11
votes
1answer
122 views

Minimizing expression over symmetric matrices

I'm trying to solve the following maximization problem over space of symmetric matrices A and positive definite H $$R=\max_{A\in S(R^d)}\frac{\text{tr}(HA)^2+2\text{tr}(HAHA)}{\text{tr}(AHA)}$$ So ...
0
votes
1answer
55 views

FindMinimum diverges

I just enocountered following issue, FindMinimjum explicitly diverges — final result is WORSE than initial supplied conditions. During evaluation of In[37]:= ...
0
votes
1answer
38 views

Plot global maximum point and differential equation

I have two questions: (1) I found the global maximum point of the following function ...
0
votes
0answers
34 views

Arrow key problem with mathematica 12 and bash version 5

I want to know if anyone experiences the issue with mathematica-12 with bash-5? I am using the command line interface of mathematica. Now when I do up arrow or down arrow to go to history, it does ...
0
votes
1answer
54 views

NMinimize cannot be used within RegionPlot

My version of Mathematica (11.1) apparently cannot do NMinimize within RegionPlot. It did work before (!) my last software update. Here is an example from user GioMott having the same (unanswered) ...
1
vote
2answers
43 views

Find maximum of x given a bunch of constraints [closed]

Trying to find maximum of x given that '''0<=x<=3''' and some other stuff. This works fine: Clear[x, y] FindMaximum[{x, 0<=x<=3}, x] But this does ...
2
votes
1answer
47 views

Function of Maximum and Minimum Functions of Two Functions

I try to answer this question The Maximum and Minimum Functions of Two Functions I wrote the following code ...
0
votes
0answers
41 views

Numerical maximization

I am facing a numerical maximization problem with constraints. Using Method -> {"RandomSearch", "SearchPoints" -> 3}, AccuracyGoal -> 2 often does not find ...