For 9 terms, mpmath.fac gives me 2.14373016357422 and sympy.factorial gives me 1.88592361267614 (also mpmath.fac is much slower; SymPy in general handles exact integers better than floats). Given the two, I'm inclined to believe the SymPy version, since it deals with exact numbers, so there is no chance for numerical instability until the end (and the intermediate T_rfe has a lot of very small floats, so I think there is indeed a lot of instability going on).
Some other notes on your code:
- Si is already implemented in SymPy. You can use Si(x).series(x, 0, n).removeO() to get the series of Si up to x**n.
- Just use sympy.pi. It will know how to evaluate itself in the end.
- Use T_rfe.evalf(subs={N: 8}) at the end to evaluate the expression, or if you want to use numpy, use lambdify. If you are worried about numerical instability you can increase the precision (at the end) by passing an argument to evalf(), like T_rfe.evalf(100, subs={N: 8}).
Aaron Meurer