# Questions tagged [mathematical-optimization]

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

1,897 questions
Filter by
Sorted by
Tagged with
1 vote
69 views

### Path of Least Resistance Minimization Problem

I'm trying to find a path of least resistance using a matrix c of resistance and a given exogenous vector kOne of the total least resistance from point(n) to point(4) (the destination): ... 218 views

### How to prove or disprove an inequality with Mathematica?

I mean there exist $\lambda>0, x\in \mathbb R$ s.t. the inequality $$\frac{3^{\lambda } e^x+e^{3 x}+1}{2^{\lambda } e^{2 x}}<\frac{1}{10^{100}}$$ is valid. Here are my unsuccessful attempts. <...
237 views

### How to compute higher iterations in mathemtica

I have the equation $u^{\prime\prime}(t)+u^{2}(t)-t^{4}-2=0$ such that $0\leq t\leq 1$and also I have $u(0)=0$ as well as $u(1)=1$. Noe the exact solution of the equation is $u(t)=t^{2}$. Now I ...
48 views

### NMinimize with a matrix argument

How does one specify that an argument in NMinimize should be understood as a matrix (of a given dimension)? For example, say I have two square matrices $F\succeq0$ ...
107 views

...
71 views

### How does one use NumericQ when NMinimize isn't being called in a function?

I have a value that is calculated based on the matric multiplication of 3 matrices, a projection in a hilbert space really. I then take the trace of this to calculate the probability ...
127 views

### NMinimize does not reach the minimum

