ConceptPythonBeginner Computer algebra: formulas as trees, exact until you ask for digits print(f"(x + 1)**20 expanded: {len(sp.expand((x + 1)**20).args)} terms")print(f"determinant of a symbolic {n} x {n} matrix: {len(sp.expand(M.det(method='berkowitz')).args)} terms")
ToolPythonBeginner SymPy from the ground up: where the pendulum's 1.74 % comes from print(sp.expand(4 * phi_integral / T0))ratio = sp.expand(4 * phi_integral / T0).subs(k, sp.sin(theta0 / 2))