# Limit (limit)

Limit of an expression as a variable approaches a point.

With this function, the solver shows the steps whenever it finds them.

## How to write it

### limit(f, x = a)

The limit as x approaches a.

**f**

The expression or function to work on. Takes an expression.

**x = a**

The variable and the point it approaches; the point may be inf. Takes a variable set to a value.

### limit(f, x = a, direction = left|right)

The limit from one side of the point.

**f**

The expression or function to work on. Takes an expression.

**x = a**

The variable and the point it approaches. Takes a variable set to a value.

**direction = left|right**

Which side to approach from: left or right. Takes left or right.

## Examples

- $\displaystyle \lim_{x \to 0} \frac{\sin(x)}{x} = 1$

  `limit(sin(x)/x, x = 0)`

  In the solver, `limit(sin(x)/x, x = 0)` gives `1`.

  [Open in the solver](https://hilberon.com/?q=limit%28sin%28x%29%2Fx%2C%20x%20%3D%200%29)
- $\displaystyle \lim_{x \to \infty} \left(1+\frac{1}{x}\right)^{x} = e$

  `limit((1 + 1/x)^x, x = inf)`

  In the solver, `limit((1 + 1/x)^x, x = inf)` gives `e`.

  [Open in the solver](https://hilberon.com/?q=limit%28%281%20%2B%201%2Fx%29%5Ex%2C%20x%20%3D%20inf%29)
- $\displaystyle \lim_{x \to 0^{+}} \frac{1}{x} = \infty$

  `limit(1/x, x = 0, direction = right)`

  In the solver, `limit(1/x, x = 0, direction = right)` gives `inf`.

  [Open in the solver](https://hilberon.com/?q=limit%281%2Fx%2C%20x%20%3D%200%2C%20direction%20%3D%20right%29)

## Functions its examples use

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

  Sine of an angle in radians.

## Related functions

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

  Approximate a definite integral numerically.
- [laplacian](https://hilberon.com/library/laplacian)

  Laplacian of an expression: the sum of its second partial derivatives.
- [residue](https://hilberon.com/library/residue)

  Residue of an expression at a point.
- [jacobian](https://hilberon.com/library/jacobian)

  Jacobian matrix of a list of expressions: their partial derivatives.
- [total_diff](https://hilberon.com/library/total_diff)

  Total derivative of an expression with respect to a variable.
- [integrate](https://hilberon.com/library/integrate)

  Antiderivative of an expression, or its definite integral over a range.

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