I need to minimize numerically an expression with constraints. The expression also includes a numerical integral (called 'PNoninteract'). The minimization apparently stops prematurely (I know roughly ...
1 vote
104 views

### Solution of a BVP by Means of DSolve [closed]

If we consider the BVP $y^{\prime\prime}(t)=\frac{3}{2}y(t)^{2}$ where $0\leq t\leq1$ and $y(0)=4$ and $y(1)=1$. Then its solution is $y(t)=\frac{4}{(1+t)^{2}}$. I have set the BVP above as in ...
34 views

### How to obtain the most accurate maximum value of the given equation? Changing WorkingPrecision gives different results

I have two functions $f(x,y)$ and $g(x,y)$ over the domains $1.56 <x< 1.6$ and $3<y<\pi$. ...
31 views

127 views

### Bilevel optimization

I found a problem here How do we go about solving this in Mathematica? I did something like this: NMinimize[(x^2 + y^2 - 1)^2, {x, y}] this gives ...
126 views

### Animating Particle Motion Using Parametric Plot and Animate

I am attempting to animate my parametric plot and add a particle to move on the line but I am having difficulties. Here is my graph for the trajectory: ...
87 views

### Solve Riccati Equations by hand

I'm in the midst writing a bit about LQR problems and would like to show that some things in mathematica can be tested by trying to write such problems out by ones self, However I cannot seem to find ...
181 views

### How do I maximize the following?

I want to maximize $${T(\epsilon)=\max\left\{\log_{(1/y)}\left(|\sqrt{2}-x/y|\right):x,y\in\mathbb{N}, |\sqrt{2}-x/y|<\epsilon\right\}}$$ Edit: I changed the inequality, it was supposed to be ...
205 views

### Why does NMinimize using NelderMead without PostProcessing always stop at the nearest decade of iterations, e.g. 100, 110, 120

Why does NMinimize using NelderMead without PostProcessing always stop at the nearest decade of iterations, e.g. 100, 110, 120... Perhaps Catch Throw can prevent this e.g., see this answer, but that ...
60 views

### Optimization with NDSolve

Multiple variables involved in NDSolve need to be optimized. Previously, I shared my codes but didn’t get any helpful response. Please tell me how can I optimize multiple variables (say 30 or 40) ...
171 views

### FindMinimum running forever

I cannot get any output from the below-mentioned optimization problem. The program keeps running forever. What can I do to solve this optimization problem successfully? ...
1 vote
93 views

### RSolve unable to solve the equation

I gave the following code as input: RSolve[x[n + 1] == 1/2 x[n] + 2 Log[x[n]], x[n], n] Mathematica gave the same output: ...
63 views

### Minimize relating a geometric test

I want to find a circle with a center and a radius that includes all given points, like a circumscribed circle for the points. points data: https://www.dropbox.com/s/0unlv1vbngopu38/new_ref.txt?dl=0 ...
95 views

67 views

### Cannot Optimize where NSolve and NDSolveValue are involved with Multi-Variables

My Objective Function is Sqrt[Sum[((sol[[j]])^2), {j, 1, noofnode}]/noofnode] with variables v1, v2, v3, v4, v5, v6. But just ...
57 views

### NDSolve and system of differential equations

I want to solve an optimization problem. I got following code, but it end with no error message or a solution. Note : As of now, I am not using nu1,..nu4 variables even though they are defined in the ...
67 views

### Image of house being repaired via optimization (FindMinimum) example in documentation?

In Mathematica's documentation, I recall seeing an example where a noisy image of a house was repaired using an optimization method (possibly FindMinimum) with a very large number of parameters (one ...
31 views

### Social Planner Problem and Dynamic Optimization

I am reading following article: https://www.tse-fr.eu/sites/default/files/medias/doc/by/nguyen/1august13_jmerev_gln.pdf and trying to code the optimization problem given in the page 6 (eq P-6). The ...
28 views

### How to solve Dynamic Optimization problem involving expectations

I am very new in wofram mathematica, so please apologies if my question is too obvious or not clear enough. I have the optimization problem which involves expactations and summation, \begin{align*} \...
1 vote
101 views

### Optimizing operations between vectors

Basically I am generating a grid in space (so a vector where v[]=position 1 in x) and a random number of particles in space (so a vector where p[]= position of particle 1 on space). Afterwards, ...
1 vote
64 views

### How can I make ParallelDo faster than Do?

I am trying to optimize my code as much as possible. So first I used a compile and now I am trying to parallelize the code in order to make it faster because in the end I will need to make a loop that ...
95 views

### How to Optimize a Finite Element Model with Multiple Variables in Mathematica?

Urgent Help, Please !!! I am attaching my codes for a Finite Element Model which needs to be optimized and the Objective Function ("of" in the code) has been mentioned at the last line of ...
1 vote
68 views

### Dividing list into smaller list using a set of rules?

Suppose we have the list for $n\in\mathbb{N}$ Range[1,n] We choose the number in the list where $x=1$, $x=n$ and $x=1+(n-1)/2$ round closest to and the numbers ...
1 vote
57 views

### Code review of my animation of Ellipsoid method

Feel free to suggest improvements (code-review) to my two functions (calculation and animation). They were made to visualize the workings of the Ellipsoid method in two dimensions. For example, see ...
58 views

### Dividing a list of integers into a list of sub-lists?

Suppose we have a list of integers for arbitrary $n\in\mathbb{N}$ Range[1,n] We take the integer in the list that rounds closest to $x=1$, $x=n$, and $x=1+(n-1)/2$....
60 views

### How to plot the peak of a wavefunction depending on time

I am trying to define a function to find the spatial peak of some interpolation function of two variables (one spatial variable and one temporal variable) which is the output of ...
51 views

### How to use ConvexOptimization on a piecewise function?

I define a simple piecewise convex function, but ConvexOptimization does not take it as a valid input: ...
104 views

### How to use ConvexOptimization on a function constructed from data?

Given the following data points sampled from a convex function, how could I construct a convex function that can be minimized using ConvexOptimization? ...
1 vote
134 views

### Mathematica: How can I solve the problem "The Kernel Local has quit (exited) during the course of an evaluation"

I am using a Mac Book with Monterey and 16GB RAM for a calculation with 2 nested For loops. I am relatively new to Mathematika and still trying to learn the language properly, so I hope the problem is ...
89 views

### Solving or Minimizing the Norm of the matrix equation $M^TAM - M^TB - B^TM =C$

I am trying to solve the matrix equation $M^TAM - M^TB - B^TM=C$ where I know A, B and C. My unknown matrix is M which has the special form that all the rows and columns sum to zero. i.e. I have four ...
1 vote
62 views

### Can LinearOptimization (ex. LinearProgramming) support other methods (Ellipsoid method)?

Can LinearOptimization (ex. LinearProgramming) support methods other than "InteriorPoint", "Simplex", "RevisedSimplex"? Specifically, I need the Ellipsoid Method. Are ...
66 views

### Tips and tricks for minimization problem

I am quite new to Mathematica and would like to use it for a minimization problem. The function I like to minimize is: ...
62 views

### Formalization of one optimization problem or solution of inequalities - Part №2

Continuing the question: Formalization of one optimization problem or solution of inequalities Let's consider a more complex problem. We have two polynomial: $p_1=A_2t^2+A_1t+A_0$ $p_2=B_2t^2+B_1t+B_0$...
72 views

### Formalization of one optimization problem or solution of inequalities

I have polynomial: $p=A_2t^2+A_1t+A_0$ $A_0=(x^2-y^2)+xz$ $A_1=x^2+y^2+z^2+\sin(x)$ $A_2=x^4+y^3+z^2$ $x,y,z$ - parameters, moreover $z$ - the value of which varies in the range $[0,1]$. Polynomial $p$...
1 vote
83 views

### How to set Initial Points for optimization problems

How to set Initial Points for optimization problems in MMA? In this case,we do not need to set the range of the variable x1, x2. ...
208 views

### Can FindMinimum and NMinimize be so wrong?

Here is a whole block of code that computes a function at the point vx0=2.2 and returns 61.9113, which is much lower than the ...
1 vote
27 views

### mistake results when using SDP for large-scale matrix

Recently I am struggling with a question during my research. Using the following Wolfram Mathematica code I could create any even-order symmetric matrix (matriceNew in mathematica) whose entries is ...
30 views

...
1 vote
30 views

...