In short

Many limits that produce 0/0 can be resolved by replacing each function with its Taylor/Maclaurin series, cancelling common powers of the small quantity, and reading off the answer. The technique is systematic: expand, subtract, divide, and take the limit.

Try to compute this limit directly:

\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}

Plug in x = 0. The numerator gives 1 - 1 - 0 = 0. The denominator gives 0. You get 0/0 -- nothing you can cancel, nothing you can factor. The standard limit tricks from earlier articles do not apply here because there is no single standard form hiding inside.

But there is a way through. What if you knew that, for small x,

e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots

Then the numerator becomes

e^x - 1 - x = \left(1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots\right) - 1 - x = \frac{x^2}{2} + \frac{x^3}{6} + \cdots

Divide by x^2:

\frac{e^x - 1 - x}{x^2} = \frac{1}{2} + \frac{x}{6} + \cdots

Now let x \to 0. Every term with an x in it vanishes, leaving \dfrac{1}{2}.

That is the entire method. Replace each function by its series, do the algebra, and the limit appears.

Compare this with the alternative approaches. You could try L'Hopital's rule, but you would need to differentiate twice (the first round gives \frac{e^x - 1}{2x}, still 0/0). You could try algebraic manipulation, but there is nothing to factor. The expansion cuts through all of that: one substitution, one simplification, done.

The rest of this article is about learning which series to use, why they work, and how to handle the algebra cleanly.

Where the expansions come from

The series e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots is not a guess. It is a theorem: under mild conditions, a function can be written as an infinite sum of powers of x, with each coefficient determined by the function's derivatives at x = 0. This infinite sum is called the Maclaurin series of the function (or more generally, a Taylor series if the expansion is centred at some other point).

The general formula is

f(x) = f(0) + f'(0)\,x + \frac{f''(0)}{2!}\,x^2 + \frac{f'''(0)}{3!}\,x^3 + \cdots = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}\,x^n

For limits, you do not need to derive this formula from scratch every time. You only need the standard expansions -- a short list of series for the functions that appear most often.

The standard expansions

Here are the six expansions you will use in almost every problem. All are valid for x near 0.

e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots
\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots
\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots
\ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots \qquad (|x| < 1)
\tan x = x + \frac{x^3}{3} + \frac{2x^5}{15} + \cdots
(1 + x)^n = 1 + nx + \frac{n(n-1)}{2!}\,x^2 + \frac{n(n-1)(n-2)}{3!}\,x^3 + \cdots

The last one is the binomial series for any real exponent n -- the same binomial theorem you know for positive integers, extended to fractions, negatives, and irrationals.

Notice the patterns. The sine series has only odd powers. The cosine series has only even powers. The exponential series has all powers with all-positive signs and factorials in the denominator. The logarithm series has all powers with alternating signs and plain integers in the denominator. Knowing these patterns by sight is half the skill.

Successive polynomial approximations to the exponential functionThe graph of y equals e to the x is shown as a black curve. Three coloured polynomial approximations are overlaid: the linear approximation 1 plus x in light grey, the quadratic 1 plus x plus x squared over 2 in soft red, and the cubic including x cubed over 6 in red. Near x equals 0, the higher-order polynomials hug the true curve more closely. x y -1 1 2 1 2 1 + x + x²/2 + x³/6
The true exponential (black curve) and its first three polynomial approximations near $x = 0$. The more terms you keep, the longer the polynomial stays glued to the real curve. For limits, you only need the first few terms — the ones that survive after cancellation.

The technique, step by step

Every expansion-based limit follows the same four-step process:

  1. Identify the small quantity. In \lim_{x \to 0}, the small quantity is x. In \lim_{x \to a}, substitute h = x - a and expand in powers of h.

  2. Expand each function using the standard series. Keep enough terms so that the leading term in the numerator does not cancel completely — usually two or three terms beyond the first surviving one.

  3. Simplify the numerator and denominator. Cancel common factors, combine like terms.

  4. Take the limit. After cancellation, the expression will be a polynomial plus higher-order terms. The limit is the constant term (or the coefficient of the lowest surviving power).

