In mathematics, a limit is the value that a function (or sequence) "approaches" as the input (or index) "approaches" some value. Limits are essential to calculus (and mathematical analysis in general) and are used to define continuity, derivatives, and integrals.
In formulas, a limit is usually written as
and is read as "the limit of f of n as n approaches c equals L". The fact that a function f(n) approaches the limit L as n approaches c is sometimes denoted by a right arrow (->), as in
means that f(x) can be made to be as close to L as desired by making x sufficiently close to c. In that case, the above equation can be read as "the limit of f of x, as x approaches c, is L".
Augustin-Louis Cauchy in 1821, followed by Karl Weierstrass, formalized the definition of the limit of a function which became known as the (?, ?)-definition of limit. The definition uses ? (the lowercase Greek letter epsilon) to represent any small positive number, so that "f(x) becomes arbitrarily close to L" means that f(x) eventually lies in the interval (L - ?, L + ?), which can also be written using the absolute value sign as || < ?. The phrase "as x approaches c" then indicates that we refer to values of x whose distance from c is less than some positive number ? (the lower case Greek letter delta)--that is, values of x within either (c - ?, c) or (c, c + ?), which can be expressed with 0 < || < ?. The first inequality means that the distance between x and c is greater than 0 and that x ? c, while the second indicates that x is within distance ? of c.
The above definition of a limit is true even if f(c) ? L. Indeed, the function f need not even be defined at c.
For example, if
then f(1) is not defined (see division by zero), yet as x moves arbitrarily close to 1, f(x) correspondingly approaches 2:
Thus, f(x) can be made arbitrarily close to the limit of 2 just by making x sufficiently close to 1.
In other words,
This can also be calculated algebraically, as for all real numbers x ? 1.
Now since x + 1 is continuous in x at 1, we can now plug in 1 for x, thus .
In addition to limits at finite values, functions can also have limits at infinity. For example, consider
As x becomes extremely large, the value of f(x) approaches 2, and the value of f(x) can be made as close to 2 as one could wish just by picking x sufficiently large. In this case, the limit of f(x) as x approaches infinity is 2. In mathematical notation,
Consider the following sequence: 1.79, 1.799, 1.7999,... It can be observed that the numbers are "approaching" 1.8, the limit of the sequence.
which is read as
Intuitively, this means that eventually all elements of the sequence get arbitrarily close to the limit, since the absolute value || is the distance between an and L. Not every sequence has a limit; if it does, it is called convergent, and if it does not, it is divergent. One can show that a convergent sequence has only one limit.
The limit of a sequence and the limit of a function are closely related. On one hand, the limit as n goes to infinity of a sequence a(n) is simply the limit at infinity of a function defined on the natural numbers n. On the other hand, a limit L of a function f(x) as x goes to infinity, if it exists, is the same as the limit of any arbitrary sequence an that approaches L, and where an is never equal to L. One such sequence would be L + 1/n.
In non-standard analysis (which involves a hyperreal enlargement of the number system), the limit of a sequence can be expressed as the standard part of the value of the natural extension of the sequence at an infinite hypernatural index n=H. Thus,
Here the standard part function "st" rounds off each finite hyperreal number to the nearest real number (the difference between them is infinitesimal). This formalizes the natural intuition that for "very large" values of the index, the terms in the sequence are "very close" to the limit value of the sequence. Conversely, the standard part of a hyperreal represented in the ultrapower construction by a Cauchy sequence , is simply the limit of that sequence:
In this sense, taking the limit and taking the standard part are equivalent procedures.
A formal definition of convergence can be stated as follows. Suppose as goes from to is a sequence that converges to , with for all . If positive constants and exist with
then as goes from to converges to of order , with asymptotic error constant
Given a function with a fixed point , there is a nice checklist for checking the convergence of the sequence .
|then there is linear convergence|
|then there is at least linear convergence and maybe something better, the expression should be checked for quadratic convergence|
|then there is quadratic convergence provided that is continuous|
|then there is something even better than quadratic convergence|
|does not exist||then there is convergence that is better than linear but still not quadratic|
Limits can be difficult to compute. There exists limit expressions whose modulus of convergence is undecidable. In recursion theory, the Limit lemma proves that it is possible to encode undecidable problems using limits. 
This section may require cleanup to meet Wikipedia's quality standards. The specific problem is: Better introduction is needed (November 2016) (Learn how and when to remove this template message)
An alternative is the concept of limit for filters on topological spaces.