1 | initial version |
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 :
$$ \frac{{\left(c f^{2} - 2 \, c f + f^{2} - c - 2 \, f\right)} {\left(f^{2} - 2 \, f - 1\right)}^{2}}{c f^{2} - 2 \, c f + f^{2} - 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 :
$$ \frac{{\left(c f^{2} - 2 \, c f + f^{2} - c - 2 \, f\right)} {\left(f^{2} - 2 \, f - 1\right)}^{2}}{c f^{2} - 2 \, c f + f^{2} - 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 ?