Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 2 years ago

Juanjo gravatar image

Just compare the solutions returned with solution_dict=True and solution_dict=False (which is the default):

sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=True)
[{0: b,
  a: b,
  b_2: a_2,
  -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2: 0}]
sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=False)
[[0 < a, a < b, b_2 < a_2, 0 < b, -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2 > 0]]

Hence, the : between keys and values means < in the first three elements of the dictionary and > in the last one.

click to hide/show revision 2
No.2 Revision

Just compare the solutions returned with solution_dict=True and solution_dict=False (which is the default):

sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=True)
[{0: b,
  a: b,
  b_2: a_2,
  -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2: 0}]
sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=False)
[[0 < a, a < b, b_2 < a_2, 0 < b, -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2 > 0]]

Hence, the : between keys and values means < in the first three elements of the dictionary and > in the last one. By the way, I think that your inequalities can be compressed to 0<a<a1<a2a<b<b1<b2<a2(a1b1)2<(ba)(b2a2)