The key judgement call is how many terms to keep. There is a reliable rule: look at the denominator. If the denominator is x^2, you need the numerator expanded to at least the x^2 term. If the denominator is x^3, expand to the x^3 term. Keep one extra term as a safety margin.

A quick example to see the process in action. Evaluate \lim_{x \to 0} \frac{1 - \cos x}{x^2}. The denominator is x^2, so expand \cos x to the x^2 term: \cos x = 1 - x^2/2 + \cdots. Then 1 - \cos x = x^2/2 + \cdots, and dividing by x^2 gives 1/2 + \cdots \to 1/2. One line of expansion, one line of division, done.

Comparing orders

When two functions are subtracted and both are close to the same value near x = 0, the leading terms cancel and the limit depends on the first term that differs. This is called comparing orders.

Take \sin x and x. For small x:

\sin x = x - \frac{x^3}{6} + \cdots, \qquad x = x

So \sin x - x = -\frac{x^3}{6} + \cdots. The two functions agree up to order x. They first disagree at order x^3. That disagreement is what determines the limit of \frac{\sin x - x}{x^3}.

\frac{\sin x - x}{x^3} = \frac{-x^3/6 + \cdots}{x^3} = -\frac{1}{6} + \cdots \to -\frac{1}{6}

This is the power of the method: by comparing the order at which two functions first differ, you immediately know the answer.

The functions $\sin x$ (solid) and $x$ (dashed) near the origin. They agree perfectly at $x = 0$ and are nearly indistinguishable for small $x$. Their first disagreement is at order $x^3$: $\sin x$ falls slightly below $x$ because of the $-x^3/6$ term. That tiny cubic gap is what the expansion captures.

The expansion method for limits

To evaluate \displaystyle\lim_{x \to 0} \frac{f(x)}{g(x)} when direct substitution gives 0/0:

  1. Expand f(x) and g(x) in powers of x using standard Maclaurin series.
  2. Cancel the lowest common power of x from numerator and denominator.
  3. The limit is the ratio of the leading surviving coefficients.

If the limit is at x = a instead of x = 0, substitute h = x - a and expand in powers of h.

Reading the definition. The series does the work that factoring cannot. In a 0/0 limit, the numerator and denominator both vanish at x = 0, which means their series both start with a positive power of x, not a constant. Dividing cancels the shared power, and the constant term of what remains is the limit.

A first worked example

Example 1: A limit with exponential and sine

Evaluate \displaystyle\lim_{x \to 0} \frac{e^x - 1 - \sin x}{x^2}.

Step 1. Expand each piece up to the x^2 term (since the denominator is x^2, you need at least that many terms in the numerator).

e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots
\sin x = x - \frac{x^3}{6} + \cdots

Why: the denominator is x^2, so you need the numerator accurate to order x^2. For \sin x, the x^2 coefficient is zero (sine has only odd powers), so you just need to know that.

Step 2. Compute the numerator.

e^x - 1 - \sin x = \left(1 + x + \frac{x^2}{2} + \cdots\right) - 1 - \left(x - \frac{x^3}{6} + \cdots\right)
= \cancel{1} + \cancel{x} + \frac{x^2}{2} - \cancel{1} - \cancel{x} + \frac{x^3}{6} + \cdots = \frac{x^2}{2} + \frac{x^3}{6} + \cdots

Why: the constant terms (1 and -1) cancel. The x terms (x and -x) cancel. The first surviving term is x^2/2.

Step 3. Divide by the denominator.

\frac{e^x - 1 - \sin x}{x^2} = \frac{x^2/2 + x^3/6 + \cdots}{x^2} = \frac{1}{2} + \frac{x}{6} + \cdots

Why: dividing each term by x^2. The first term becomes a constant; everything else still has a factor of x.

Step 4. Take the limit.

\lim_{x \to 0} \left(\frac{1}{2} + \frac{x}{6} + \cdots\right) = \frac{1}{2}

Why: every term except 1/2 contains a positive power of x, so they all vanish as x \to 0.

Result: \displaystyle\lim_{x \to 0} \frac{e^x - 1 - \sin x}{x^2} = \frac{1}{2}

