Optimization, Sympy