Ask Your Question

Solve in inequalities return two separate solutions. Could they be gathered ?

asked 2020-10-08 06:49:01 +0200

Cyrille gravatar image

updated 2020-10-08 06:55:47 +0200

In the following code, I wonder if there is a way to ask solve() to return only one solution with $\leq$ and not one for $<$ and one for $=$.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-10-08 08:31:09 +0200

Emmanuel Charpentier gravatar image

Sage (9.2.rc0) does exactly what you want :

sage: %cpaste
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:x_1, x_2=var('x_1','x_2')
[[x_2 > (8/9)]]
[[x_2 >= (8/9)]]

The first line is the (single-line) solution to your first inequatio, the second line is the (single-line) solution to your second inequation.

Would you have fries with that ?

edit flag offensive delete link more


I use sagecell and in sage cell for pint(l2), the result is :

$left[\left[x_2 =-\frac{5}{6} x_1 -\frac{4}{3}\right],\left[x_2 =-\frac{5}{6} x_1 -\frac{4}{3}\right]\right]$

Cyrille gravatar imageCyrille ( 2020-10-08 11:31:39 +0200 )edit


But Sagecell runs 9.1 ; I run 9.2.rc0. The inequality processing seems to have been somewhat enhanced. See the link...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-10-08 11:50:54 +0200 )edit

Emmanuel, I try to make work in line. A huge effort for my student. It takes nearly all my time. Is there any hope that sagecell be powered rapidly by 9.2 ? Do you know who I need to contact because I have seen some differences between notebooks and sagecells. In all cases , one more time thanks for your implications. I am learning Python and Sagemath on the spot. But I have no choice. I will add that up to now, version 9.2 isn't compiled for windows.

Cyrille gravatar imageCyrille ( 2020-10-08 17:17:43 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-10-08 06:49:01 +0200

Seen: 162 times

Last updated: Oct 08 '20