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

learn more… | top users | synonyms (2)

0
votes
0answers
28 views

Minimization of a non-linear objective function subject to linear constraints

I have solved a linear program in Mathematica using the LinearProgramming function with arguments of the form LinearProgramming[c,m,{{b1,s1},{b2,s2},...}] i.e. ...
2
votes
1answer
40 views

Working precision and pure functions in FindMinimum

I have this function: fun = (# - 5.0)^2.0 & Then, I want to find the minimum: ...
-1
votes
0answers
21 views

mathematica multivariate question about how to define acceleration

write a function , call it tc, that takes as input the name of a vector-valued function and a value of t and outputs the tangential scalar componenet of acceleration of the function at that time
8
votes
1answer
129 views

What is the difference between FindFit and NonlinearModelFit

I cannot get the difference between these two fitting functions in Mathematica. I even read in MMA that the result of these two are the same.
2
votes
0answers
58 views
5
votes
3answers
190 views

How to use a compiled function in numerical optimization

I'm trying to wrap my head around function Compile. So, this is a spin-off question from: a previous question on using compile[] correctly. I have a function that ...
2
votes
1answer
61 views
0
votes
0answers
46 views

Calculate the relationship between the duration of two oscillating functions

I am trying to quantitatively determine the relationship between the length of two oscillating functions. Meaning, what is the duration of the green spike in relation to the blue square? Does anyone ...
1
vote
0answers
41 views

Optimizing evaluation of expressions dependent on four variables and containing double summation

I would like to optimize my code which I use to evaluate expressions containing double summation. These expressions are dependent on 3 space variables ($r$, $\theta$, $\phi$) and time $t$ and consist ...
5
votes
1answer
98 views

Optimizing code containing an infinite sum

I have the following expression. It's based on the negative-log-likelihood of a Poisson-Gaussian noise model, i.e. a convolution of a Poisson & Normal distribution. The value $x_{i}$ is the ...
1
vote
1answer
36 views

NMaximize not substutiting parameters of objective function [duplicate]

NMaximize is not substituting parameters of its objective function. Is there a way to fix that? I have a three line program that exhibits the problem. ...
4
votes
1answer
72 views

Possible bug / numerical issues with HypergeometricU — any suggestions for a fast workaround?

I've encountered some problematic behaviour with HypergeometricU. I have a probability distribution on the positive integers that takes the following form after ...
1
vote
0answers
45 views

NMaximize stops evaluating my function when run in parallel

I am trying to maximize the results of a Monte Carlo simulation with respect to some input variables. ...
0
votes
1answer
92 views

How to differentiate a geometric sum [closed]

How do I differentiate both sides of the equation shown below with respect to r?
1
vote
0answers
133 views

Solving mixed integer programming using Mathematica

Let $x_{ij}$ be an $n\times k$ matrix defined as follows: $ x_{ij}=\begin{cases} 1, & \text{if }s_i\text{ is assigned to }S_j \\ 0, & \text{otherwise } \end{cases} $ and $S$ is a set of $k$ ...
3
votes
0answers
64 views

Efficient processing of Special Ordered Sets with LinearProgramming

I'm playing with integer linear programming, especially problems involving lots of constraints which would appear to be special ordered sets. Below is a toy example, three last rows of the matrix ...
11
votes
2answers
431 views

Find maximum value of interpolation function - obviously wrong result

Minimizing and maximizing interpolation function has already been asked and answered, see here for example. Yet, I observe a strange behaviour. Well, I can understand that the wrong guess of ...
6
votes
0answers
53 views

Listable compiled functions used in NMinimize

This is an example from MMA: cListable = Compile[{x}, (x-1)^2, RuntimeAttributes -> {Listable}] In case of single entry: ...
9
votes
0answers
138 views

Can code optimize code?

Are there functions, programs or packages that deal with optimizing mathematica code i.e. re-writing ineffecive or convoluted code. -This question has haunted me since I joined SE. The background for ...
2
votes
1answer
84 views

How to build a list of constraints for NMinimize

Let's say I have aset = {-1, 0, 2}. I would like to create a variable Var that takes values from that set, i.e. ...
1
vote
2answers
136 views

Using compiled function inside NMinimize

Consider this code: ...
1
vote
0answers
77 views

Optimization in Mathematica [closed]

There is a R package called TIMP. By this package someone can fit data to a model. There is a GUI for TIMP called Glotaran. When I fit my data by this package it does not take so much time to get the ...
2
votes
1answer
63 views

How to minimize a list of data points?

I have a list called diff1: ...
1
vote
1answer
131 views

Finding the minimum of a function

I asked this question Mark Minimum Value in DensityPlot. Another question has come up, or better said, a task: Find the minimum of a function. I haven't been able to write the needed code for that, ...
2
votes
0answers
58 views

Maximizing Large Multivariable Function over Region with Parameter Constraints

Brand new Mathematica user here. I have a complicated function to maximize, and thought I would try software like Mathematica instead of taking derivatives by hand. I found some Mathematica ...
2
votes
1answer
96 views

Minimizing a function with some restrictions

I need help in finding a way to minimize a function with some complex constraints. I'm not an expert in this field, but I'm still trying to understand if I can do something with my problem. So, ...
0
votes
0answers
53 views

how to solve an optimization problem in terms of matrices as the argument

How can I minimize an expression of the form a^T A a where a is a matrix. The following approach does not work if ...
1
vote
1answer
84 views

Manual maximum likelihood estimation of a mixture with no closed form

Let $X$ be a random variable that is from a mixture of two Lognormals (Lognormals(mu1,sigma) and Lognormals(mu2,sigma)) and set $Y=X_1+X_2+...+X_{10}$ a sum of 10 random variables from this mixture. ...
0
votes
1answer
55 views

Solving minimum length confidence interval problem

I'm trying to find the minimum length of a confidence interval for the variance from a sample iid with normal distribution. I tried ...
2
votes
0answers
100 views

Convex optimization

I am playing with some Compressed Sensing (think single pixel camera) applications and would like to have a Mathematica equivalent of a Matlab package call Convex Optimization (CVX). Specifically, I ...
0
votes
0answers
29 views

What is that Root[…] inside the answer represent? [duplicate]

So I am encountering this situation, in which mathematica doesn't give me the answer, but in a form of "Root". How do I interpret this ? what is the number after the "&" represent? How should I ...
0
votes
0answers
89 views

FindMinimum slower in MMA10

I've recently updated one of my PCs (both have the exact same build) to Mathematica 10. After running the exact same notebook (which has two FindMinimum calls) on ...
1
vote
0answers
62 views

on convergence in optimization [closed]

I am trying to solve a nonlinear programming problem using FindMinimum solver on Mathematica. When I execute, it is printing FindMinimum::eit: "The algorithm does not converge to the tolerance of ...
1
vote
2answers
118 views

Minimize loop optimization

I'm new in Mathematica 10. So far, I have a two variable-function and I've use Minimize to find the optimal solution. Nevertheless, I'd like to make a sensibility analysis and study how this optimal ...
1
vote
1answer
57 views

2D Arrangment/Optimization Problem

Okay, I have a list of angles, call it A. How would I arrange them in a 2D m-by-n grid G such that the distances between each adjacent angle-element (row- and column-wise) is minimized? G has as ...
1
vote
0answers
98 views

Speeding up NDSolve for system of differential equations

I am wondering if there is a way to speed up this function that solves a system of ordinary differential equations with NDSolve? Thus far I've tried specifying a few different methods such as LSODA, ...
0
votes
1answer
92 views
0
votes
1answer
47 views
0
votes
3answers
184 views

Optimization Algorithm: ideas wanted

EDIT: Lets assume a random matrix: ...
5
votes
0answers
208 views

Problems extending NelderMeadMinimize into 2D

Update The eventual route I followed was to adapt a version of the NM-simplex written in C and link to it with MathLink. Once I've tested this out fully I'll post it here. I've been playing around ...
0
votes
1answer
66 views

Nminimize fails claiming not a number value, even with _?NumericQ [closed]

I have the following function to minimize for a > 0 ...
0
votes
0answers
33 views

Pass model parameters to NDSolve'Reinitialize

I am wondering if there is a way to pass parameter values during the NDSolve'Reinitialize step of the NDSolve process? I've read that one way to possibly speed up repeated calls to NDSolve is to ...
7
votes
2answers
222 views

Using least independent rectangle area to separate every point

Description I want to add vertical line and horizonal lines between data to make every point have an independent rectangle area. In addtion, every independent rectangle has a number ...
0
votes
0answers
36 views

NMinimize of a Differential equation

f[kpr,tn,tv] is a Block for the Differential equations of a simple control loop with a PID-controller. It calculates the the response x[t] and integrates the t-weighted area under the response. The ...
8
votes
8answers
765 views

Finding maximum or minimum of implicit functions

is there any built in function that can be used to find maximum or minimum of implicit functions? For example, if we have the equation $$x^2 + y^2 = (2 x^2 + 2 y^2 - x)^2,$$ then we can visualize the ...
0
votes
1answer
60 views

Finding the right DeleteCases pattern for <<199>>

I have a list in Mathematica with several items like <<199>> and <<104>>, I would like to get rid of them using DeleteCases, but none of the patterns I ...
0
votes
0answers
52 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 ...
0
votes
1answer
111 views

How to include constraints in `NMaximize`

I am trying to find maximum likelihood estimates of parameters for a fairly complicated multivariate distribution. The support of the distribution depends on its parameters so I need to include some ...
1
vote
0answers
70 views

Solve set of non-linear equations with least-squares-fitting - constrain results?

I'm trying to solve a set of functions to determine the material properties from a set of measurement values. (To set up this method I just want to fit my model with some already calculated data). My ...