ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 03 Jan 2014 10:49:49 +0100checking left hand side of an equationhttps://ask.sagemath.org/question/10880/checking-left-hand-side-of-an-equation/Hi,
I'd like to check if the operation applied to an equation yields the solution as follow:
a=var('a')
eq= a+7==6
print eq.lhs()
LHS =(eq-7).lhs()
print LHS
LHS==a
a is a
LHS is a
I was waiting that the line *LHS==a* yields **True** or **False**. How can I check that LHS contains the variable **a**?
edit
`LHS is a`
yields **False**jeanpatFri, 03 Jan 2014 10:49:49 +0100https://ask.sagemath.org/question/10880/how to use variables (`var`)https://ask.sagemath.org/question/10209/how-to-use-variables-var/I thought they are complex by default. But even when I try to force the domain to be complex, I always get `x.conjugate().simplify() == x`. Why? See also below:
sage: t1,t2,t4 = var("t1 t2 t4")
sage: t2.conjugate().simplify()
t2
sage: t1,t2,t4 = var("t1 t2 t4", domain="complex")
sage: t2
t2
sage: t2.is_real()
False
sage: t2.conjugate().simplify()
t2
sage: (t2.real()*2 - t2).simplify()
t2
sage: t2.real().simplify()
t2
sage: t2.imag().simplify()
0
Albert ZeyerMon, 10 Jun 2013 09:27:53 +0200https://ask.sagemath.org/question/10209/Symbolic variable declarationhttps://ask.sagemath.org/question/8251/symbolic-variable-declaration/what is the difference, when I declare variable like this
a, b, c = var('a, b, c')
or just like this
var('a, b, c')
?OndraSun, 31 Jul 2011 13:57:48 +0200https://ask.sagemath.org/question/8251/