def test_two_variables(self):
"""
It can eliminate ``x, y`` from the system
``(a = 3x - 4y, b = 4x + 5y, c = 6x + 2y)``.
"""
equations = [
sympy.Eq(a, 3 * x - 4 * y),
sympy.Eq(b, 4 * x + 5 * y),
sympy.Eq(c, 6 * x + 2 * y),
]
new_equations = vadouvan.symbolic_utils.eliminate(equations, [x, y])
assert len(new_equations) == 1
assert new_equations[0].free_symbols == {a, b, c}
评论列表
文章目录