Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 7 years ago

ensaba gravatar image

How to assume the sum of some variables is equal to a constant?

Suppose I have this expression:

a(t1+t2+t31)b

This can be simplified to 0 if we assume t1+t2+t3=1.

How can I accomplish this in Sage? I've tried:

var('t1', 't2', 't3', 'a', 'b')
expr1 = ((t1 + t2 + t3 - 1)*a)/b
expr1.full_simplify()

assume(t1 + t2 + t3 == 1)
expr1.full_simplify()

I expected the second call tofull_simplify() to return 0 but it returned the same result as the first call, which is at1+at2+at3ab