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

learn more… | top users | synonyms (4)

0
votes
0answers
37 views

Maximizing a 3-variable function

I want to find the maximum of the following function $$f(x,y,z) := -y^2 - 3 z^2 + xy + 2xz - 2yz + my + (m + n + t)z - nx,$$ where $m,n,t$ are indeterminate constants, subject to the constraints ...
0
votes
0answers
43 views

Solving matrix optimization

I have the following problem. Let $X_1, X_2, \cdots, X_k$ are $n \times n$ Hermitian matrices (need not be positive) given. Let a $n \times n$ positive matrix $A$ is given such that $Tr(A.X_j)<0$ ...
1
vote
1answer
62 views

Simplifying Expressions for FindMinimum

I am currently trying to apply the FindMinimum function to find the lowest energy of an expression. My current expression as of now is relatively complicated. It is the summation of 48 similar terms, ...
1
vote
1answer
75 views
0
votes
0answers
32 views

Interpolating function for data with five independent variables [closed]

I have to optimize the risk reward of a financial structured product depending on several variables: the tenor (between 12 and 36 months), the type (american, european), the Knock In (KI) ...
4
votes
1answer
120 views

NMinimize fails on Mesh?

Context I want to identify the minimum of a solution of a PDE found on a mesh. Problem I do not understand why NMinimize fails on a mesh? As a test case, ...
0
votes
0answers
6 views

Can these steps be converted to a mathematical expression using equations/graph theory/Calculus/Set theory/functions/? [migrated]

Want to convert below algorithm into a mathematical model:- General points 1. Let there be a Connected Directed Graph. G = (V, E) V vertices or nodes E edges. This graph can be seen as a network ...
-1
votes
0answers
44 views

Can I get a closed form solution using Mathematica symbolically? [closed]

I am working on nonlinear equations for my research. I need to use some software to get a closed form solution of the systems of nonlinear equations. Here is just an example: If I want to get a ...
0
votes
1answer
30 views

How can I name to a saved file with the numerical values of some specific parameters? [duplicate]

I'm using some parameters to determine the elements of a list. I want to save this list with DumpSave, but I need to name it with its parameters. For example, I use the following parameters ...
0
votes
0answers
17 views

How to get rid of numerical scope error? [duplicate]

I am trying to perform a numerical maximization routine on a setdelayed function which involves a numerical integral and I'm getting an error message. The evaluation continues and gives the right ...
2
votes
0answers
80 views

Appropriate method for a Non-linear Optimisation Problem, With Linear Constraints,

I have a small non-linear, chess related, program with linear constraints and an objective function obtained from a polynomial probability generating function including some decision variables . At ...
8
votes
2answers
131 views

Efficient solution for a discrete assignment problem with pairwise costs

Let's consider a simple graph with N vertices, and a corresponding set of N items. The goal of the problem is to assign every item to a vertex on the graph so that sum of a per-edge (that is ...
3
votes
1answer
197 views

Using ParametricNDSolve and NMinimize to find accurate interplanetary trajectory arrival periapse radius

I have an interplanetary trajectory simulation that calculates the required velocity (using a Lambert solver) and escape angle for a spacecraft to travel from Earth to Mars. This model does not use a ...
2
votes
0answers
88 views

Precision and accuracy in NDSolve and NMinimize

I use NDSolve quite a lot and have noticed that setting values for AccuracyGoal and ...
6
votes
1answer
106 views

NMinimize Example from Wolfram Documentation Center

Here is the third example of NMinimize function from Wolfram Documentation Center at Possible Issues section. ...
6
votes
1answer
105 views

ParametricNDSolve[ ] and NMinimize[ ] in Combination

I have the following code that is used to simulate a spacecraft orbiting Mars, and uses ParametricNDSolve to vary the spacecraft's initial conditions using a parameter value ...
0
votes
1answer
45 views

Finding function by constraints

