Skip to main content

Questions tagged [constraint]

Filter by
Sorted by
Tagged with
6 votes
1 answer
299 views

I would like to minimize a vector function subject to a vector constraint function. Unlike previous posts (Constrained FindMaximum with array valued function and Constrained optimization with a ...
Vly's user avatar
  • 450
2 votes
1 answer
96 views

Given a list of integer-valued vectors $w \subset \mathbb{Z}^5$ ...
Bulkilol's user avatar
  • 341
2 votes
1 answer
137 views

Not sure whether Maths or MMA SE is more appropriate since I have problems even tackling the problem. Consider the following question: (Let's say I work in 3D, a box or something) Minimize a ...
Confuse-ray30's user avatar
1 vote
0 answers
118 views

This is a representative volume element problem on a unit square. I would like to apply the following linear constraint on a boundary: $u(x,1)=u(x,0)+0.3$ How can do this? There seems to be no way. ...
Rainer Glüge's user avatar
3 votes
1 answer
202 views

I'm trying to maximize a (quite simple) polynomial inside a sphere. The command is simply: ...
Carlos Santi Toledo's user avatar
1 vote
0 answers
101 views

I am trying to understand why wrapping TimeConstrained[] around optimization, e.g., MinValue[] can sometimes fail. To reproduce ...
Aharon Naiman's user avatar
2 votes
2 answers
226 views

I want to solve a linear Matrix equation over GF(2). I am currently using Mathematica's LinearSolve[A,B, Modulus->2] function to solve for X in the equation AX = ...
clearski's user avatar
4 votes
1 answer
271 views

By "collaborate", I mean to give some instructions or constraints. Consider the following curves: (as examples, only to illustrate my question in a better way): Curve (I): Assume it is f ...
Hussain-Alqatari's user avatar
0 votes
1 answer
128 views

I want to solve for parameters and not specific values. ...
CarS's user avatar
  • 1
4 votes
0 answers
102 views

I have taken a photo (with a rectilinear lens) of a house's outside wall that sits on top a roof, from which I wish to take measurements from. However, to do so I would need to correct the perspective ...
小太郎's user avatar
  • 223
0 votes
1 answer
144 views

I want to solve the Lagrangian with two multipliers $\lambda_1$ and $\lambda_2$, but with an additional convexity assumption. However, when I solve it case by case under such an assumption, I get 0 as ...
Lizy Jackson's user avatar
4 votes
1 answer
397 views

Background I'm going to investigate a beam-pendulum coupling system (in this question I won't consider the pendulum though), that is, a spherical pendulum is suspended on the tip of a cantilever beam. ...
rnotlnglgq's user avatar
  • 3,780
1 vote
1 answer
118 views

I have the following equation with two variables xi and nu. ...
Dotman's user avatar
  • 590
0 votes
0 answers
84 views

I have a problem maximizing the following function: ...
blo's user avatar
  • 1
1 vote
1 answer
158 views

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 ...
Cryme's user avatar
  • 152
1 vote
1 answer
180 views

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: ...
Gorkem Aksaray's user avatar
0 votes
2 answers
106 views

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 ...
Albus Black's user avatar
0 votes
0 answers
91 views

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 ...
Kushagra Mishra's user avatar
0 votes
1 answer
142 views

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 ...
AFG's user avatar
  • 123
1 vote
1 answer
131 views

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 ...
Raymond Chen's user avatar
8 votes
1 answer
403 views

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 ...
lotus2019's user avatar
  • 2,763
0 votes
0 answers
58 views

I'd like to generate samples of real numbers respecting distributional constraints. I tried (here, for a sample of 17 reals): ...
Raoul's user avatar
  • 101
0 votes
1 answer
103 views

I would like to generate automatically a polynomial in two variables $(s,t)$ which is symmetric under the exchange of those variables. There are three kinds of terms; at order $k$, we have $$(s+t)^k, \...
Rubilax96's user avatar
8 votes
2 answers
1k views

While learning about Lagrange multipliers, I am finding examples on how a constraint is applied to a function. Given the following two functions (where E^ is ::e::):...
M.E.'s user avatar
  • 333
6 votes
3 answers
281 views

I would appreciate it if somebody could help me with the following problem: I want to create a Wolfram Language expression that states that all $a$,$b$,$c$,$d$ variables are elements of the set $\{2,...
Young's user avatar
  • 291
1 vote
1 answer
233 views

I have the following linear program that I am able to solve in MATLAB. However, I want to move to Mathematica. For some fixed constants $n$, $\delta$ and $\varepsilon$ and fixed $(n+1)$-dimensional ...
user1936752's user avatar
5 votes
1 answer
225 views

I'm wondering about the possibility of employing ParametricNDSolve to solve a class of constrained optimal control problems. Here's an example: The system under ...
dchatter's user avatar
  • 200
5 votes
2 answers
300 views

I have 2D implicit functions which I would like to plot in color, with given color functions. E.g.: ContourPlot[y^2 - x^3 + x^4 == 0, {x, 0, 1}, {y, -1/2, 1/2}] ...
Aharon Naiman's user avatar
3 votes
1 answer
317 views

I want to know how can I can I tell Mathematica that all symbols that appear in an object, e.g. a matrix, obey certain constrains, without having to write these conditions by hand. More specifically, ...
AG1123's user avatar
  • 603
0 votes
1 answer
78 views

I made a random data matrix as data = Table[Random[], {i, 5}, {j, 5}]; In my case it was $$ \left( \begin{array}{ccccc} 0.951203 & 0.546669 & 0.86928 &...
user1337's user avatar
  • 1,088
2 votes
1 answer
121 views

My problem is as follows: How do I ask Mathematica the following question. Let $f(x,y,z,a,b)$ be a 5 variable polynomial. I want to find all values of $a,b$ for which $f$ has no zeros in the region $...
2132123's user avatar
  • 667
1 vote
1 answer
262 views

I am solving the following system of first-order ODEs with a variable right-end point l1num and boundary condition at that point ...
Asatur Khurshudyan's user avatar
1 vote
1 answer
292 views

In Solved3DConstrainedIntegration the constrained three-dimensional (Hilbert-Schmidt-metric-based HSmetric) integration problem for the absolute separability probability of the two-qubit (quantum bit)...
Paul B. Slater's user avatar
2 votes
1 answer
290 views

My goal is to use a gradient descent type method to maximize interpolating function1 with respect to the constraint that interpolating function2 <= 0.5. I am working with 4D data (please see below)....
mathemagician617's user avatar
2 votes
2 answers
415 views

Here is a code to draw a full cylinder $\theta \in [0, 2\pi)$: Graphics3D[Cylinder[{{0, 0, 0}, {1, 0, 0}}, 1/2]] My question is that how do we draw a 1/4 of the cylinder, such that it only appears in ...
wonderich's user avatar
  • 963
0 votes
0 answers
100 views

I have a model for which I want to perform a set of calculations with successively deeper iterations and more constraint. In other words for a given value of a Do iterator, n, I want to: perform a ...
jmm's user avatar
  • 281
0 votes
1 answer
1k views

I ask for advice, I'm a little confused. I have such a Lagrangian. $L=\frac{1}{2}m(\dot{x}^2+\dot{y}^2)-\lambda(2x^2+3y^2-1^2)$ Here $\lambda(2x^2+3y^2-1^2)$ is the constraint on the phase variables. ...
ayr's user avatar
  • 2,665
4 votes
2 answers
297 views

I have this code. Definition of q is: ...
Victor Nielsen's user avatar
2 votes
1 answer
284 views

I want to solve differential equation $$ \frac{y''[x]}{(1+y'[x]y'[x])^{3/2}} = -a -y[x]/ \sqrt{2} + x/ \sqrt{2} $$ subject to boundary condition $y(-1) = y(1) = 0$ for some value of $a$. $a$ is found ...
nameDisplay's user avatar
0 votes
0 answers
57 views

$q$ is a real antisymmetric matrix and can be defined as: ...
Jasmine's user avatar
  • 1,285
3 votes
2 answers
283 views

Is there a way to create a matrix $q$ of dimension $d$ with constraints on the indices given by: $$d\longrightarrow dimension$$ $i,j $ are indices $$q_{i,j}=\begin{cases} -b & j=i+d,\\ c & j=...
Jasmine's user avatar
  • 1,285
1 vote
1 answer
329 views

I am trying to find a nice and efficient way to approach the following problem: I need to solve (for example using Solve, Reduce, or NSolve) certain type of equations involving a set of unknown square ...
AG1123's user avatar
  • 603
0 votes
1 answer
260 views

I am trying to code the following maximization program that I am not able to solve algebraically (Of course I manage to get the first derivative, but struggle finding its root): $\begin{equation} Max_{...
Banalaude's user avatar
  • 107
1 vote
0 answers
86 views

Consider the class $A$ of $6 \times 6$ positive definite matrices with real entries and unit trace (that is, the sum of the six diagonal entries is 1). (In quantum information-theoretic parlance, this ...
Paul B. Slater's user avatar
1 vote
1 answer
144 views

I'm trying to understand how to use Mathematica to find a solution subject to constraints, where one of the constraints is specified as a predicate function. But I don't know how to control evaluation ...
algal's user avatar
  • 113
0 votes
0 answers
82 views

https://en.wikipedia.org/wiki/Navigation_function https://www.sciencedirect.com/science/article/abs/pii/S0921889015302451 https://arxiv.org/pdf/1605.00638.pdf - Paragraph III I am trying to create a ...
ayr's user avatar
  • 2,665
0 votes
2 answers
215 views

We have list = {{1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {-1, 1, 0}, {1,-1, 0}, {-1, -1, 0}, {-1, 0, 1}, {1, 0, -1},{-1, 0, -1},{0, -1, 1},{0, 1, -1},{0, -1, -1}} ...
gunes's user avatar
  • 401
2 votes
2 answers
298 views

Issuing the following: FindMinimum[{x, ((2 x + 1)/(3 x - 2))^(4 x - 3) <= 10^-10}, {x, 2}] produces a value of 13.1686 . The constraint for that value is: 1....
Aharon Naiman's user avatar
1 vote
3 answers
203 views

When I add a non-binding constraint to a maximization problem the result changes. I don't understand why. Below you can find the code that I am using. For the maximization A, H = 6837.66 For the ...
Ana Sá's user avatar
  • 13
3 votes
1 answer
422 views

The problem I want to solve the following problem for symmetric matrix $X$: $$ \begin{aligned} \min_{X\succ 0} \; & -\log(\det(X)) & \\ \text{subject to} \; & \begin{pmatrix} X &...
ModCon's user avatar
  • 265