# Questions tagged [constraint]

The tag has no usage guidance.

88 questions
Filter by
Sorted by
Tagged with
30 views

...
60 views

### NonlinearModelFit failing because varible range [on hold]

I'm trying to fit a specific equation to a plot of points but its failing because the equation has a square root in it and I need to keep the values of x between a certain range. I know how to do this ...
387 views

### How to set a tolerance level for equality constraints

Given two equality constraints: x+y==250 and z+p==65 where x=190, y=50, z=45, p=15, I want ...
35 views

### Maximize violate constraint of non approximated function

here is my code Maximize[{-(10/17) - x + (20 (1 + x))/(17 (2 + x)), 0 <= x <= 1.5}, x] The result I got: {6.66134*10^-16, {x -> -9.79755*10^-16}} As you ...
221 views

### Problems with solving PDEs

I am using NDSolve to solve the two equations: ...
131 views

### Linear programming with lazy constraints

Does Mathematica offer any means for solving linear programming problems with "lazy constraints", as described e.g. here? While I am not very familiar with linear programming, my understanding of the ...
88 views

### Solving a stiff nonlinear ODE system

The system I am trying to solve is simple, but looks pretty stiff and I have unsuccessfully tried to solve it with StiffnessSwitching. It is the following one: <...
17 views

### Numerical Maximization with Alternating Sum

I need to maximize a function that involves an alternating sum and a set of constraints. I have tried the following code: NMaximize[{(-1)^{m}*n!, n + m == 7, m > 0, n > 0}, {m, n}] However, the ...
186 views

### Simple Solve[{y == 5 + 2 x + x^a}, {x}] not working?

I am trying to find a general expression for x, for the following equation y = 5 + 2 x + x^a, but Solve cannot accomplish this. ...
836 views

### RandomInteger with equal number of 1 and -1

I want to generate a list of random integers with only three values 1,0,-1. I know it can be done through RandomInteger[{-1, 1}, n]. How can I impose constraint on this list so that every integers in ...
44 views

### Constraining a parametric plot

I have the following parametric plot: ...
77 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 ...
60 views

189 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 ...
341 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 ...