# Questions tagged [mathematical-optimization]

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

1,335 questions
Filter by
Sorted by
Tagged with
73 views

### 3D-plot of a maximization of a definite integral

I'm applying the answer (If method) suggested by 'ThatGravityGuy' in this post in a more complicated case. Consider my objective function (pardon its formidable ...
71 views

### Efficient Mathematica Code for List Problem

Say we are given $f(m,n)=m \pm 2n + (-1)^n$ where $m>0, n>0$, $m$ as well as $n$ are integers. The problem is to generate a list of all the integers that will not be found in the list of values ...
62 views

114 views

### Findminimum of Integral

I am trying to find the value of $u$ that minimizes the following expression: ...
86 views

96 views

### Given a function $f(t,s)$, compute $\max_{t_2\in [0,1]}\min_{t_1\in [0,1]} |f(t_1,s_1)-f(t_2,s_2)|$

Given a continuous and bounded function $f(t,s)$, $t,s\in[0,1]$, I would like to compute $$\max_{t_2\in [0,1]}\min_{t_1\in [0,1]} |f(t_1,s_1)-f(t_2,s_2)|,$$ for each numeric values of $s_1$ and $s_2$....
87 views

### Simultaneous Equations and Optimization

I have the following simultaneous equations. $W=G[V](s+80)+(1-G[V])114$ $V=(1-F[W])(90-s)$ where $F$ and $G$ are cumulative distribution functions of $x$ and $y$. The variables of $x$ and $y$ are ...
58 views

### NMaximize selects duplicate inputs and a problem with EvaluationMonitor

The aim of the following is to maximize 'penalty' and monitor it for convergence during the process: ...
37 views

### Error Training FeedForward Neural Network With Various Type of Variables

I built the following FeedForward NN ...
41 views

### Non-trivial feasible solution to unbounded linear programming problem

I have a linear programming problem that I know is either unbounded or the only feasible solution is the 0 vector (depending on input). In fact, it isn't strictly a linear programming problem since I ...
61 views

### ArgMin and NArgMin gives different result

Im doing the same problem with ArgMin and NArgMin, however NArgMin messes up the order of the solution. Given function: ...
95 views

### NonlinearModelFit returning imaginary numbers after fitting real data

I am getting problems when I try to use NonlinearModelFit to fit a squareroot-like function to a set of real data points. Here is the function: \begin{equation} \...
156 views

### NMaximize not always returning solution

This question is related to a previous question and answer here: NMinimize or NMaximize for a dynamic problem but tackles a different problem. I am trying to solve a simple linear quadratic ...
45 views

### Why are optimization variables exceeding their allowed regions?

In the optimization of a function, shown below, why are the variables xi, yi not adhering to their specified allowed regions {variable, 0, 5}? ...
81 views

### How to pass lists as arguments in NMinimize or FindMinimum?

The following code runs in Mathematica 12. But, I have two problems that I would like to solve: (1) How to pass a list as an argument to the function g in such a way that it can be used seamlessly ...
79 views

### An optimization problem over two variables

I have the function fun[x_,y_, t_] = Cos[x] + Exp[I y] Sin[x] Sin[t]; such that $0\le {\rm x}\le \pi$, $0\le {\rm y}\le 2\pi$, and $0\le {\rm t} \le 10$. I compute ...
31 views

### Define a function when given a graph with points (0,3),(2,5),(10,4),(6,2) [closed]

Define a function when you are given a graph with points (0,3),(2,5),(10,4),(6,2)
34 views

### RegionPlot with FindMaximum

I don't understand why each time I'm launching this computation Mathematica buggs and I get a message from Windows that the Kernel stopped working... I'm trying to get a map of where the value of ...
84 views

### Finding extremes in discrete data by the fastest code

everybody! I'm new and that's my first post. I have such a problem: need to extract from a matrix (with dimensions n x 2) such points which have second coordinate smaller than -500 or higher than 500....
33 views

### Constraints When Using NMinimize

I want to put in constraints like z.x1 >=1, z.x2 >= 1 where z, x1, x2 are vectors, but I do not want to list them out. ...
35 views

### Plotting results of NMinimize with respect to a parameter

I have some predefined function F[x], where x can be a 2D vector. I am doing the following: ...
96 views

### Minimum path on a rectangular prism

First of all, this is a fun question that I have seen from here. We have a rectangular prism with dimension $30\times12\times12$ cubic inches. Assume that there is an ant at the blue point 1 inch ...
72 views

### Parametric Find Maximum

I'd like to plot the maximum of a curve in function of a parameter. Meaning I looking for maxima that depend on a parameter. Here is what I tried to do but FindMaximum is not parametric, so it did ...
63 views

### How to disable symbolic preprocessing in NMinimize without performance loss?

I want to find a global minimum of a function which is defined only numerically and cannot be evaluated with symbolic arguments. For example, this could be a minimum of a compiled function. ...
94 views

### 3D-Plot optimization results for varying parameter values

Before starting, FYI: This is a question related to 3D Plot the result of local Minimize with varying parameter values Consider my objective function, $objF$: ...
106 views

### Kuhn-Tucker Conditions Take Forever

I am trying to solve a Kuhn-Tucker constrained maximization problem. The variables of interest are d1,d2,dr and i. The other symbols are parameters which I have several restrictions for. It's an ...
51 views

### Nminimize seems not work

I have to adjust a set of experimental data to a relatively complex nonlinear model. For this example I do a simulation of the data with a simplified function: ...
28 views

### Minimize not working for general case

I'm trying to perform a minimization for an arbitrary natural number. If I enter a specific number, Mathematica performs the correct minimization. Am I specifying k ...
105 views

### NMinimize or NMaximize for a dynamic problem

I am trying to solve a relatively simple quadratic discrete time dynamic problem using NMinimize. My code works for short time horizons (T<15) but for T longer, it ends up taking minutes and for T>=...
81 views

### Plot maximum value of a function of three variables

Given a function f[\[Theta]_, \[Phi]_, t_] given by ...
52 views

### What's wrong with my NMinimize code with the definite constraints?

I have a problem with my NMinimize code, the answer based on the paper is Mu1 = 8 and Mu2 = 19,34 that's the optimal Mu1 and Mu2. But my answer is Mu1 = 5,17 and Mu2 = 17,17. The paper said "adopt the ...
45 views

### Maximizing an integral/Solving the associated Euler-Lagrange equation

Case 1 I have the following integral which I need to numerically maximize. Here $v = v(u)$. $$V = \int_{u_l}^{u_r} du\sqrt{\frac{4}{(1+uv)^2} \frac{(1-uv)^2}{(1+uv)^2}\frac{dv}{du}}$$ The ...
I have an optimization problem where there are $n$ activities and I want to find an optimal schedule of those activities. The schedule is specified as $S=(\mathbf{t},p)$ where: \$\mathbf{t}=\left(t_{...