SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons
      1. 2.1.1 Limits: what a function approachesConcept · 25 min
      2. 2.1.2 One-sided limits and continuityConcept · 30 min
      3. 2.1.3 Limits at infinityConcept · 30 min
      4. 2.1.4 Practice set: limitsPractice set · 25 min
      5. 2.1.5 Case study: continuous compounding as a limitCase study · 30 min

Level 2, Single-variable calculus 2.1 Limits and continuity Lesson 1 of 5

ConceptLesson 2.1.1 in Level 2, Single-variable calculus. About 25 minutes.

Limits: what a function approaches

What a limit means

A limit describes where a function is heading. As the input xx gets close to a number aa, the output f(x)f(x) may get close to a number LL, the limit. The limit has the units of the output: if ff gives a price in dollars, so does its limit.

Take f(x)=x2−1x−1f(x) = \dfrac{x^2 - 1}{x - 1}. At x=1x = 1 the formula reads 00\frac{0}{0}, which is not a number, so f(1)f(1) does not exist. But look at inputs close to 1, from below and from above:

xx0.90.990.9991.0011.011.1
f(x)f(x)1.91.991.9992.0012.012.1

From both sides the outputs close in on 2. So the limit of f(x)f(x) as xx approaches 1 is 2, even though f(1)f(1) itself does not exist.

Rule: Limit

lim⁡x→af(x)=L\lim_{x \to a} f(x) = L

Read it as "the limit of f(x)f(x) as xx approaches aa is LL". It means f(x)f(x) gets as close to LL as you like once xx is close enough to aa, on either side. The value at aa itself plays no part.

The graph of ff is the line y=x+1y = x + 1 with one point missing. The missing point is drawn as an open circle, called a hole.

The function ff has a hole at (1,2)(1, 2): the outputs head for 2 from both sides. The function gg is the same except that g(1)=3g(1) = 3, and its limit at 1 is still 2.

The second graph makes the rule's last sentence concrete. It shows g(x)=x+1g(x) = x + 1 for every x≠1x \neq 1, with g(1)=3g(1) = 3.

Near 1 the outputs of gg still head for 2, so lim⁡x→1g(x)=2\lim_{x \to 1} g(x) = 2. The single value g(1)=3g(1) = 3 does not change where the graph is heading.

Try it

The cell builds the table above. round(…, 6) hides tiny rounding errors in the last digits; without it you would see 1.990000000000001.

Calling f(1) would stop the cell with a ZeroDivisionError, which is why the table never uses 1 itself.

⌘/Ctrl + Enter runs the cell

Try it with the explorer below. Press smaller and smaller gaps to bring the two points towards 1, and turn on zoom to follow them. Both outputs close in on 2.

Explore

Pick a gap and watch the two points close in on x = 1 from the left and the right. Turn on zoom to follow them in.

−2024024
From the left
f(0.5) = 1.5
From the right
f(1.5) = 2.5
Farthest from 2
0.5. Both sides approach 2, though f(1) itself is undefined: the limit is 2.

Finding a limit by substitution

For most functions you meet, the limit is just the value. Substitute x=ax = a into the formula, and if you get a number, that is the limit:

lim⁡x→3(x2+1)=32+1=10\lim_{x \to 3} (x^2 + 1) = 3^2 + 1 = 10

Nearby inputs agree: x=2.9x = 2.9 gives 9.41, x=2.99x = 2.99 gives 9.9401, x=3.01x = 3.01 gives 10.0601 and x=3.1x = 3.1 gives 10.61.

Substitution works for the functions of Level 1 at any input in their domain (lesson 1.1.1). These are polynomials, x\sqrt{x}, exe^x, ln⁡x\ln x, sin⁡x\sin x and cos⁡x\cos x, and sums, products and ratios of them. Lesson 2.1.2 gives such functions a name: continuous.

So lim⁡x→−1(x3+2x2)=−1+2=1\lim_{x \to -1}(x^3 + 2x^2) = -1 + 2 = 1, and lim⁡x→4x=2\lim_{x \to 4} \sqrt{x} = 2.

