conditions among the variables
Suppose I am defining some variables in sagemath. How can I give conditions among the variables such that the condition is applied in the future calculations?
Thank You.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 5 years ago
Seen: 791 times
Last updated: Nov 27 '19
This can be done (with some effort) in many cases, depending on the type of condition. Are the conditions linear equations, polynomial equations, trigonometric equations? An example would be great.
Yes, please give an example of the kind of problem you would like to solve. You can do things like
assume(x > 0)
orassume(x, 'complex')
but whether or not that has any effect depends on what you're trying to do.Suppose I have variables a,b,c,d,e and I have a polynomial with these five variables.. I want to simplify the polynomial using the condition that a+b = d+e.
@user789 if that's all, then just substitute e.g. e=a+b−d into your polynomial.
i want sage to do that for me!