adjusted to latest sympy version
tests