When substitution gives 00\frac{0}{0}

A 00\frac{0}{0} is a signal, not an answer. It usually means the top and the bottom share a factor that is 0 at aa. Factor both, cancel the shared factor, then substitute.

For the first example, x2−1=(x−1)(x+1)x^2 - 1 = (x - 1)(x + 1) by the factor theorem (lesson 1.3.1), because 1 and −1-1 are roots. So for every x≠1x \neq 1:

x2−1x−1=(x−1)(x+1)x−1=x+1solim⁡x→1x2−1x−1=1+1=2\begin{gathered} \frac{x^2 - 1}{x - 1} = \frac{(x - 1)(x + 1)}{x - 1} = x + 1 \\[6pt] \text{so}\quad \lim_{x \to 1} \frac{x^2 - 1}{x - 1} = 1 + 1 = 2 \end{gathered}

Cancelling x−1x - 1 is allowed because a limit never uses x=1x = 1 itself, so x−1x - 1 is never 0. The answer matches the table.

A second example, with a square root

Take lim⁡x→4x−4x−2\lim_{x \to 4} \dfrac{x - 4}{\sqrt{x} - 2}. Substituting gives 00\frac{0}{0} again. The table points to 4:

xx3.93.993.9994.0014.014.1
value3.9748423.9974983.999754.000254.0024984.024846

For the algebra, notice that (x−2)(x+2)=x−4(\sqrt{x} - 2)(\sqrt{x} + 2) = x - 4: multiply it out to check. So the top contains the bottom as a factor:

x−4x−2=(x−2)(x+2)x−2=x+2\begin{aligned} \frac{x - 4}{\sqrt{x} - 2} &= \frac{(\sqrt{x} - 2)(\sqrt{x} + 2)}{\sqrt{x} - 2} \\[6pt] &= \sqrt{x} + 2 \end{aligned}

Now substitute: 4+2=4\sqrt{4} + 2 = 4. The table and the algebra agree.

The letter does not matter

Limits are often taken in a small gap called hh, as h→0h \to 0. Lesson 2.2.1 does this all the time. Take lim⁡h→0(1+h)2−1h\lim_{h \to 0} \frac{(1 + h)^2 - 1}{h}, which reads 00\frac{0}{0} at h=0h = 0.

Expand the top first: (1+h)2−1=2h+h2(1 + h)^2 - 1 = 2h + h^2. Then cancel hh to get 2+h2 + h, which tends to 2. The table agrees: h=0.1h = 0.1 gives 2.1, h=0.01h = 0.01 gives 2.01, h=−0.01h = -0.01 gives 1.99 and h=−0.1h = -0.1 gives 1.9.

Rule: Finding a limit

substitute x=aif 00: simplify, cancel, substitute\begin{gathered} \text{substitute } x = a \\ \text{if } \tfrac{0}{0}: \text{ simplify, cancel, substitute} \end{gathered}

If substituting gives a number, that is the limit. If it gives 00\frac{0}{0}, factor or expand, cancel the shared factor, and substitute again.

Try it

The loop rebuilds the square-root table. Then sp.limit(expression, x, a) computes each limit of this section exactly: 2, 4 and 2.

The variable for the third is h, so it is declared as a symbol too.

⌘/Ctrl + Enter runs the cell

When substitution gives a number over 0

A nonzero number over 0 is a different case. Take 1(x−1)2\dfrac{1}{(x - 1)^2} near 1. The top stays at 1 while the bottom shrinks to 0, so the outputs grow without end:

xx0.90.990.9991.0011.011.1
value10010,0001,000,0001,000,00010,000100

No number is approached, so there is no limit. To say how it fails, write lim⁡x→11(x−1)2=∞\lim_{x \to 1} \frac{1}{(x - 1)^2} = \infty, read "it grows without bound".

