# 求方程的全部解（Solve all solutions of equations，solve_all）

描述方程和不等式的完整解集。

使用这个函数时，求解器只要找到步骤就会展示。

## 怎么写

### solve_all(condition, variables)

**condition**

要求解的内容。接受一个方程或放在方括号中的方程列表。

**variables**

一个变量，或变量列表，例如 \[x, y\]。接受一个变量或变量列表。

### solve_all(condition, variables, domain = real|complex)

在实数或复数范围内。

**condition**

要求解的内容。接受一个方程或放在方括号中的方程列表。

**variables**

一个变量，或变量列表，例如 \[x, y\]。接受一个变量或变量列表。

**domain = real|complex**

在哪个范围内计算：实数或复数。接受real或complex。

## 示例

- $\displaystyle x^{2}-1 = 0 \Rightarrow x = -1 \text{ or } x = 1$

  `solve_all(x^2 - 1 = 0, x)`

  在求解器中，`solve_all(x^2 - 1 = 0, x)` 的结果是 `x = -1 or x = 1`。

  [在求解器中打开](https://zh.hilberon.com/?q=solve_all%28x%5E2%20-%201%20%3D%200%2C%20x%29)
- $\displaystyle \sin(x) = 0 \Rightarrow C_{1} \in \mathbb{Z} \text{ and } (x = 2 \pi C_{1} \text{ or } x = \pi+2 \pi C_{1})$

  `solve_all(sin(x) = 0, x)`

  在求解器中，`solve_all(sin(x) = 0, x)` 的结果是 `C(1) : integer and (x = 2pi*C(1) or x = pi + 2pi*C(1))`。

  [在求解器中打开](https://zh.hilberon.com/?q=solve_all%28sin%28x%29%20%3D%200%2C%20x%29)
- $\displaystyle x^{2}-3 x-4 > 0 \Rightarrow x < -1 \text{ or } x > 4$

  `solve_all(x^2 - 3x - 4 > 0, x)`

  在求解器中，`solve_all(x^2 - 3x - 4 > 0, x)` 的结果是 `x < -1 or x > 4`。

  [在求解器中打开](https://zh.hilberon.com/?q=solve_all%28x%5E2%20-%203x%20-%204%20%3E%200%2C%20x%29)
- $\displaystyle x^{2}+1 = 0 \Rightarrow x = i \text{ or } x = -i$

  `solve_all(x^2 + 1 = 0, x, domain = complex)`

  在求解器中，`solve_all(x^2 + 1 = 0, x, domain = complex)` 的结果是 `x = i or x = -i`。

  [在求解器中打开](https://zh.hilberon.com/?q=solve_all%28x%5E2%20%2B%201%20%3D%200%2C%20x%2C%20domain%20%3D%20complex%29)

## 示例中用到的函数

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

  角度的正弦，角度以弧度计。

## 相关函数

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

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

  对一到多个未知量求解方程。
- [numeric_solve](https://zh.hilberon.com/library/numeric_solve)

  数值求解方程。
- [linear_solve](https://zh.hilberon.com/library/linear_solve)

  求解由矩阵和右端项给出的线性方程组 A x = b。
- [eliminate](https://zh.hilberon.com/library/eliminate)

  从方程组中消去变量，留下只含其他变量的方程。
- [find_instance](https://zh.hilberon.com/library/find_instance)

  满足条件的一个点；不存在时为空列表。

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