A limit looks at what happens to a function when the input approaches a certain value. The general notation for a limit is as follows:

limx→af(x){\displaystyle \lim _{x\to a}f(x)}

This is read as "The limit of f{\displaystyle f} of x{\displaystyle x} as x{\displaystyle x} approaches a{\displaystyle a}". We'll take up later the question of how we can determine whether a limit exists for f(x){\displaystyle f(x)} at a{\displaystyle a} and, if so, what it is. For now, we'll look at it from an intuitive standpoint.

Let's say that the function that we're interested in is f(x)=x2{\displaystyle f(x)=x^{2}} , and that we're interested in its limit as x{\displaystyle x} approaches 2{\displaystyle 2} . Using the above notation, we can write the limit that we're interested in as follows:

limx→2x2{\displaystyle \lim _{x\to 2}x^{2}}

One way to try to evaluate what this limit is would be to choose values near 2, compute f(x){\displaystyle f(x)} for each, and see what happens as they get closer to 2. This is implemented as follows:

x{\displaystyle x}

1.7

1.8

1.9

1.95

1.99

1.999

f(x)=x2{\displaystyle f(x)=x^{2}}

2.89

3.24

3.61

3.8025

3.9601

3.996001

Here we chose numbers smaller than 2, and approached 2 from below. We can also choose numbers larger than 2, and approach 2 from above:

x{\displaystyle x}

2.3

2.2

2.1

2.05

2.01

2.001

f(x)=x2{\displaystyle f(x)=x^{2}}

5.29

4.84

4.41

4.2025

4.0401

4.004001

We can see from the tables that as x{\displaystyle x} grows closer and closer to 2, f(x){\displaystyle f(x)} seems to get closer and closer to 4, regardless of whether x{\displaystyle x} approaches 2 from above or from below. For this reason, we feel reasonably confident that the limit of x2{\displaystyle x^{2}} as x{\displaystyle x} approaches 2 is 4, or, written in limit notation,

limx→2x2=4{\displaystyle \lim _{x\to 2}x^{2}=4}

We could have also just substituted 2 into x2{\displaystyle x^{2}} and evaluated: (2)2=4{\displaystyle (2)^{2}=4} . However, this will not work with all limits.

Now let's look at another example. Suppose we're interested in the behavior of the function f(x)=1x−2{\displaystyle f(x)={\frac {1}{x-2}}} as x{\displaystyle x} approaches 2. Here's the limit in limit notation:

limx→21x−2{\displaystyle \lim _{x\to 2}{\frac {1}{x-2}}}

Just as before, we can compute function values as x{\displaystyle x} approaches 2 from below and from above. Here's a table, approaching from below:

x{\displaystyle x}

1.7

1.8

1.9

1.95

1.99

1.999

f(x)=1x−2{\displaystyle f(x)={\frac {1}{x-2}}}

-3.333

-5

-10

-20

-100

-1000

And here from above:

x{\displaystyle x}

2.3

2.2

2.1

2.05

2.01

2.001

f(x)=1x−2{\displaystyle f(x)={\frac {1}{x-2}}}

3.333

5

10

20

100

1000

In this case, the function doesn't seem to be approaching a single value as x{\displaystyle x} approaches 2, but instead becomes an extremely large positive or negative number (depending on the direction of approach). This is known as an infinite limit. Note that we cannot just substitute 2 into 1x−2{\displaystyle {\frac {1}{x-2}}} and evaluate as we could with the first example, since we would be dividing by 0.

Both of these examples may seem trivial, but consider the following function:

Note that these functions are really completely identical; not just "almost the same," but actually, in terms of the definition of a function, completely the same; they give exactly the same output for every input.

In elementary algebra, a typical approach is to simply say that we can cancel the term (x−2){\displaystyle (x-2)} , and then we have the function f(x)=x2{\displaystyle f(x)=x^{2}} . However, that would be inaccurate; the function that we have now is not really the same as the one we started with, because it is defined when x=2{\displaystyle x=2} , and our original function was specifically not defined when x=2{\displaystyle x=2} . This may seem like a minor point, but from making this kind of assumptions we can easily derive absurd results, such that 0=1{\displaystyle 0=1} (see Mathematical Fallacy § All numbers equal all other numbers in Wikipedia for a complete example). Even without calculus we can avoid this error by stating that:

