Tagged Questions

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

learn more… | top users | synonyms (2)

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
48 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
68 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
37 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
38 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
802 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
54 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
112 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
72 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 ...
6
votes
1answer
271 views

What is wrong about Abs[x]-a? Is it a bug?

Why is the Out[74] not {1 - a, {x -> -1}}? ...
2
votes
2answers
198 views
-5
votes
1answer
96 views

Mathemathica: How to plot diagram? [duplicate]

i want to plot a diagram by this command using mathemathica. but it plotted as a beeline while it must be have a bit aberration.what is my fault in plotting? i want to display my diagram such as ...
0
votes
0answers
61 views

NMinimize not starting [duplicate]

I am new to Mathematica so I might be asking a trivial question, although I wasn't able to resolve it for several days. I am trying to optimize a 7x7 matrix with 12 variables with a certain evaluation ...
2
votes
2answers
165 views

Maximum of Minimum of a two variable function

I have F[x, y] := (y/2)(2 Cos[2x] + 2 Cos[x] + 1)/5 + ((1 - y)/2)(2 Cos[x] + 1)/3. I am looking for the maximum of the minimum of ...
1
vote
1answer
54 views

What domain does Resolve assume by default?

Consider the statement: $\forall x\left(x<7\Rightarrow \exists a\exists b\exists c(a^2+b^2+c^2=x)\right)$ This is true provided the universe of discourse is $\mathbb{N}$ Now I use ...
0
votes
3answers
115 views

Why does Maximize return a wrong answer?

I want to find the maximum of the following function, but get a wrong result. What am I doing wrong? ...
1
vote
0answers
56 views

How to find a scaling parameter in matrix inversion process by MMA?

I simply would like to find the inverse of a given matrix $A$ by the iterative method $X_{k+1}=X_k(2I-AX_k)$ using $X_0=\frac{1}{\sigma_{max}^2}A^*$. An example is as follows ...
0
votes
0answers
81 views

How to solve a signaling game in Mathematica (game theory)

A signaling game is within the field of game theory, and more information can be found here. I would like to know, how one can solve such a game, by finding the Baysian Nash equilibrium in ...
0
votes
0answers
57 views

Optimization without evaluating the analytical expression?

Firstly, forgive me for my lack of knowledge of programming and Mathematica. I have an optimization problem involving very large matrices when they are in analytical form. If I tried to generate ...
1
vote
0answers
38 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
0
votes
0answers
83 views

How to minimize the sum of squares of deviations from the mean?

I am trying to minimize the sum of squares of a deviation from the mean applying the following: Minimize[Sum[(Subscript[x, i] - \[Mu])^2, {i, 0, n}], x] It ...
0
votes
0answers
62 views

Constraint minimization with NMinimize

I am using the following code in order to minimize the function chi ...
0
votes
0answers
52 views

Interpreting a certain result of Minimize

I am given a certain function $f(k_1)$ that I would like to minimize. Asking Mathematica to do it (and supplying the given bounds of other parameters in the expression) I get the following result: ...
1
vote
2answers
226 views

Solve within a range?

Is it possible to solve an equation in which some some of the parameters have defined ranges? Example: ...
0
votes
1answer
87 views

Mathematica won't maximize my function

I'm trying to maximize two functions. For the first one, the code runs correctly and returns the desired answer ...
1
vote
0answers
87 views

How to optimize my code?

I use Mathematica to handle data.My trial as below: Interpolation function: ...
0
votes
1answer
55 views

Optimizing repeated function calls

Easiest way to keep my library nice, is to naively call some functions many times with same parameters. Doing so prevents from zoo of (library-)global variables and complicated initialisation ...
2
votes
2answers
155 views

Fitting a variable using multiple equations

I would like to find the best fit of two variables for a number of approximate equations, such as: 1x+2y+2=7.04 2x+y+4=7.98 1.5x+1.5y-2=2.53 1.8x+3y-1=6.77 That ...
6
votes
2answers
630 views

Distribution of 10 points within a unit square

Related to some packing problems, following problem arose: Distribute 10 points within a square of sides 1, so that minimal distance between them is maximized. With the help of random simulation, or ...
2
votes
2answers
151 views

Find minimum value of function which calls NDsolve [duplicate]

I have defined a function which takes a coefficient for a differential equation as an argument, solves the differential equation with NDSolve, and returns the value of the solution at time t=10. I can ...
1
vote
0answers
83 views

DSolve does not solve my system of PDEs

I am a long time Maple user who had just recently got hands on Mathematica. I have a "simple" system of PDEs, one can be solved easily. But I cant seem to get it work in Mathematica. I am nos sure ...
1
vote
0answers
152 views

Travel time sweet spot using: Mathematica and Google Maps API

I want to use Mathematica to do some time minimisation calculations calling on Google Maps API for travel time data. I'm concerned with travel time, e.g. along roads (by car or walk) and not linear ...
1
vote
0answers
23 views

Minimizing roots of a transcendental equations [duplicate]

I'm trying to use the solution of FindRoot with parameters for further calculations. Annoyingly enough it always gives me trouble with replacing the parameters. As an example I'm attaching a simple ...
1
vote
0answers
69 views

Linear interpolation over 2 variables

I'm tuning a function to data over 4-5 variables using Differential Evolution. The objective function calls frequently interpolation function. I came to a point, where compiling the objective function ...
0
votes
0answers
73 views

Minimize solution to linear system with singular system matrix

I am trying to solve a time-dependent linear system with a singular system matrix, $A$, thus an infinite number of solutions, ${\bf x}$(t), exist that satisfy the linear system. The solution I am ...
11
votes
2answers
207 views

Rotational Averaging of Image Periodograms (FFTS)

I'm writing a code to do rotational averages of image FFT's. I have a working version but it is pretty slow. Wondering if anyone has any thoughts on a way to do this more efficiently. Data looks ...
1
vote
1answer
108 views

Help to solve the equation with RungeKutta method [closed]

I need to solve this equation. v'[t] + v[t] == 1/(1 + Exp[-v[t]]) I tried to solve it using RungeKutta method described in Wolfram ...
0
votes
0answers
33 views

NMaximize not satisfying binary constraint

I'm solving an optimization problem in Mathematica with binary integer constraints. It works alright with other constraints. But the only problem is that both NMaximize and NArgMax are not treating ...
-1
votes
1answer
43 views

Are there a function to choose the greatest value in a discrete function? [closed]

Supose a discrete function show 1st, 2nd,...6th value are h = {5, 4, 2, 8, 9, 1} And I want to find the maximun in the subset of indexes 1,3,5,6 (what are ...
0
votes
0answers
56 views

inequalities in equations and constraints

Say That I have the constraint: .5<x1<x2<x3<x4<40 I want to use this constraint in a Nminimize function. It seems that mathematica runs into a ...
3
votes
1answer
99 views

What does LinearModelFit depend on except for its' arguments?

I thought this would be always true, but most likely it returns false. ...
2
votes
0answers
49 views

How to reduce notebook or CDF file size with many images in it? [duplicate]

We love to use Mathematica notebooks to keep our notes, so we import lot of scanned photos into notebooks. However, the nb file size goes crazy large after importing photos in it. For example, ...
2
votes
1answer
97 views

How to use Maximize correctly

I would like to Maximize this fairly simple expression ...
0
votes
0answers
98 views

Constrained maximum likelihood

Trying to solve a MLE with nonlinear constraints that need to be satisfied. However, the given solution do not match the constraints. Am I doing it correctly? ...
0
votes
0answers
91 views

How do I find where the maximum is?

I have a function given by: ...