The graph of $\frac{e^x - 1 - \sin x}{x^2}$. The function is not defined at $x = 0$, but as $x$ approaches $0$ from either side, the value settles toward $\frac{1}{2}$ — the red point marks the limit.

The graph confirms the algebra: the curve levels off at exactly 0.5 near the origin, which is the 1/2 the expansion predicted.

A second example, with logarithm and cosine

Example 2: A limit with logarithm and cosine

Evaluate \displaystyle\lim_{x \to 0} \frac{x - \ln(1 + x)}{1 - \cos x}.

Step 1. Expand numerator and denominator. The denominator is 1 - \cos x, which starts at order x^2. So expand the numerator to at least x^2.

\ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots
\cos x = 1 - \frac{x^2}{2} + \frac{x^4}{24} - \cdots

Why: you need enough terms in both numerator and denominator to find the leading behaviour. The denominator 1 - \cos x starts at x^2/2, so you need the numerator at least to order x^2.

Step 2. Compute the numerator and denominator separately.

Numerator: x - \ln(1+x) = x - \left(x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots\right) = \frac{x^2}{2} - \frac{x^3}{3} + \cdots

Denominator: 1 - \cos x = 1 - \left(1 - \frac{x^2}{2} + \frac{x^4}{24} - \cdots\right) = \frac{x^2}{2} - \frac{x^4}{24} + \cdots

Why: in the numerator, the x terms cancel, leaving x^2/2 as the leading term. In the denominator, the 1's cancel, also leaving x^2/2 as the leading term.

Step 3. Take the ratio.

\frac{x^2/2 - x^3/3 + \cdots}{x^2/2 - x^4/24 + \cdots} = \frac{x^2/2\left(1 - 2x/3 + \cdots\right)}{x^2/2\left(1 - x^2/12 + \cdots\right)}
= \frac{1 - 2x/3 + \cdots}{1 - x^2/12 + \cdots}

Why: factor out x^2/2 from both numerator and denominator. Everything inside the parentheses starts with 1.

Step 4. Take the limit.

\lim_{x \to 0} \frac{1 - 2x/3 + \cdots}{1 - x^2/12 + \cdots} = \frac{1}{1} = 1

Why: as x \to 0, all the correction terms vanish. Both the numerator and denominator approach 1.

Result: \displaystyle\lim_{x \to 0} \frac{x - \ln(1 + x)}{1 - \cos x} = 1

The graph of $\frac{x - \ln(1+x)}{1 - \cos x}$. Despite neither function being defined at $x = 0$ (the expression is $0/0$ there), the ratio approaches exactly $1$. The expansion told you this before the graph did.

Both the numerator and denominator had the same leading behaviour -- x^2/2 -- so their ratio approaches 1. When two quantities vanish at the same rate, their ratio tends to 1. When they vanish at different rates, the ratio either blows up or goes to zero.

Common confusions

Going deeper

If you came here to learn how to use expansions for limits, you have the technique. The rest of this section is for readers who want the theoretical foundation and some trickier applications.

Why the series works: Taylor's theorem with remainder

The Maclaurin series is not magic. It is guaranteed by a theorem.

Taylor's theorem says: if f has n + 1 continuous derivatives near x = 0, then

f(x) = f(0) + f'(0)\,x + \frac{f''(0)}{2!}\,x^2 + \cdots + \frac{f^{(n)}(0)}{n!}\,x^n + R_n(x)

where the remainder R_n(x) satisfies R_n(x)/x^n \to 0 as x \to 0. The remainder is the error from truncating the series, and it is small enough that it does not affect the limit.

This is why the method works: when you write e^x = 1 + x + x^2/2 + \cdots and throw away the higher terms, the error you are making vanishes faster than the terms you are keeping. So the limit of the truncated expression is the same as the limit of the full expression.

The remainder can be written explicitly as

R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}\,x^{n+1}

for some c between 0 and x. This is the Lagrange form of the remainder, and it gives you a bound on the error. For our purposes, all that matters is that R_n(x) = O(x^{n+1}) -- it is of order x^{n+1}, meaning it vanishes at least as fast as x^{n+1}.

Deriving the standard expansions

