Questions tagged [inequalities]
69 questions
1
vote
0 answers
How to use inequalities in julia with SymPy
How to use inequalities in julia with SymPy?
no does works:
using SymPy
@syms x
ineq = (x+1)/(x-1) >=0

Cientista Mirim Ciência
- 175
- 1
- 8
1
vote
1 answer
how to solve under-determined system of inequalities with multiply variables
I am trying to find a way to solve system of linear inequalities such as:
c>0
y+c<0
x+c>0
x+y+c<0
w+c>0
w+y+c>0
w+x+c>0
w+x+y+c<0
I have had no luck in finding a fast computational method to solve them. I have tried using wolfram alpha. It works…

Hisenbeeeerg
- 33
- 6
1
vote
1 answer
Proving x >= a /\ x <= a -> x = a
How would one go about proving the following
Theorem T: forall x, a: nat, x >= a /\ x <= a -> x = a.
in Coq?

RainbowDash
- 13
- 2
1
vote
0 answers
Prolog with inequalities
I found this inequality solving program from some Internet source.It works well.This is the program.
:-use_module(library(clpq)).
dec_inc(Left,Right):-
copy_term(Left-Right,CopyLeft-CopyRight).
tell_cs(CopyLeft).
max(CopyRight,Right,Leq).
…

ict
- 95
- 1
- 5
1
vote
2 answers
Making sense of inequality comparisons between a number and a boolean
The type comparison chart in PHP documentation shows the result of both strict === and loose == comparisons. There is nothing about inequality comparisons:
true < 0 => false
0 < true => true
true < 1 => false
1 < true => false
true < -1 => false
-1…

Question Overflow
- 10,925
- 18
- 72
- 110
0
votes
2 answers
How do you reduce compound inequalities in sympy? (4 < x - 8 < 10)
Using sympy solve() or reduce_inequalities() works fine for non compound inequalities like 2 - 6 * x <= -4 but it cannot do compound ones.
Is there a different sympy function or a different import that can solve a compound inequality? I can't seem…

Kevin Schnaubelt
- 3
- 2
0
votes
2 answers
How to solve the following 3-dimensional system of non-linear inequalities in R?
I need to solve the following system of non-linear inequalities:
x*y >= 420
x*z >= 14
x*y*z < 5000
I have tried to find a similar question/solution or package that helps, but I struggle to apply it to that specific case.
The expected outcome should…

FlameAA
- 3
- 2
0
votes
2 answers
Is it possible to write an inequality with two arguments to be evaluated on one side in Python?
Is there a cleaner way of writing the following:
(a > b) and (a > c)
The following doesn't work, but this might illustrate the kind of thing I'm looking for:
a > [b, c]

Ben
- 3
- 2
0
votes
0 answers
Reducing multiple inequalities to one in python
I have two equalities and an inequality relationship between them. I would like to simplify those to a single inequality (I do not need to solve the unknowns). Here is my code:
from sympy.abc import x,y
from sympy import reduce_inequalities
eq1 =…

maizethen2424
- 11
- 3
0
votes
3 answers
Solving for single variable inequalities python
I have a simple equation that can easily be solved by hand but I need to solve using python.
Solve for x:
x < 9
x > 4.5
x < 5.6
x > 4.8
So we can easily see x=5 is one of the acceptable solutions. But how would I go about using python to solve for…

user9211966
- 33
- 4
0
votes
1 answer
How to access all matrix elements in Sympy and compare them to another matrix (i.e. greater than or less than)?
I'm looking for a way to compare all elements in a matrix with another matrix of the same size in a while loop by using Sympy.
I know that singular elements for Sympy matrices can be compared via the following (for example the first element is…

Hendrix13
- 127
- 8
0
votes
1 answer
Replace inequalities in a dataframe with different types of elements in R
I have a dataframe that involves several columns, in which there are many instances where inequalities are present. What I would like to have, is an R script that will identify these inequalities and replace them with actual values. More specific,…
0
votes
1 answer
Solving simultaneous equations/inequalities
I need to solve a mix of equations/inequalities:
a1 + a2 + a3 >= 50
b1 + b2 + b3 <= 40
c1 + c2 + c3 <= 10
a1 + b1 + c1 = 50
a2 + b2 + c2 = 35
a3 + b3 + c3 = 15
There are nine variables and six equations/inequalities, but I will be zeroing three…

Greg3er
- 27
- 6
0
votes
1 answer
How to check whether a solution set exists, which satisfies a set of linear inequalities?
Is it possible to determine whether a set of solution exists that satisfies a set of linear inequalities outside Matlab (programmatically) Just a true/false would be enough but is it possible to do using a library in JavaScript (preferably as it is…

mani9418
- 141
- 1
- 1
- 9
0
votes
1 answer
How to combine two inequality answers into the same line
So basically I'm being asked in class to solve an inequality -1<(7-x)/3<=4, and the teacher wants the answer of what will become two sets of code on the same line using solveset.
So this ends up being solveset(-1<((7-x)/3),x,domain=S.Reals) and…