Solve integral equations symbolically in Python