Where do the specific series come from? Take e^x as the example. All its derivatives are e^x, which is 1 at x = 0. So

f^{(n)}(0) = 1 \quad \text{for all } n

and the series is \sum \frac{x^n}{n!} = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots.

For \sin x: the derivatives cycle through \sin, \cos, -\sin, -\cos, \sin, \ldots At x = 0 these are 0, 1, 0, -1, 0, 1, \ldots So only the odd-powered terms survive, with alternating signs.

For \ln(1 + x): the first derivative is (1+x)^{-1} = 1 at x = 0. The second derivative is -(1+x)^{-2} = -1 at x = 0. The third is 2(1+x)^{-3} = 2 at x = 0. In general, f^{(n)}(0) = (-1)^{n-1}(n-1)!, giving the series x - x^2/2 + x^3/3 - \cdots.

The substitution trick for non-zero limits

When the limit is at x = a instead of x = 0, substitute h = x - a so that h \to 0. Then rewrite everything in terms of h and expand.

For instance, \displaystyle\lim_{x \to \pi/2} \frac{\cos x}{x - \pi/2}. Set h = x - \pi/2, so x = \pi/2 + h and h \to 0.

\cos\left(\frac{\pi}{2} + h\right) = -\sin h = -h + \frac{h^3}{6} - \cdots

So the limit becomes

\lim_{h \to 0} \frac{-h + h^3/6 - \cdots}{h} = \lim_{h \to 0} \left(-1 + \frac{h^2}{6} - \cdots\right) = -1

The substitution reduces every limit-at-a-point to a limit at zero, where the standard expansions apply directly.

Expanding compositions

When a limit involves a function of a function -- say \sin(\tan x) or e^{\sin x} -- you expand from the inside out.

Take \lim_{x \to 0} \frac{e^{\sin x} - e^x}{x^3}. First, expand \sin x:

\sin x = x - \frac{x^3}{6} + \cdots

So \sin x = x + u where u = -x^3/6 + \cdots. Now expand e^{\sin x} = e^{x + u} = e^x \cdot e^u. For small u, e^u \approx 1 + u + u^2/2 + \cdots = 1 + u + \cdots (since u^2 is order x^6, too small to matter here).

e^{\sin x} = e^x\left(1 - \frac{x^3}{6} + \cdots\right) = e^x - \frac{x^3}{6}e^x + \cdots
e^{\sin x} - e^x = -\frac{x^3}{6}e^x + \cdots

Divide by x^3: \frac{e^{\sin x} - e^x}{x^3} \to -\frac{e^0}{6} = -\frac{1}{6}.

The trick is to keep track of which terms matter. Since the denominator is x^3, you only need the numerator to order x^3. The inside expansion \sin x = x - x^3/6 + \cdots gives the correction at exactly the right order.

When the expansion approach is the best tool

The expansion method is especially powerful when:

Comparing sin x minus x and tan x minus x near zeroTwo curves plotted near x equals 0. One is sin x minus x, which curves downward as negative x cubed over 6. The other is tan x minus x, which curves upward as positive x cubed over 3. Both are zero at the origin, but they peel away in opposite directions, showing their different cubic coefficients. x y 1 −1 tan x − x sin x − x
Near $x = 0$, both $\sin x - x$ and $\tan x - x$ are zero. But $\sin x - x \approx -x^3/6$ (curving down) while $\tan x - x \approx +x^3/3$ (curving up). The sign and size of the cubic coefficient separate them -- and that coefficient is exactly what the expansion method finds.

A quick-reference table of leading behaviours

These approximations, all valid for small x, are worth knowing by heart. They tell you the order at which each expression vanishes or differs from a simpler one.

Expression Leading term(s) Order
e^x - 1 x x
\sin x x x
\tan x x x
\ln(1+x) x x
1 - \cos x x^2/2 x^2
e^x - 1 - x x^2/2 x^2
\sin x - x -x^3/6 x^3
\tan x - x x^3/3 x^3
\tan x - \sin x x^3/2 x^3

When you see one of these expressions in a limit, you can immediately read off the order and the coefficient, which is often all you need.

Where this leads next

The expansion method is one of three major tools for indeterminate limits. The others complement it: