# recurrence_growth function

The order of growth of a divide-and-conquer recurrence, as big_theta of a simple function.

## How to write it

### recurrence_growth(equations, unknown, variable)

The class big_theta(g) for large n, by the master or Akra-Bazzi theorem with its conditions, else as written.

**equations**

The recurrence, such as t(n) = 2 t(n/2) + n. A list that includes starting values like t(1) = 1 is read too. Takes an equation, or a list of equations in brackets.

**unknown**

The unknown to solve for, such as y. Takes a variable, or a list of variables.

**variable**

The variable to work with, a name such as x. Takes a variable, or a list of variables.

## Examples

- $\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)`

  In the solver, `recurrence_growth(t(n) = 2 t(n/2) + n, t, n)` gives `big_theta(n*ln(n))`.

  [Open in the solver](https://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)`

  In the solver, `recurrence_growth(t(n) = t(n/3) + t(2n/3) + n, t, n)` gives `big_theta(n*ln(n))`.

  [Open in the solver](https://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)`

  In the solver, `recurrence_growth(t(n) = t(sqrt(n)) + 1, t, n)` gives `big_theta(ln(ln(n)))`.

  [Open in the solver](https://hilberon.com/?q=recurrence_growth%28t%28n%29%20%3D%20t%28sqrt%28n%29%29%20%2B%201%2C%20t%2C%20n%29)

## Functions its examples use

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

  Square root; sqrt(x) is the power x^(1/2).

## Related functions

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

  Solve a recurrence relation for a sequence.
- [solve_ode](https://hilberon.com/library/solve_ode)

  Solve a differential equation, or a system, with optional initial conditions.

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