In calculus, we can introduce a more intuitive and also correct way of looking at this type of function. What we want is to be able to say that, although the function isn't defined when x=2{\displaystyle x=2}, it works almost as if it was. It may not get there, but it gets really, really close. For instance, f(1.99999)=3.99996{\displaystyle f(1.99999)=3.99996}. The only question that we have is: what do we mean by "close"?

As the precise definition of a limit is a bit technical, it is easier to start with an informal definition; we'll explain the formal definition later.

We suppose that a function f{\displaystyle f} is defined for x{\displaystyle x} near c{\displaystyle c} (but we do not require that it be defined when x=c{\displaystyle x=c}).

Definition: (Informal definition of a limit)

We call L{\displaystyle L} the limit of f(x){\displaystyle f(x)} as x{\displaystyle x} approaches c{\displaystyle c} if f(x){\displaystyle f(x)} becomes close to L{\displaystyle L} when x{\displaystyle x} is close (but not equal) to c{\displaystyle c} , and if there is no other value L′{\displaystyle L'} with the same property..

When this holds we write

limx→cf(x)=L{\displaystyle \lim _{x\to c}f(x)=L}

or

f(x)→Lasx→c{\displaystyle f(x)\to L\quad {\text{as}}\quad x\to c}

Notice that the definition of a limit is not concerned with the value of f(x){\displaystyle f(x)} when x=c{\displaystyle x=c} (which may exist or may not). All we care about are the values of f(x){\displaystyle f(x)} when x{\displaystyle x} is close to c{\displaystyle c} , on either the left or the right (i.e. less or greater).

Now that we have defined, informally, what a limit is, we will list some rules that are useful for working with and computing limits. You will be able to prove all these once we formally define the fundamental concept of the limit of a function.

First, the constant rule states that if f(x)=b{\displaystyle f(x)=b} (that is, f{\displaystyle f} is constant for all x{\displaystyle x}) then the limit as x{\displaystyle x} approaches c{\displaystyle c} must be equal to b{\displaystyle b} . In other words

Second, the identity rule states that if f(x)=x{\displaystyle f(x)=x} (that is, f{\displaystyle f} just gives back whatever number you put in) then the limit of f{\displaystyle f} as x{\displaystyle x} approaches c{\displaystyle c} is equal to c{\displaystyle c} . That is,

Identity Rule for Limits

If c{\displaystyle c} is a constant then limx→cx=c{\displaystyle \lim _{x\to c}x=c} .

Example: limx→6x=6{\displaystyle \lim _{x\to 6}x=6}

The next few rules tell us how, given the values of some limits, to compute others.

Operational Identities for Limits
Suppose that limx→cf(x)=L{\displaystyle \lim _{x\to c}f(x)=L} and limx→cg(x)=M{\displaystyle \lim _{x\to c}g(x)=M} and that k{\displaystyle k} is constant. Then

Notice that in the last rule we need to require that M{\displaystyle M} is not equal to 0 (otherwise we would be dividing by zero which is an undefined operation).

These rules are known as identities; they are the scalar product, sum, difference, product, and quotient rules for limits. (A scalar is a constant, and, when you multiply a function by a constant, we say that you are performing scalar multiplication.)

Using these rules we can deduce another. Namely, using the rule for products many times we get that

We need to simplify the problem, since we have no rules about this expression by itself. We know from the identity rule above that limx→2x=2{\displaystyle \lim _{x\to 2}x=2} . By the power rule, limx→2x3=(limx→2x)3=23=8{\displaystyle \lim _{x\to 2}x^{3}=\left(\lim _{x\to 2}x\right)^{3}=2^{3}=8} . Lastly, by the scalar multiplication rule, we get limx→24x3=4⋅limx→2x3=4⋅8=32{\displaystyle \lim _{x\to 2}4x^{3}=4\cdot \lim _{x\to 2}x^{3}=4\cdot 8=32} .

To evaluate this seemingly complex limit, we will need to recall some sine and cosine identities. We will also have to use two new facts. First, if f(x){\displaystyle f(x)} is a trigonometric function (that is, one of sine, cosine, tangent, cotangent, secant or cosecant) and is defined at a{\displaystyle a} , then limx→af(x)=f(a){\displaystyle \lim _{x\to a}f(x)=f(a)}.

Second, limx→0sin⁡(x)x=1{\displaystyle \lim _{x\to 0}{\frac {\sin(x)}{x}}=1} . This may be determined experimentally, or by applying L'Hôpital's rule, described later in the book.

To evaluate the limit, recognize that 1−cos⁡(x){\displaystyle 1-\cos(x)} can be multiplied by 1+cos⁡(x){\displaystyle 1+\cos(x)} to obtain 1−cos2⁡(x){\displaystyle 1-\cos ^{2}(x)} which, by our trig identities, is sin2⁡(x){\displaystyle \sin ^{2}(x)} . So, multiply the top and bottom by 1+cos⁡(x){\displaystyle 1+\cos(x)} . (This is allowed because it is identical to multiplying by one.) This is a standard trick for evaluating limits of fractions; multiply the numerator and the denominator by a carefully chosen expression which will make the expression simplify somehow. In this case, we should end up with:

We will now present an amazingly useful result, even though we cannot prove it yet. We can find the limit at c{\displaystyle c} of any polynomial or rational function, as long as that rational function is defined at c{\displaystyle c} (so we are not dividing by 0). That is, c{\displaystyle c} must be in the domain of the function.

Limits of Polynomials and Rational functions

If f{\displaystyle f} is a polynomial or rational function that is defined at c{\displaystyle c} then

limx→cf(x)=f(c){\displaystyle \lim _{x\to c}f(x)=f(c)}

We already learned this for trigonometric functions, so we see that it is easy to find limits of polynomial, rational or trigonometric functions wherever they are defined. In fact, this is true even for combinations of these functions; thus, for example, limx→1[sin⁡(x2)+4cos3⁡(3x−1)]=sin⁡(12)+4cos3⁡(3⋅1−1){\displaystyle \lim _{x\to 1}{\bigg [}\sin(x^{2})+4\cos ^{3}(3x-1){\bigg ]}=\sin(1^{2})+4\cos ^{3}(3\cdot 1-1)} .

The Squeeze Theorem is very important in calculus, where it is typically used to find the limit of a function by comparison with two other functions whose limits are known.

It is called the Squeeze Theorem because it refers to a function f{\displaystyle f} whose values are squeezed between the values of two other functions g{\displaystyle g} and h{\displaystyle h} , both of which have the same limit L{\displaystyle L} . If the value of f{\displaystyle f} is trapped between the values of the two functions g{\displaystyle g} and h{\displaystyle h} , the values of f{\displaystyle f} must also approach L{\displaystyle L} .

Now, we will discuss how, in practice, to find limits. First, if the function can be built out of rational, trigonometric, logarithmic and exponential functions, then if a number c{\displaystyle c} is in the domain of the function, then the limit at c{\displaystyle c} is simply the value of the function at c{\displaystyle c} .

If c{\displaystyle c} is not in the domain of the function, then in many cases (as with rational functions) the domain of the function includes all the points near c{\displaystyle c}, but not c{\displaystyle c} itself. An example would be if we wanted to find limx→0xx{\displaystyle \lim _{x\to 0}{\frac {x}{x}}} , where the domain includes all numbers besides 0.

In that case, in order to find limx→cf(x){\displaystyle \lim _{x\to c}f(x)} we want to find a function g(x){\displaystyle g(x)} similar to f(x){\displaystyle f(x)} , except with the hole at c{\displaystyle c} filled in. The limits of f{\displaystyle f} and g{\displaystyle g} will be the same, as can be seen from the definition of a limit. By definition, the limit depends on f(x){\displaystyle f(x)} only at the points where x{\displaystyle x} is close to c{\displaystyle c} but not equal to it, so the limit at c{\displaystyle c} does not depend on the value of the function at c{\displaystyle c} . Therefore, if limx→cg(x)=L{\displaystyle \lim _{x\to c}g(x)=L} , limx→cf(x)=L{\displaystyle \lim _{x\to c}f(x)=L} also. And since the domain of our new function g{\displaystyle g} includes c{\displaystyle c} , we can now (assuming g{\displaystyle g} is still built out of rational, trigonometric, logarithmic and exponential functions) just evaluate it at c{\displaystyle c} as before. Thus we have limx→cf(x)=g(c){\displaystyle \lim _{x\to c}f(x)=g(c)} .

In our example, this is easy; canceling the x{\displaystyle x}'s gives g(x)=1{\displaystyle g(x)=1}, which equals f(x)=xx{\displaystyle f(x)={\frac {x}{x}}} at all points except 0. Thus, we have limx→0xx=limx→01=1{\displaystyle \lim _{x\to 0}{\frac {x}{x}}=\lim _{x\to 0}1=1} . In general, when computing limits of rational functions, it's a good idea to look for common factors in the numerator and denominator.

Lastly, note that the limit might not exist at all. There are a number of ways in which this can occur:

f(x)=x2−16{\displaystyle f(x)={\sqrt {x^{2}-16}}}

"Gap"

There is a gap (not just a single point) where the function is not defined. As an example, in

f(x)=x2−16{\displaystyle f(x)={\sqrt {x^{2}-16}}}

limx→cf(x){\displaystyle \lim _{x\to c}f(x)} does not exist when −4≤c≤4{\displaystyle -4\leq c\leq 4} . There is no way to "approach" the middle of the graph. Note that the function also has no limit at the endpoints of the two curves generated (at c=−4{\displaystyle c=-4} and c=4{\displaystyle c=4}). For the limit to exist, the point must be approachable from both the left and the right.

Note also that there is no limit at a totally isolated point on a graph.

"Jump"

If the graph suddenly jumps to a different level, there is no limit at the point of the jump. For example, let f(x){\displaystyle f(x)} be the greatest integer ≤x{\displaystyle \leq x} . Then, if c{\displaystyle c} is an integer, when x{\displaystyle x} approaches c{\displaystyle c} from the right f(x)=c{\displaystyle f(x)=c} , while when x{\displaystyle x} approaches c{\displaystyle c} from the left f(x)=c−1{\displaystyle f(x)=c-1} . Thus limx→cf(x){\displaystyle \lim _{x\to c}f(x)} will not exist.

A graph of 1x2{\displaystyle {\frac {1}{x^{2}}}} on the interval [−2,2]{\displaystyle [-2,2]}.

Vertical asymptote

In

f(x)=1x2{\displaystyle f(x)={\frac {1}{x^{2}}}}

the graph gets arbitrarily high as it approaches 0, so there is no limit. (In this case we sometimes say the limit is infinite; see the next section.)

A graph of sin⁡(1x){\displaystyle \sin({\tfrac {1}{x}})} on the interval (0,1π]{\displaystyle (0,{\tfrac {1}{\pi }}]}.

Infinite oscillation

These next two can be tricky to visualize. In this one, we mean that a graph continually rises above and falls below a horizontal line. In fact, it does this infinitely often as you approach a certain x{\displaystyle x}-value. This often means that there is no limit, as the graph never approaches a particular value. However, if the height (and depth) of each oscillation diminishes as the graph approaches the x{\displaystyle x}-value, so that the oscillations get arbitrarily smaller, then there might actually be a limit.

The use of oscillation naturally calls to mind the trigonometric functions. An example of a trigonometric function that does not have a limit as x{\displaystyle x} approaches 0 is

f(x)=sin⁡(1x){\displaystyle f(x)=\sin \left({\tfrac {1}{x}}\right)}

As x{\displaystyle x} gets closer to 0 the function keeps oscillating between −1{\displaystyle -1} and 1. In fact, sin⁡(1x){\displaystyle \sin \left({\tfrac {1}{x}}\right)} oscillates an infinite number of times on the interval between 0 and any positive value of x{\displaystyle x} . The sine function is equal to 0 whenever x=kπ{\displaystyle x=k\pi } , where k{\displaystyle k} is a positive integer. Between every two integers k{\displaystyle k} , sin⁡(x){\displaystyle \sin(x)} goes back and forth between 0 and −1{\displaystyle -1} or 0 and 1. Hence, sin⁡(1x)=0{\displaystyle \sin \left({\tfrac {1}{x}}\right)=0} for every x=1kπ{\displaystyle x={\tfrac {1}{k\pi }}} . In between consecutive pairs of these values, 1kπ{\displaystyle {\tfrac {1}{k\pi }}} and 1(k+1)π{\displaystyle {\tfrac {1}{(k+1)\pi }}} , sin⁡(1x){\displaystyle \sin \left({\tfrac {1}{x}}\right)} goes back and forth from 0, to either −1{\displaystyle -1} or 1 and back to 0. We may also observe that there are an infinite number of such pairs, and they are all between 0 and 1/π{\displaystyle 1/\pi }. There are a finite number of such pairs between any positive value of x{\displaystyle x} and 1π{\displaystyle {\tfrac {1}{\pi }}} , so there must be infinitely many between any positive value of x{\displaystyle x} and 0. From our reasoning we may conclude that, as x{\displaystyle x} approaches 0 from the right, the function sin⁡(1x){\displaystyle \sin \left({\tfrac {1}{x}}\right)} does not approach any specific value. Thus, limx→0sin⁡(1x){\displaystyle \lim _{x\to 0}\sin \left({\tfrac {1}{x}}\right)} does not exist.

What is the limit as x{\displaystyle x} approaches zero? The value of g(0){\displaystyle g(0)} does not exist; it is not defined.

Notice, also, that we can make g(x){\displaystyle g(x)} as large as we like, by choosing a small x{\displaystyle x} , as long as x≠0{\displaystyle x\neq 0} . For example, to make g(x){\displaystyle g(x)} equal to 1012{\displaystyle 10^{12}} , we choose x{\displaystyle x} to be 10−6{\displaystyle 10^{-6}} . Thus, limx→01x2{\displaystyle \lim _{x\to 0}{\frac {1}{x^{2}}}} does not exist.

However, we do know something about what happens to g(x){\displaystyle g(x)} when x{\displaystyle x} gets close to 0 without reaching it. We want to say we can make g(x){\displaystyle g(x)} arbitrarily large (as large as we like) by taking x{\displaystyle x} to be sufficiently close to 0, but not equal to 0. We express this symbolically as follows:

We say the limit of f(x){\displaystyle f(x)} as x{\displaystyle x} approaches c{\displaystyle c} is infinity if f(x){\displaystyle f(x)} becomes very big (as big as we like) when x{\displaystyle x} is close (but not equal) to c{\displaystyle c} .

Similarly, we say the limit of f(x){\displaystyle f(x)} as x{\displaystyle x} approaches c{\displaystyle c} is negative infinity if f(x){\displaystyle f(x)} becomes very negative when x{\displaystyle x} is close (but not equal) to c{\displaystyle c} .

To see the power of the concept of the limit, let's consider a moving car. Suppose we have a car whose position is linear with respect to time (that is, a graph plotting the position with respect to time will show a straight line). We want to find the velocity. This is easy to do from algebra; we just take the slope, and that's our velocity.

But unfortunately, things in the real world don't always travel in nice straight lines. Cars speed up, slow down, and generally behave in ways that make it difficult to calculate their velocities.

Now what we really want to do is to find the velocity at a given moment (the instantaneous velocity). The trouble is that in order to find the velocity we need two points, while at any given time, we only have one point. We can, of course, always find the average speed of the car, given two points in time, but we want to find the speed of the car at one precise moment.

This is the basic trick of differential calculus, the first of the two main subjects of this book. We take the average speed at two moments in time, and then make those two moments in time closer and closer together. We then see what the limit of the slope is as these two moments in time are closer and closer, and say that this limit is the slope at a single instant.

We will study this process in much greater depth later in the book. First, however, we will need to study limits more carefully.