# recurrence_growth 函数

分治递推式的增长阶，以简单函数的 big_theta 表示。

## 怎么写

### recurrence_growth(equations, unknown, variable)

n 很大时的类 big_theta(g)，由主定理或 Akra-Bazzi 定理给出并附带其条件；否则保持原样。

**equations**

递推式，例如 t(n) = 2 t(n/2) + n。也可读取包含初始值（如 t(1) = 1）的列表。接受一个方程或放在方括号中的方程列表。

**unknown**

要求解的未知数，例如 y。接受一个变量或变量列表。

**variable**

要处理的变量，是一个名称，例如 x。接受一个变量或变量列表。

## 示例

- $\displaystyle t(n) = 2 t\left(\frac{n}{2}\right)+n \Rightarrow \Theta(n \ln(n))$

  `recurrence_growth(t(n) = 2 t(n/2) + n, t, n)`

  在求解器中，`recurrence_growth(t(n) = 2 t(n/2) + n, t, n)` 的结果是 `big_theta(n*ln(n))`。

  [在求解器中打开](https://zh.hilberon.com/?q=recurrence_growth%28t%28n%29%20%3D%202%20t%28n%2F2%29%20%2B%20n%2C%20t%2C%20n%29)
- $\displaystyle t(n) = t\left(\frac{n}{3}\right)+t\left(\frac{2 n}{3}\right)+n \Rightarrow \Theta(n \ln(n))$

  `recurrence_growth(t(n) = t(n/3) + t(2n/3) + n, t, n)`

  在求解器中，`recurrence_growth(t(n) = t(n/3) + t(2n/3) + n, t, n)` 的结果是 `big_theta(n*ln(n))`。

  [在求解器中打开](https://zh.hilberon.com/?q=recurrence_growth%28t%28n%29%20%3D%20t%28n%2F3%29%20%2B%20t%282n%2F3%29%20%2B%20n%2C%20t%2C%20n%29)
- $\displaystyle t(n) = t(\sqrt{n})+1 \Rightarrow \Theta(\ln(\ln(n)))$

  `recurrence_growth(t(n) = t(sqrt(n)) + 1, t, n)`

  在求解器中，`recurrence_growth(t(n) = t(sqrt(n)) + 1, t, n)` 的结果是 `big_theta(ln(ln(n)))`。

  [在求解器中打开](https://zh.hilberon.com/?q=recurrence_growth%28t%28n%29%20%3D%20t%28sqrt%28n%29%29%20%2B%201%2C%20t%2C%20n%29)

## 示例中用到的函数

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

  平方根；sqrt(x) 即幂 x^(1/2)。

## 相关函数

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

  求解数列的递推关系。
- [solve_ode](https://zh.hilberon.com/library/solve_ode)

  求解微分方程或方程组，可附带初始条件。

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