# Tagged Questions

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

141 views

### Locally Weighted Linear Regression

I am following the online Stanford Course in Machine Learning and I am trying to implement the algorithms on the fly in Mathematica. Currently, I have issues with minimizing the Locally Weighted ...
34 views

### How to make FindMiniumum work with delayed function and NIntegrate [duplicate]

I can plot my function penalty[v] just fine, but FindMinimum doesn't work, it just complains non-numerical values from ...
62 views

### Finding a maximum of a Bézier function

Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients: ...
24 views

### Question about finding the minimum for self-defined function

My self-defined function is too complicated to paste here, and it works well with numerical values assigned. Basically, I have something like this , which contains 12 parameters. With numerical values,...
123 views

### Solve a certain optimization problem [closed]

I am new user of Mathematica. I want to solve an optimization problem. W = (n (X-Y-Z) p / Z q)^(1/a) where a > 0 I ...
148 views

### Using StepMonitor/EvaluationMonitor with DifferentialEvolution in NMinimize

My question about tracking the progress of a minimisation/fitting process is two-fold: 1. The first part of my question can be considered a slight duplicate/follow-up of this question. There the OP ...
154 views

### Using Minuit2 to minimize a Mathematica function

FindMinimum is great, but sometimes it is difficult to get an idea of the uncertainties and intermediate evaluation diagnostics. How to define a function in ...
164 views

### FindMinimum doesn't increase step size when necessary

I've spent much time finding a minimal example demonstrating this problem with FindMinimum. Normally one faces this problem when fitting very large and complicated ...
21 views

...
56 views

### ShortestTour Problem with Constraints [closed]

I can solve a travelling salesman problem with FindShortestTour[], but couldn't find any function to solve a shorest tour problem with additional constraints like cost, fuel capacity etc. How cam I ...
32 views

### Problem with ParametricNDSolve and FindMaximum [closed]

I have a system 4 coupled differential equations: ...
54 views

### Solving 4 coupled differential equation and minimizing the solution

I have a system of $4$ coupled differential equations. ...
114 views

### Find coordinate {x, y, z} where two functions are minimal

I am trying to find a point in a ListPointPlot where the total RegionDistance is minimal AND the total differences of the <...
59 views

### Maximum value of a function using loops

I have a function ab+bc+a/c, where a,b and c ranges from 1 to 5.I have to get an output of maximum value of this function and the values of a,b and c which give that maximum value. Is it possible to ...
85 views

### Optimization of the solution to an ODE

Apologies if this is obvious -- I'm very new to Mathematica. I'm trying to minimize the solution to an ODE with respect to a variable. The following code generates the solution to the ODE, ...
55 views

### Minimize: which algorithm is in use?

How can I know which algorithm has been used by Minimize to solve a given problem? Can I force Minimize to use a specific ...
48 views

### Finding parameters with NMinimize doesn't do any steps

To find the best fit for an SVM, I have to constantly re-train my classifier with different parameters based on the result of the test set. I created a helper function which trains the SVM with the ...
68 views

39 views

### NMinimize to Optimize Parameters for Quarter Car Model

I am very new to Mathematica and am trying to simulate a mountain bike suspension by using a quarter-car model and I have input a displacement vs time road profile for two bumps for the excitation. ...
103 views

### Absolute minimum of a function

I would like to ask for some recomendations in order to get a faster result of a function evaluation to get the absolute minimum. In my desperate moments I have written the following code to get the ...
39 views

### How do I Maximize over a Cuboid region?

So, I want to, say, find a maximum value of $|x_1x_3+x_1x_4+x_2x_3-x_2x_4|$ in a unit cube in 4D; how do I do that? I've tried ...
94 views

### Find extremal values while plotting

I have a parametric function {x[t],y[t]}. I then do ...
44 views

### From “NMinimize::nosat: Obtained solution does not satisfy the following constraints within Tolerance”, can prove something?

I got a very very complicated function G[r1,r2,F1,F2] to minimize. It has four variables, r1,r2,F1,F2. When I introduce the ...
45 views

### How to set step size in FindMinimum?

My initial guess is very close to the solution. So I want step size is to be very small. Is there anyway to control the step size in the findminimum function?
44 views

### How to solve a constrained minimization problem?

