First time here? Check out the FAQ!
answered 2020-04-05 15:30:32 +0100
Replace s.factor() by QQ(s).factor() to convert the symbolic expression to a rational and to factor that rational. Indeed, SR(1/6).factor() yields 1/6 while QQ(1/6).factor() yields 2^-1 * 3^-1.
s.factor()
QQ(s).factor()
SR(1/6).factor()
1/6
QQ(1/6).factor()
2^-1 * 3^-1