# 消元（Eliminate variables from equations，eliminate）

从方程组中消去变量，留下只含其他变量的方程。

## 怎么写

### eliminate(equations, eliminate)

**equations**

方程组，放在括号里。接受放在方括号中的方程列表。

**eliminate**

要消去的变量。接受一个变量或变量列表。

## 示例

- $\displaystyle \operatorname{eliminate}(\left[ x+y = 1, x-y = 0 \right], \left[ y \right]) = \left[ x-\frac{1}{2} = 0 \right]$

  `eliminate([x + y = 1, x - y = 0], [y])`

  在求解器中，`eliminate([x + y = 1, x - y = 0], [y])` 的结果是 `[x - 1/2 = 0]`。

  [在求解器中打开](https://zh.hilberon.com/?q=eliminate%28%5Bx%20%2B%20y%20%3D%201%2C%20x%20-%20y%20%3D%200%5D%2C%20%5By%5D%29)

## 相关函数

- [find_instance](https://zh.hilberon.com/library/find_instance)

  满足条件的一个点；不存在时为空列表。
- [solve_identity](https://zh.hilberon.com/library/solve_identity)

  找出使方程对变量的每个取值都成立的参数值。
- [find_root](https://zh.hilberon.com/library/find_root)

  从起始值出发，用数值方法求一个根。
- [solve_all](https://zh.hilberon.com/library/solve_all)

  描述方程和不等式的完整解集。
- [least_squares](https://zh.hilberon.com/library/least_squares)

  A x = b 的最小二乘解。
- [solve](https://zh.hilberon.com/library/solve)

  对一到多个未知量求解方程。

---
Source: https://zh.hilberon.com/library/eliminate
