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
1
vote
0answers
44 views

NArgMax plotting partially wrong solution

In the following MWE, NArgMax finds the correct argmax (br1) as a function of the parameter ...
8
votes
5answers
516 views

Why does NMaximize miss this global maximum?

I am having trouble maximizing a function which appears as a curvature of a planar curve. ...
0
votes
0answers
30 views

Findminimum PrecisionGoal/AccuracyGoal error [closed]

I am doing a structural optimization utilizing the findminimum function of Mathematica. The Objective function,the compliance of a structure, is obtained as a response from Finite Element Analysis. ...
1
vote
0answers
60 views

Faster Way of Plotting a Multivariate Integral with No Closed Form and Maximized

I have a double integral that looks like this. $$J=\int_0^2\int_{-2}^2 \sin(y\cdot B_z+z\cdot B_y+\phi_y+\phi_0)\,dy\,dz$$ $\phi_y$ I am defining as different functions of y, e.g. $\phi_y=0$, $\...
0
votes
1answer
68 views

Global optimisation - Error bound on NMaximize?

Is it possible to obtain an error bound on NMaximize? e.g. convert the number returned by NMaximize into a rigorous upper bound ...
2
votes
2answers
80 views

How can I find maximum of this function?

I am trying to find $ m $ so that maximum of the function $ f(x) = |x^3 - 3 x + m |$, $ x \in [0,3] $ equal to 16. I work aroud by using the note $$\max\{a,b\} = \dfrac{a + b + |a-b|}{2}.$$ I tried <...
1
vote
0answers
27 views

setting up constrained maximization [closed]

I am trying to enter the maximization problem with constraints below: $$ \begin{aligned} & \underset{x_0, x_1}{\text{max}} & & \Big[a(C-x)+(1-a)(z-y)\Big] \\ & \text{s.t.} & & ...
4
votes
1answer
139 views
0
votes
0answers
62 views

Minimizing computation time

I'm having issues with reducing the computation time of a NMinimize function. I've tried setting the WorkingPrecision and N and ...
6
votes
2answers
107 views

Best 5 segment piecewise linear fit

I'm trying to get a piecewise linear best-fit for the closing price of one of the stocks I'm interested in. The logic seems ok, and the workflow works for a straight-line (ie 2 pts, ie 1 segment) ...
0
votes
1answer
68 views

Maximize does not work

I try to maximise a following function: ...
0
votes
0answers
38 views

how to solve a nonlinear problem with `NMinimize[…]`

I have the following code developed to balance an unbalanced square matrix using a reference matrix at t=0. ...
3
votes
0answers
22 views
4
votes
2answers
86 views

Find secondary maxima of a function

Say, I have a function f[t] defined in my notebook. I can find it's maximum value using FindMaximum. Say that it's maximum value ...
1
vote
1answer
33 views

Solving a ForAll optimization problem in Mathematica

I am trying to solve the following optimization problem in Mathematica: Minimize[{y0 + y2 m2, ForAll[x, y0+y2 x^2 >= Boole[x>0]]}, {y0,y2}] Unfortunately, ...
0
votes
0answers
20 views

Optimizing parameters that are used in NDSolve

The problem is this. We have a set of ODEs that include two or three parameters which determine the solutions one can obtain with NDSolve. The ODEs do not have analytical solutions. The question is,...
0
votes
0answers
62 views

Maximizing HeavisideTheta function [closed]

While working on 4th order trajectory optimization, I ran into an issue and I boiled down the optimization problem to me not being able to figure out maximizing a HeavisideTheta function. The problem ...
1
vote
1answer
79 views

Fletcher-Reeves Method

I'm trying to implement the Fletcher-Reeves Method, the code is: ...
1
vote
1answer
51 views

Numerical Minimization

I am trying to solve minimization problem for the simingly not too complex energy function with the following parameters ...
0
votes
0answers
23 views

Why is FindMinimum trying negative numbers when I constraint the values to be positive reals?

This is a follow up to this question: How do I tell FindMinimum to only work with positive, real numbers? Using a constraint for positive, real numbers, I have the following statement: ...
0
votes
0answers
56 views

Why can't Mathematica maximize simple trigonometric Expression?

Explain please why such simple function won't be accomplished. MaxValue[{a*Sin[x], a > 0}, x,Reals]. And how to solve this type tasks?
0
votes
1answer
36 views

NMinimize : different results when changing a little bit the constraints

