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 to find anything in the sympy docs or on Google.
solveset() function can solve both simple and compound inequalities.
For example, to solve the compound inequality (2 - 6x <= -4) AND (3x + 1 > 4), you can use the following code:
you can use linsolve() function to solve system of linear equations and inequalities.