The symbol ∞\infty is not a number, and no amount of simplifying will produce one. Lesson 2.1.2 looks at blow-ups like this from each side.

Try it

The table of 1(x−1)2\frac{1}{(x - 1)^2} from both sides. SymPy reports the blow-up as oo, its way of typing ∞\infty.

⌘/Ctrl + Enter runs the cell

A table suggests; it does not prove

Some limits have no factor to cancel. With xx in radians (lesson 1.7.1), sin⁡xx\frac{\sin x}{x} reads 00\frac{0}{0} at 0. From both sides the table gives 0.998334 at ±0.1\pm 0.1 and 0.999983 at ±0.01\pm 0.01, heading for 1.

SymPy confirms that lim⁡x→0sin⁡xx=1\lim_{x \to 0} \frac{\sin x}{x} = 1. A table gives evidence, and an exact method (algebra or SymPy) settles it.

A table can also mislead if you push too close. The computer stores about 16 significant digits, so 1+h1 + h loses most of hh when hh is tiny. For (1+h)2−1h\frac{(1 + h)^2 - 1}{h}, whose limit is 2:

hh10−810^{-8}10−1210^{-12}10−1510^{-15}10−1610^{-16}
computed1.999999992.00017782.220446050

At h=10−16h = 10^{-16} the computer stores 1+h1 + h as exactly 1, so the top is 0. Keep the gaps of a table from 0.1 down to about 0.0001, where rounding stays invisible. The case study, lesson 2.1.5, meets the same trap with money.

Try it

The first loop tabulates sin⁡xx\frac{\sin x}{x} from both sides; sp.limit gives the exact answer.

The second loop pushes hh too far. round(…, 8) shows 8 decimal places.

⌘/Ctrl + Enter runs the cell

Common mistakes

  1. A limit is not the value at the point. g(1)=3g(1) = 3, yet lim⁡x→1g(x)=2\lim_{x \to 1} g(x) = 2. And f(1)f(1) need not exist at all.
  2. 00\frac{0}{0} is not 0, not 1, and not "no limit". It means "simplify and look again".
  3. A number over 0 is not 00\frac{0}{0}. Something like 10\frac{1}{0} means the outputs blow up. There is no limit, and simplifying will not find one.
  4. Cancel factors, not terms. x2+xx=x+1\frac{x^2 + x}{x} = x + 1, because xx is a factor of the whole top. But x2+1x\frac{x^2 + 1}{x} is not x+1x + 1.
  5. Look at both sides. A limit needs the same value from the left and from the right. Lesson 2.1.2 shows what happens when they differ.
  6. Do not push a table too close. At a gap of 10−1210^{-12} rounding shows in the fourth decimal place. By 10−1610^{-16} it swamps the answer.

Limits

0 of 11 correct

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
How to type answers
  • Powers with ^: x^7, 2^(1/3), a^-2.
  • Multiply with * or by writing side by side: 3x^2, 2(x+1).
  • ln(x) is the natural log, log(x, 2) is log base 2, e is Euler's number, sqrt(x) is a square root.
  • sin(x), cos(x) and tan(x) take radians; write pi for π and sin(x)^2 for sin²x.
  • Your first answer to each question is saved: it counts towards your score and brings the question back for review.
  • Exact answers like ln(20)/ln(3) are best. Decimals need about 4 significant figures.

Summary card

  • lim⁡x→af(x)=L\lim_{x \to a} f(x) = L: f(x)f(x) gets as close to LL as you like for xx close enough to aa, from both sides. The value at aa plays no part. A limit has the units of the output.
  • Substitute when you can. If you get 00\frac{0}{0}, factor or expand, cancel, then substitute.
  • A nonzero number over 0 means the outputs blow up: there is no limit, written ∞\infty when they grow without bound.
  • A table suggests a limit and sp.limit(expr, x, a) confirms it. Tables fail when the gap is so small that rounding takes over.
  • A limit to remember: sin⁡xx→1\frac{\sin x}{x} \to 1 as x→0x \to 0.

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.