p_star_1
znd the expression you seek are not equal :
sage: SEx=c/2 + (f^2 - f - 2)/(2*(f^2 - 2*f - 1 ))
sage: (p_star_1-SEx).expand().is_zero()
False
which is more obvious if you ask a typeset form :
sage: view((p_star_1/SEx).expand().factor())
which displays :
(cf2−2cf+f2−c−2f)(f2−2f−1)2cf2−2cf+f2−c−f−2
The problem might be
sage: p_star_1.operands()
[(c + 1)*f^2 - (2*c + 1)*f - c - f, f^2 - 2*f - 1, 1/2]
sage: p_star_1.operands()[0].collect(f)
(c + 1)*f^2 - 2*(c + 1)*f - c
![]() | 2 | No.2 Revision |
p_star_1
znd the expression you seek are not equal :
sage: SEx=c/2 + (f^2 - f - 2)/(2*(f^2 - 2*f - 1 ))
sage: (p_star_1-SEx).expand().is_zero()
False
which is more obvious if you ask a typeset form :
sage: view((p_star_1/SEx).expand().factor())
which displays :
(cf2−2cf+f2−c−2f)(f2−2f−1)2cf2−2cf+f2−c−f−2
The problem might be
sage: p_star_1.operands()
[(c + 1)*f^2 - (2*c + 1)*f - c - f, f^2 - 2*f - 1, 1/2]
sage: p_star_1.operands()[0].collect(f)
(c + 1)*f^2 - 2*(c + 1)*f - c
Maybe another typo ?