# Questions tagged [constraint]

The tag has no usage guidance.

158 questions
Filter by
Sorted by
Tagged with
1 vote
62 views

### Find an instance satisfying equation

I have the following equation with two variables xi and nu. ...
36 views

### NonlinearModelFit with NMinimize Submethods and Selective or Mixed-Head Constraints

Problem: I believe I've found a two related bugs associated with using NonlinearModelFit while making a Method call to NMinimize's submethods, e.g. "RandomSearch" and "...
28 views

### Adding constrains in a SYM function "Classicalsymmetries"

Please help me add constrains on my code. The function runs perfectly fine without the constrains but it gives me 7 cases and I only need one where all the constrains I have hold. This is the code ...
44 views

### Identify a condition among variables that satisfy an inequality

I have a symbolic function that produces the output a = (1 - e - mu/n) Log[(1 - e - mu/n)/(1 - mu/n)] + (e + mu/n) Log[((e + mu/n) n)/mu] If I substitute ...
53 views

### Problem maximizing a function

I have a problem maximizing the following function: ...
1 vote
44 views

### Error with NMaximize: "The following constraints are not valid" which disappears if the objective is changed

I am trying to optimize under constraint using NMaximize, however the constraints are flagged as invalid. I could not see the problem with the constraints so I ...
1 vote
106 views

### Finding the maximum of a non-linear function symbolically

I have the function $$f(x,\alpha) = x^\alpha - \frac{x^2}{2}$$ where $x>0$ is the main variable of interest and $\alpha \in (0,1)$ is the parameter of curvature: ...
33 views

### Optimization over nested variables, vectors and matrices

I am trying to optimize a function that is fairly complicated, but at the end I just want to solve a parametrized assignment problem using integer linear optimization with Mathematica. The main ...
48 views

### Constraints in a set of equations

I am currently working on a system of equations that is subject to a determinant constraint. Specifically, I have a matrix $B$ with $\det(B) = 0$, and I aim to construct a linear combination of its ...
57 views

### Invalid Constraints error in Non-linear Optimization

I am trying to write the code to solve a certain optimal control problem, but I keep running into an issue when I pass on my constraints to NMininimize[]. The ...
68 views

### Find the minimum value of a constrained multivariable function [closed]

Say I have a function of four variables $f(x_1,x_2,x_3,x_4)$ and a constraint $g(x_1,x_2,x_3,x_4)$ (both are quite complicated, that's why I don't write them explicitly). I want to find the minimum ...
64 views

### NIntegrate MonteCarlo with phase-space constraints

I wanted to use NIntegrate in Mathematica to perform a multi-dimensional Monte-Carlo integration numerically. I am a physics student, and I want to calculate probabilty (cross-section) of a high ...
289 views

### Creating a random symmetric matrix with a particular rank

The documentation about LinearAlgebra has a section on Constructing Matrices, but the examples of random matrices using RandomReal don't offer an obvios way to ...
30 views

### Solving a system of equations with distributional constraints

I'd like to generate samples of real numbers respecting distributional constraints. I tried (here, for a sample of 17 reals): ...
48 views