I have the following coefficient finding problem: f[x] := a * Log[b*x + c] + d Constraints: f[0] = 1 f[80] = 0.5 I want to find the coefficients of f that ...
5
votes
1answer
245 views

Need help with the Lagrange multiplier method

Well I am new to Mathematica and got really stuck solving this problem. In class, I was ask to use the Lagrange multiplier method to find the maximum and minimum value of $f(x,y) = x^2+y^2$ which ...
1
vote
0answers
32 views

Method used by NMaximize with a binary linear problem

I'm using Mathematica 7's NMaximize to solve a linear programming problem with thousands of 0/1 integer variables, thousands of linear constraints and a linear target. I suppose I could use ...
0
votes
0answers
33 views

Optimization over 6 vectors

Suppose I have an expression which depends on 6 unit vectors (3 dimensional). Hence, I need to optimize over 12 parameters (every vector contains 3 parameters, but one we can reduce by considering ...
0
votes
0answers
34 views

Numerical minimization hangs at some steps

Let me briefly explain what I observe and cannot really explain by myself. I occasionally use NMinimize to find optimal parameter sets and sometimes it happens that ...
6
votes
0answers
131 views

NMinimize with NIntegrate (crash in symbolic evaluation, memory leak)

This is a "common" problem from what I've seen, but with a different spin. I have a function I use often that finds a fit of an expression to another expression with some free parameters (e.g. for ...
0
votes
0answers
41 views

Calculations using imported .csv files

How do I co calculations after I have imported two files (in my case .csv files). I want to take the average of the columns/ rows and then display them to the user in a new chart. Example A1 of one ...
0
votes
0answers
45 views

L1-Norm Minimization

I need the function for the L1-Norm Minimization problem formulated here https://reference.wolfram.com/language/tutorial/ConstrainedOptimizationLinearProgramming.html#261990371 ...
4
votes
1answer
101 views

Question about FindMaximum

I must advise you that I am an almost total novice in mathematica.. However here is my very simple question.. I know the command FindMaximum[{f},{x}] to find the maximum point and maximum value of a ...
2
votes
1answer
52 views

Transforming an Optimization Problem into a multi-vector Optimization Problem

I am sitting on an MultiAgent optimization problem trying to solve for a quadruple of variables {e,l,b,c} In a single agent (...
7
votes
1answer
127 views

Finding the least positive integer satisfying a quantified statement

I'm studying the convergence of the sequence of functions $f_n:[0,1]\subset\mathbb{R}\to\mathbb{R}$ defined by $$f_n(x)=n^2x(1-x^2)^n$$ for $n\in\mathbb{N}$. These functions converge pointwise to the ...
1
vote
0answers
40 views

reset the value of a variable [closed]

Folks, I have a problem in populating a matrix without overriding the values. After performing computations for various values for j, I want to store these values in following matrix. Here is the ...
1
vote
0answers
54 views

Finding the global extrema of a surface? [closed]

I am trying to figure out how to find the global extrema of the function surface shown below and can't seem to get answers that make any sense. I am using the FindMinimum and FindMaximum functions ...
0
votes
0answers
66 views

How to solve two point boundary value problem numerically

I'm new to mathematica and I'm interested in solving the following optimal control problem: $$ \min_{\rho_1,\rho2}\int_0^Te^{-\beta t}(Nd(t)+\rho_2y_2(\rho_2k_2-C_2)+\rho_1y_1(\rho_1k_1-C_1))dt $$ ...
0
votes
0answers
104 views

How to optimize a cost function which involve the solution of a ODE system using the NMinmize?

I have created a cost function, the value of which depends on the solution of a ODE (ordinary differential equation). The parameters of the ODE are not determined, and my goal is to determine them ...
0
votes
0answers
54 views

Finding values of a variable fitting a function and minimizing a list of expressions

I am trying to implement bootstrapping (https://en.wikipedia.org/wiki/Bootstrapping_(finance)) of CDS curve. To implement it I am trying to minimize a series of expressions so that each expression is ...
0
votes
0answers
79 views

Fun/Frustration With Coding Coding Theory

I have code following from this post: http://math.stackexchange.com/questions/1317722/fun-frustration-with-coding-coding-theory I think I am done with the code, but now I face a single problem. The ...
-1
votes
1answer
58 views

Find a minimum value which satisfies an equation

I have to find a minimum value of "a" which makes x=-a+b+c, y=-a+b+c^2 positive where a>1, 0 ...
1
vote
1answer
65 views

Problem in minimizing expression

I am trying to implement bootstrapping (https://en.wikipedia.org/wiki/Bootstrapping_(finance)) of CDS curve. To implement it I am trying to minimize a series of expression. The minimum value of ...
2
votes
2answers
97 views

Finding Minimium Periapse Distance Between Spacecraft and Planet

I have the following simple model that simulates a spacecraft orbiting Mars. What I'm hoping to do is be able to find the periapse radius of the spacecraft as I did below, except instead of using ...
1
vote
2answers
90 views

FindMinimum and WhenEvent

Is there any way to incorporate WhenEvent[] into the FindMinimumfunction ? I'm currently trying to minimize an interpolating function with FindMinimum (since the origional function is to cumbersome ...
2
votes
1answer
64 views

NMaximize with Nelder-Mead method fails to convergence when tolerance set too high

Recently I have been working on a optimization problem for which I use NMaximize with Nelder-Mead method. In general, I have to check a lot of systems which are built automatically. I want to skip ...
0
votes
0answers
48 views

Sharp Ratio Maximization, Closed Forms

I am trying to get a closed form for the following first order conditions (n=4): Here's the nb-File. The code is as follows: ...
0
votes
2answers
85 views
2
votes
1answer
66 views

Performance of a bootstrap - time of computation not linear with number of iterations

I'm doing a bootstrap based on this thread with the following code (file.txt here): ...
0
votes
0answers
42 views

Recursive method for the SR1 correction

I am looking to program a recursive formula for implementing the Symmetric rank-one correction. I am not sure exactly where my program fails. Every value is correct except the value for ...
0
votes
1answer
85 views

Both FindMinimum and NMinimize have trouble

I'm trying to minimize a function I wrote, in a not entirely elegant (but functional) way. As a side note, if you have advice on how to write this in a smarter way, that's also welcome. In any case, ...
3
votes
0answers
69 views

Symbolically Minimizing a Max function

I'm having a tough time with seemingly simple symbolic Minimization/Maximization in Mathematica. I would like to use the Maximize function to work on some unknown random variables and so use min/max ...
1
vote
2answers
73 views

Maximise a function over one parameter that is continuous, and one that is discrete

I have a function that I would like to maximise with respect to two parameters: one continuous, another which is discrete. A simple example of this might be the following: ...
2
votes
1answer
59 views

i need a swap mutation code (genetic algorithm) in Mathematica?

I'm working on GA coding to optimize the locators position in fixturing system to minimize the error in precision manufacturing.I need a code for mutation (genetic algorithm) in Mathematica. Here, I ...
0
votes
1answer
138 views

Minimizing using indices, error: Part::pkspec1: The expression cannot be used as a part specification

I want to use Minimize where the variables to minimize are indices pointing into an array. Here a MWE that hopefully shows what my problem is. ...
4
votes
0answers
73 views

How to perform Bayesian optimization with Mathematica?

Does Mathematica have any Bayesian optimization methods for learning hyper-parameters? Practical Bayesian Optimization of Machine Learning Algorithms Jasper Snoek, Hugo Larochelle and Ryan P. ...
1
vote
0answers
48 views

How can I calculate Lagrange multiplier and the critical points with Mathematica? [closed]

I have constraints and a function I want to know the critic points but is there a way that I can compute this method so that I can see results faster
1
vote
3answers
125 views

Minimize method is not giving minimum. Why?

I was doing an optimization but facing a problem getting what exactly Minimize function do. I run the following code: ...