# 数值求根（Numerical root finding，find_root）

从起始值出发，用数值方法求一个根。

## 怎么写

### find_root(equation, x = a)

**equation**

一个方程，或在根处取零的表达式。接受一个方程或一个表达式。

**x = a**

变量以及从哪里开始。接受被赋值的变量。

## 示例

- $\displaystyle \cos(x) = x \Rightarrow x = 0.7390851332151607$

  `find_root(cos(x) = x, x = 1)`

  在求解器中，`find_root(cos(x) = x, x = 1)` 的结果是 `[x -> 0.7390851332151607]`。

  [在求解器中打开](https://zh.hilberon.com/?q=find_root%28cos%28x%29%20%3D%20x%2C%20x%20%3D%201%29)

## 示例中用到的函数

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

  以弧度表示的角度的余弦。

## 相关函数

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

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

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

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

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

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

  找出使方程对变量的每个取值都成立的参数值。

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