I want to solve multiple equations so I thought using NMinimize. The basic idea is that if you have multiple equations with multiple variables : $$\left\{\begin{...
1
vote
2answers
85 views

Finding local minima exactly

Is there a way to either make FindMinimum do an exact computation or Minimize find also the local minima? Or other ideas to find ...
4
votes
1answer
90 views

How do I tell FindMinimum to only work with positive, real numbers?

I have a function that I'm trying to minimize. It currently works reasonably well with this: ...
1
vote
0answers
27 views

How do I get FindMinimum to give me the right answer the first time I call it?

I'm trying to minimize the Chi Square error on a complex function. The first time I run FindMinimum I get an answer which is close to the global minimum, the second time I run it, with the results ...
0
votes
0answers
30 views

Maximising the minimum of a linear combination of polynomials

I have list of finArray of 6 rational polynomials, of degrees of about 4 to 6, in around 200 variables allVars, along with a ...
0
votes
0answers
49 views

Help in modifying my code

In my code, I want to plot (Dis[t]). The problem is some functions containing in the code do not work well if there are variables in the form of symbols, such as "Sort" "NMaximize" functions. I want ...
2
votes
0answers
41 views

Display minimum distance and minimum-distance path between two points on a polyhedron

Given a genus-zero polyhedron (e.g., PolyhedronData["Dodecahedron"]) and a point $P$ anywhere on its surface, color all points on the polyhedron by the length of ...
1
vote
0answers
26 views

Alpha for Huber penalty in `Fit`

For the Fit function we can define NormFunction with Huber penalty. ...
5
votes
3answers
694 views

Use of LinearProgramming

Consider the following: ...
1
vote
0answers
63 views

Least Square with quadratic constraint [closed]

I have the following problem:For $\theta \in \mathbb{C}^{n\times1}$, $\quad$ $Y=X\theta+W$ where $W \in \mathbb{C}^{m\times1}$ is the complex additive white Gaussian noise. $X \in \mathbb{C}^{m\...
1
vote
1answer
28 views

NMinimize and Minimize give different solutions for approximate inputs?

According to the Minimize documentation, when provided with approximate inputs, Minimize invokes NMinimize. However, different ...
0
votes
0answers
30 views

Problem with NMaximize and intervals

My expression is ...
0
votes
0answers
41 views

NMinimize applied to a function which depends on a complicated code

I have a complicated code which puts out one value, which I want to minimize. Instead of copy pasting my code I present here a much simpler code which produces the same error. ...
3
votes
2answers
86 views

Maximizing the global minimum of a simple parameterized trigonometric sum

I want to maximize the minimum of a simple (Sin/Cos based) parameterized trigonometric sum over all real values of ...
0
votes
1answer
22 views

Minimize a function using the reselts from NDSolve

I get some results z1 from an equation ...
1
vote
1answer
84 views

Could anyone help me find the EXACT value?

Could anyone please help me find the EXACT value (not numerical value) of this by Mathematica or by mathematical reasoning? Thanks a lot. ...
1
vote
1answer
55 views

Minimize the equation

I solved a system of equation and get the result Sol ...
0
votes
1answer
31 views

Finding limit of a function with more than one variable using mathematica [closed]

I want to find the limit as t approaches infinity of the function u(x,t) using mathematica. Can someone please help me do this?
0
votes
1answer
33 views

How to minimize a function using vectors as input?

I'm learning Mathematica and meet a problem. Here is a simple example. x = {0, 0.5, 1} y = {a-3,b,10} yl= {b,a,5} I want to find the value of a and b when it ...
5
votes
0answers
57 views

What does the PerformanceGoal option of FindMinimum do?

FindFit and FindMinimum both have a PerformanceGoal option. It is not documented. What does ...
1
vote
2answers
59 views

Iterate Minimize on a list of functions

I have a function $f$ defined on $[-1,1]$. For a minimal example, it suffices to define f[z_]:=z^2 - 1 I need to find a list of points such that $f(z_0)= f(z_1)$,...
1
vote
0answers
19 views

Fitting Experimental Data To SRK-Type Equation of State. Minimization

I'm trying to find parameters to fit an EoS to saturation pressures to different temperatures. My experimental data are like this ...
2
votes
0answers
62 views

Maximize returns an incorrect answer with a linear function and equality constraints

I tried to optimize a linear function with equality constraints using Maximize and I noticed that it returns an infeasible solution without any warnings. The problem is this: Which I formulated in ...
0
votes
1answer
44 views

How do I find all values of mu and k such that my function is nonnegative?

I have this nasty function in terms of $\mu$, $k$, $x$, and $z$ that I want to study when it's nonnegative (part of my research project): $$ -9 \sqrt{2 \pi } k^{5/2} z (x-\mu )^4 e^{\frac{1}{2} k (...
2
votes
1answer
43 views

Evaluate NMinimize/NMaximize on a grid

I'm working on a minimization problem with moderate number of variables (~10-20). I don't need several significant digits, so I have already set my ...
2
votes
2answers
40 views

Testing Positivity of Interpolating Function

I have an interpolating function and I want to test whether it is positive definite over an interval. Will any of Mathematica's numerical optimisation functions work for this or is there a simpler ...
0
votes
0answers
97 views

Problem in solving system of equations using “Solve”

I have an equation in its normalized form as: $\frac{v(x)}{V_{cc}}=C_1\cos qx+C_2\sin qx+1+ \frac{q^2}{1-q^2}.\frac{V_R} {V_{cc}}\sin (x+\phi)$ Where $$q=\frac{1}{\omega\sqrt{LC}}$$ With the ...
2
votes
1answer
40 views

Finding local minima of this transcendental equation

I'm trying to find all the local minima of the following function, symbolically: ...
2
votes
0answers
45 views

Case insensitive variables in the Maximize function

The Maximize function behaved very weirdly when I combined variable names with lower and upper cases. I created a minimum working example for reproducibility. The ...

1
2 3 4 5
30