Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [constraint]

The tag has no usage guidance.

0
votes
1answer
42 views

Constraining a parametric plot

I have the following parametric plot: ...
0
votes
0answers
71 views

Differential equation with some condition

I'm trying to solve a harmonic oscillator equation with a time-dependent (real) frequency, $v_k''(\tau) + \omega_k^2(\tau) v_k(\tau)=0$, where $\omega_k^2(\tau) = k^2 - \frac{2}{\tau^2}$. This ...
0
votes
0answers
57 views

Perform a constrained integration over $[-1,1]^6--yielding a “separability probability”

To begin with, I have a set of three positivity constraints (ensuring the positivity of a certain (twelve-parameter) $6 \times 6$ "density matrix", denoted in the standard manner as $\rho$, namely, <...
0
votes
0answers
63 views

Approximate/estimate the ratio of two multidimensional constrained integrals

I have a hypothesis that a certain "qubit-qutrit separability probability" should assume the value $\frac{5}{3} \left(112 \pi ^2-1105\right) \approx 0.659488$. In its initial formulation, this is a ...
2
votes
3answers
194 views

Compute a certain “separability probability” via a constrained 4D integration over $[-1,1]^4$

I have employed the GenericCylindricalDecomposition command (applied to $6 \times 6$ "density matrix" positivity constraints) to compute the following expression ...
1
vote
2answers
64 views

Trouble finding a maximum of a constrained multivariate function

I have a multivariate function that I seek to maximize (ideally symbolically): The function has the form: $\frac{(-j*a)}{8 (-(b/2) - j (c-d-e)) ((j*b*c)/2 - (j*b*d)/2 + c*d - d^2 + a^2/4))}$ (...
1
vote
2answers
106 views

Cutting a section from a sphere by planes

I want to plot and find out the section of a sphere remaining after putting constraints in terms of cartesian planes. How it can be done? For example, if I have a sphere of $r = 1$, and I put the ...
0
votes
1answer
49 views

Guarantee a positive value for $a$ when using SolveAlways [closed]

SolveAlways[y - 3 - 4*(x - 1) == a*x + b*y + c, {x, y}] {{a -> -4, b -> 1, c -> 1}} But if I want to get the ...
1
vote
2answers
45 views

Define x as a multiple of a number as a constraint in the Maximize function

I am trying to optimize a linearly constrained Production Function. I have three inputs and want them all to be multiples of 150. I can make all the inputs to belong to the Integer Domain but is there ...
2
votes
1answer
62 views

Why is Reduce in Mathematica giving solution in other symbols that don't exist in original equation [closed]

Here is an example: Reduce[P/Q < (P - X)/(Q - X) && X > 0 && P > 0 && Q > 0 && P > Q, {X}, Integers] The solution ...
0
votes
1answer
78 views

Need a package to compute constraint structure

I want to compute constraint structure of some field theory and some gravitational field theory. By constraint structure I mean what is explained in the "Lectures on Quantum Mechanics" by P. A. M. ...
3
votes
0answers
44 views

How can I prevent ParallelTable[] from freezing?

I have spent some time trying to figure this out. I have a function that appears to be the reason my program is freezing. I am using both MemoryConstrained[] and <...
0
votes
1answer
60 views

Symmetric solution of ODE

Is it possible to force DSolve to calculate the symmetric solution? Obviously the ode x''[t] + x[t] == 0 has the symmetric solution ...
2
votes
2answers
127 views

“Forcing output of a function to be Real in Mathematica” Non-linear optimization

I am trying to solve a Nonlinear optimization problem with Mathematica. Since the maximization problem includes exponentiation with fractional power, the result generates the complex numbers that stop ...
1
vote
1answer
83 views

Intersection Mathematica and SMT

recently i started to investigate in SMT-solvers (SAT Modulo Theory), especially Z3. My interest is in using it as a constraint solver on mixed integer/boolean problems, with a spoonful of SAT. I am ...
2
votes
0answers
83 views

How to define a constraint implying covariant derivatives in XTensor/XAct?

I have two manifolds: M and M1 with metrics g and g1. ...
1
vote
1answer
25 views

Finding smallest domain within which variables can satisfy inequality

Given an arbitrary number of variables $\epsilon_i$ that can be picked from a domain $[0, W]$ and some inequality relation between all the variables $G(\epsilon_1, \epsilon_2, ...)$, is there some way ...
1
vote
1answer
64 views

Increasing accuracy of solving overdetermined linear system

I am given $48 \times 48$ matrix $A$ and a vector $b$ and I would like to solve system $Ax = b$. I know that $A$ is underdetermined, i.e. there exist many solutions for $x$. Due to some considerations,...
0
votes
2answers
138 views

Using Assuming for conditional expression in Solve

When I solve the following equation I obtain a solution with a conditional expression Solve[{0 == k Sin[x - y] - Sin[x], 0 == k Sin[y - x] - Sin[y]}, {x,y}] How ...
3
votes
1answer
247 views

Fitting a Multi-Exponential Decay With Constraints

I am having trouble finding a way to fit my data in Mathematica to a multi-exponential decay, with the critical condition that all contributions to the decay sum to 1. To start, I can fit my data to ...
0
votes
0answers
31 views

Constructing constraints from a list [duplicate]

I want to use FindMinimum to minimize some functional, say f[argList_] = Total[argList^2] Now the variables over which to ...
1
vote
1answer
59 views

Assignment to slots with inequality constraints

Suppose that I have a table A with each of its n columns corresponding to an "individual" and each of its m rows corresponding to a "task". The element of the jth ...
0
votes
1answer
131 views

RegionFunction with equalities?

Can we use RegionFunction with Plot3D for equalities? This answer (Plot multivariable function with constraints) has shown the use of RegionFunction with inequalities, but the same commands don't work ...
2
votes
1answer
176 views

Solving for coefficients in a polynominal

I've the following problem: how can I solve for the coefficients in a polynominal? So, I mean the following: I've the following expression: $$\left(56-85689\cdot x\right)^2-3136\tag1$$ And I ...
1
vote
0answers
32 views

Solving some constraints on a subgroup of a Lie group [closed]

Let $M$ be a rank-3 matrix, I am interested in searching all the group elements $g \in$ SU(3) Lie group, such that, $$ g^T M g =M. $$ Example 1. Let $$ M[1]= \left( \begin{array}{ccc} 0 & 1 &...
2
votes
2answers
116 views

Robust pattern matching for functions obeying quadratic constraints

I have a function, br, that takes multiple integer arguments (which for syntactic ease I collect in a list) and is Antisymmetric in any two arguments: ...
2
votes
1answer
51 views

The maximum value under the condition of complex constraint

Let a<0, (3x^2+a)(2x+b)>=0 be permanent established on (a, b), and what is the maximum value of b-a? Code 1 ...
0
votes
1answer
68 views

Finding the optimum value of a variable subject to a nonlinear constraint

I want to know whether or not the objective function I have defined is correct. The nonlinear constraint has to be satisfied while ζ varies from 0 < ζ <= 1/2. This is the first time I am trying ...
4
votes
3answers
585 views

Solving equation with constraints [closed]

Given the following set of equations: vEq = v == Pi (L R^2 + 1/12 L^3 Tan[Alpha]^2) oEq = o == 1/2 Pi (4 R (L + R) + L^2 Tan[Alpha]^2) I can solve this with <...
0
votes
1answer
60 views

Constraints thread over lists, for NMinimize

I have the following code ...
1
vote
0answers
53 views

Help generate useful solutions with Solve

I have the Equations for converting between cartesian and spherical polar coordinates eqns = {u*Sin[v]*Cos[w], u*Sin[v]*Sin[w], u*Cos[v]} == {x, y, z}; when I ...
0
votes
1answer
89 views

Solving a System with some Row Sum Constraints

My question is about solving a linear solving system with variables $m_{i,j}, 1\le i \le 20, j\le 1\le 10$ with (1) nonnegative entries, (2) zeros in prescribed locations, (3) given row sums. I'd ...
1
vote
0answers
70 views

Large Deviations on Mathematica

I am not an expert with Mathematica, and I really need your help. I am trying to do some large deviation theory with Mathematica and I have to minimize a piecewise function. How do I minimize a ...
3
votes
1answer
86 views

Finding the slowest decay to a value for a 2D function

I have a function acf2[x,y] that describes the auto-correlation function of a simulated real surface, with a peak at the origin (...
2
votes
1answer
97 views

Specify a domain of inversion for an inverse function

I'm playing around with some functions related to the Lambert W Function. Namely those of the form: $$W(x;a) = f^{-1}\left(x \left( e^{x} - a\right) \right)$$ And when $a$ gets too large, ...
1
vote
1answer
178 views

Constraints of vector element in FindMinimum

I try to find the local minimum of a function $$\Pi(\vec{d})$$ where $$\vec{d} = (d_1,d_2,...,d_n)$$ should satisfy $$d_i>0$$ for $i \in [1,n]$. I use the ...
0
votes
1answer
161 views

Minimizing with constraints

I would like to minimize the following function with respect to x: f[x_] := b/Sqrt[x] + ( 4.5 c x^6 Log[x] )^(1/3) where b ...
2
votes
1answer
325 views

how to find a function that minimizes the other function with a known function

The problem that i am facing is that of energy minimization. I have a function called totalenergy which is sum of two functions the elastic energy and the surface ...
2
votes
2answers
250 views

LinearFit, are constraints possible?

...
0
votes
1answer
158 views

NonlinearModelFit Returns Without Evaluating

When running NonlinearModelFit on certain functional forms, the method just returns the input expression without evaluating. For example: ...
3
votes
2answers
77 views

Setting up delayed constraint in Minimize, true for every t for each solution

I need a solution for t1, t2, flatR, flatC that holds r >= 2*c true for every t. I want ...
0
votes
1answer
764 views

plot a surface using plot3d etc within a sphere

I recently need to plot a 3d function that satisfies certain constraints, like x^2+y^2+z^2<=1 or things similar. So I wonder how to plot the part that only ...
2
votes
1answer
146 views

How to constrain Graphics scale? [closed]

As you can see, the scale of X and Y "adapts" to the scale of the circle. How can I stop the scale from increasing so as to create a "circle-spreading" effect? Code: ...
-1
votes
1answer
155 views

Finding optimal taxation policy- constrained optimization [closed]

I need to solve two constrained optimization problems where the second problem depends on the results of the first. The agents in my economy maximize utility: $$\max_{c,d,l} p\ln(c)+\ln(d)+\ln(l)$$ ...
3
votes
1answer
425 views

sum + Integral involving dirac delta function [closed]

I am trying to evaluate something along the lines of $$\sum_{n=0}^{10} \,\int\,dx\, x^2 \delta(x-n)$$ using NINtegrate[] and ...
7
votes
1answer
279 views
-1
votes
1answer
1k views

Constraining FindFit to a range

I'm trying to fit data, that I obtained from measurements, to a theoretical model. The way I see it, FindFit or NonlinearModelfit...
2
votes
1answer
114 views

Can I improve this sloppy code used with Manipulate?

I'm not an advanced user of Mathematica, and yet I managed to get the Manipulate command work to do something interesting. The problem I have is that I have the ...
3
votes
2answers
1k views

How to plot a volume for triple integral enclosed by surfaces

My main issue (multivariate calculus), I want to plot the body made within the surfaces y + z = 4, y = 4 - x^2, ...
3
votes
2answers
341 views

Switching Differential Equation in NDSolve

I am trying to solve the following system of differential equations using NDSolve: $\dot{z}_t=.5(1-z_t)$ $\dot{y}_t=.05y_t+z_t-x_t$ subject to the following constraint: $-y_t-z_t\le0$ where $z_t$ ...