# Revision history [back]

### Compare symbolic expressions

Following is the problem I am trying to solve:

I have multiple complex symbolic expressions f1(x1,x2,...,xn),f2(x1,x2,...,xn),...,fn(x1,x2,...,xn) which are functions of symbolic variables x1,x2,...,xn. I also have some constraints for the symbolic variables, e.g. 0<x1, 2<x2,="" x2="" is="" integer,="" etc.="" how="" can="" i="" find="" out="" for="" two="" selected="" symbolic="" expressions="" which="" one="" is="" larger="" for="" given="" constraints?<="" p="">

I've tried something like:

 assume(0<x1,2<x2)< p=""> 

assume(x2,'integer')



bool(f1>f2) code

It seems to work for more simple symbolic expressions. For more complex symbolic expressions (where a solution definitely exists) SAGE seems not to be able to compare the expressions. Is there a way to overcome this?

### Compare symbolic expressions

Following is the problem I am trying to solve:

I have multiple complex symbolic expressions f1(x1,x2,...,xn),f2(x1,x2,...,xn),...,fn(x1,x2,...,xn) which are functions of symbolic variables x1,x2,...,xn. I also have some constraints for the symbolic variables, e.g. 0<x1, 2<x2,="" x2="" is="" integer,="" etc.="" how="" can="" i="" find="" out="" for="" two="" selected="" symbolic="" expressions="" which="" one="" is="" larger="" for="" given="" constraints?<="" p="">

I've tried something like:

 assume(0<x1,2<x2)< p=""> 

assume(x2,'integer')



bool(f1>f2) code

It seems to work for more simple symbolic expressions. For more complex symbolic expressions (where a solution definitely exists) SAGE seems not to be able to compare the expressions. Is there a way to overcome this?

### Compare symbolic expressions

Following is the problem I am trying to solve:

I have multiple complex symbolic expressions f1(x1,x2,...,xn),f2(x1,x2,...,xn),...,fn(x1,x2,...,xn) which are functions of symbolic variables x1,x2,...,xn. I also have some constraints for the symbolic variables, e.g. 0<x1, 2<x2,="" x2="" is="" integer,="" etc.="" how="" can="" i="" find="" out="" for="" two="" selected="" symbolic="" expressions="" which="" one="" is="" larger="" for="" given="" constraints?<="" p=""> 0 is smaller than x1, 2 is smaller than x2, x2 is integer, etc. How can I find out for two selected symbolic expressions which one is larger for given constraints?

I've tried something like:

 assume(0<x1,2<x2)< p=""> 

assume(x2,'integer')



bool(f1>f2)

It seems to work for more simple symbolic expressions. For more complex symbolic expressions (where a solution definitely exists) SAGE seems not to be able to compare the expressions. Is there a way to overcome this? 4 retagged

### Compare symbolic expressions

Following is the problem I am trying to solve:

I have multiple complex symbolic expressions f1(x1,x2,...,xn),f2(x1,x2,...,xn),...,fn(x1,x2,...,xn) which are functions of symbolic variables x1,x2,...,xn. I also have some constraints for the symbolic variables, e.g. 0 is smaller than x1, 2 is smaller than x2, x2 is integer, etc. How can I find out for two selected symbolic expressions which one is larger for given constraints?

I've tried something like:

 assume(0<x1,2<x2)< p=""> 

assume(x2,'integer')



bool(f1>f2)

It seems to work for more simple symbolic expressions. For more complex symbolic expressions (where a solution definitely exists) SAGE seems not to be able to compare the expressions. Is there a way to overcome this? 5 retagged

### Compare symbolic expressions

Following is the problem I am trying to solve:

I have multiple complex symbolic expressions f1(x1,x2,...,xn),f2(x1,x2,...,xn),...,fn(x1,x2,...,xn) which are functions of symbolic variables x1,x2,...,xn. I also have some constraints for the symbolic variables, e.g. 0 is smaller than x1, 2 is smaller than x2, x2 is integer, etc. How can I find out for two selected symbolic expressions which one is larger for given constraints?

I've tried something like:

 assume(0<x1,2<x2)< p=""> 

assume(x2,'integer')



bool(f1>f2)

It seems to work for more simple symbolic expressions. For more complex symbolic expressions (where a solution definitely exists) SAGE seems not to be able to compare the expressions. Is there a way to overcome this?