All scientific disciplines are based on mathematics, and data science is no exception. When the problems to be solved are optimization problems, you need to know what the limit of a function is. In this article, you’ll discover how to determine the limit of a function.
Limit: Definition
The limit of a function f is the value the function approaches when its argument approaches a certain value. Mathematically, we write limx→a f(x) = l.
We say that f tends towards l when x tends towards a. Depending on the case, a and l may be real numbers, or equal to ±∞.
Limits of standard functions
Real-valued finite limits
For example, for f(x) = x2, the limit when x tends towards 2 is 22 = 4.
Infinite limits
When the function is well defined at a real number a (it is said to be continuous at a), then the limit at a is exactly f(a).
When the variable x takes on very large values (positively or negatively), we say that x tends towards more or less infinity. In this case, we distinguish between cases where f(x) approaches a finite value and those where f(x) moves away towards infinity. In the former case, f is said to converge, and in the latter, f to diverge.
Below is a table summarizing the limits of common functions at infinity.

When a function admits a finite limit l ∈ ℝ when x → ∞, then we say that f admits a horizontal asymptote of equation y = l. In other words, the curve moves closer and closer to the straight line.
Infinite limits at a finite value
| Function | Limit as x → 0 |
|---|---|
| f(x) = 1/x | +∞ if x > 0; −∞ if x < 0 |
| f(x) = ln(x) | −∞ |
| f(x) = √x | 0 |
When limx→a f(x) = ±∞, with a a real number, then the curve of f is said to have a vertical asymptote at a. In other words, the curve moves closer and closer to the straight line with equation x = a.
Limit operations
In most cases, it is possible to perform limit operations to determine the limit.
Limit of a sum of two functions

Limit of a product of two functions

Limit of a quotient of two functions
| Limit | Case 1 | Case 2 | Case 3 | Case 4 | Case 5 | Case 6 | Case 7 | Case 8 | Case 9 | Case 10 | Case 11 | Case 12 | Case 13 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| lim f(x) | L ∈ ℝ | L ∈ ℝ | L > 0 or +∞ | L < 0 or −∞ | L > 0 or +∞ | L < 0 or −∞ | +∞ | +∞ | 0 | +∞ | +∞ | 0 | +∞ or −∞ |
| lim g(x) | L′ ≠ 0 | +∞ or −∞ | 0 with g(x) > 0 | 0 with g(x) > 0 | 0 with g(x) < 0 | 0 with g(x) < 0 | L′ > 0 | L′ < 0 | +∞ or −∞ | L′ > 0 | L′ < 0 | 0 | +∞ or −∞ |
| lim f(x)/g(x) | L/L′ | 0 | +∞ | −∞ | −∞ | +∞ | +∞ | −∞ | Indeterminate form | +∞ | −∞ | Indeterminate form | Indeterminate form |
Click on the tables to display them full-screen.
Determining a limit in practice
To determine limits, it’s sometimes simpler to use other functions. Comparing functions allows you to compare their limits, when they exist. There are two main properties for comparing functions.
Comparison theorem
Let f and g be two functions defined on an interval I = [a, +∞).
Assume that for any x ∈ I, f(x) ≥ g(x). If limx→+∞ g(x) = +∞, then limx→+∞ f(x) = +∞. If limx→+∞ f(x) = −∞, then limx→+∞ g(x) = −∞.
Gendarme theorem
Let f, g and h be three functions defined on an interval I = [a, +∞).
Assume that for any x ∈ I, g(x) ≤ f(x) ≤ h(x). If g and h tend to the same limit l in +∞, then f also tends to l.
You now know what a limit is and how to calculate it. Calculating limits allows you, for example, to define the derivative of a function as the limit of a rate of increase. If you’d like to discover all the mathematical concepts involved in data science, we invite you to take a look at our curricula.


























