Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 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 :

(cf22cf+f2c2f)(f22f1)2cf22cf+f2cf2

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
click to hide/show revision 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 :

(cf22cf+f2c2f)(f22f1)2cf22cf+f2cf2

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 ?