I unsuccessfully tried ClearAll; Minimize[x^(8/5) + y^(8/5) + z^(8/5), x*y*z + x^2 + y^2 + z^2 == 4, {x, y, z}] No output during few hours. I am interested in ...
59 views

### “PostProcess” and “Tolerance” in DifferentialEvolution? [closed]

What is "postprocess" option in DifferentialEvolution method (for instance when using ...
55 views

### Step Monitor option in DifferentialEvolution

Using the "Step Monitor" option what exactly do I read? Does it show me the "best solution" for each population? Or does it show me each search point in the population? Also is there an integrated "...
177 views

Define: ...
244 views

### How to describe the convex hull of a set of points as an implicit region for optimization?

Last edit: 2016-05-03 A.G.'s answer was the one helped me the most, see explanation at the end of this question. Original question In Mathematica you can create out of a set of points in 2D and 3D ...
36 views

### Minimize a function containing a file exportation

I have the following problem: ...
79 views

### Problems with NMaximize [duplicate]

The Objective function I would like to Maximize takes less than a second to evaluate. There are several packages needed to evaluate it, so I'm not showing it here. ...
41 views

### Time limit NMaximize [closed]

Is it possible to time limit NMaximize? It is taking so long to evaluate my minimum, that I would like to see if it is doing what I expect it to do. So I was thinking of time limiting it in order to ...
63 views

### Minimize with Interval restriction

If for instance I have a problem of this sort: ...
37 views

### Is it possible to get the error estimates of predicted values computed by FindMinimum using the Levenberg Marquardt method?

I use the LevenbergMarquardt method of the FindMinimum function to minimize a residual function (mathematical-optimization). This residual function is computed from experimental data and the solution ...
47 views

### Check if interpolated function passes through a specified region

Is there an efficient way to check if a curve that was obtained as an Interpolating Function (from solving differential equations numerically) passes through a given region? I am solving for two ...
77 views

### Pareto optimal fronts using internal function?

Reading this question: How do I estimate the Pareto front in my multiobjective optimization problem? I found @Daniel Lichtbau's interesting answer. Yet I don't know how such an "internal function" ...
128 views

### Optimize a parametric matrix to get a lowest possible eigenvalue

This question is a followup of Plot the lowest eigenvalues of a parametric matrix Now I can get the lowest eigenvalue LowEign(t) of the matrix for a given t numerically. When I plot the LowEign ...
106 views

### Can I hold a condition in NMaximize/NMinimize?

I'd like to use NMaximize/NMinimize with the condition ...
172 views

### Use NMinimize instead of FindFit for constrained search (of coefficients)

(My problem is more complex, but let us formulate it through this example) I am trying to find the best polynomial approximation to the following function ...
241 views

### How do I estimate the Pareto front in my multiobjective optimization problem?

I need to minimize a function of two parameters that gives two "stress" outputs {A,B} = f[tau,mu]. How do I estimate (even roughly), the Pareto front for this ...
107 views

### Find the minimum element of a row of a matrix and its column index for each row

I am trying to find the minimum value of a row of a matrix and its corresponding column. Please run the code below. OptV is the matrix that I would like to create which must give the output of the ...
55 views

### recursively structuring a multivariate numerical optimization

Suppose that I want to partition the unit interval [0..1] into four subintervals whose max length is as short as possible. I can ask Mathematica to: ...
49 views

### Value Iteration (Recursive iteration) to Minimize (Optimize) a Function

I have a function that I call as "Value". I am trying to find the minimum of this function and this function is a function of 4 other functions. One of these four functions is recursive based on the ...
506 views

### How to find local minima of data using PeakDetect

One of the great new function in v10 is PeakDetect. It can detect peaks (local maxima) according to desired sharpness as shown in this example: ...
1k views

### Finding all maxima and minima of a function

To find all (global and local) extrema of a function in $\mathbb R^3$, I have written the following. Example function: ...
59 views

### Verify angle pi/4 maximizes launch range [closed]

I'm solving the equation of motion for a projectile in the x, y plane and got this: R = v0^2 sin(2 theta) / g where R is the range of how far the object will ...
117 views

### Find value of parameter such that the maximum value of a function satisfies a condition

I have defined a function x3 as follows: ...
53 views

### best way for finding approximate root of monotonic sawtooth like function

First I will generate such kind of monotonic sawtooth like function called func ...