mathcalculus
limits
what a function heads toward, even where it isn't defined.
a limit is where f(x) is heading as x closes in on a, from both sides. what happens at a itself doesn't count, so a function can have a limit where it has no value.
- the limit
- lim x→a f(x) = L f(x) as close to L as you like, once x is close enough to a. a itself is left out
- a hole
- 0/0 a sign to simplify, not an answer. factor, cancel, then plug in
- both sides
- left = right or there is no limit. a jump has one from each side
- blowing up
- 1/x² → ∞ how the limit fails. ∞ isn't a number
- at infinity
- (2x + 1)/(x − 3) → 2 divide by the biggest power. a horizontal asymptote
- continuous
- lim f(x) = f(a) then plugging in is the limit
- two to know
- sin x / x → 1 by a squeeze. and (1 + 1/n)ⁿ → e
- a formula that comes out 0/0
- asymptotes: what a graph does at its edges
- the derivative and the integral, which are both limits
on this page
the idea
take and ask what it does near . at 1 itself the formula gives , which is nothing: no value, no point on the graph. but a step to the left, at , it gives 1.9. at 0.99, 1.99. at 0.999, 1.999. from the right, 1.1 gives 2.1, 1.01 gives 2.01 and 1.001 gives 2.001.
| 0.9 | 0.99 | 0.999 | 1 | 1.001 | 1.01 | 1.1 | |
|---|---|---|---|---|---|---|---|
| 1.9 | 1.99 | 1.999 | – | 2.001 | 2.01 | 2.1 |
the values close in on 2 from both sides, and they get as close as you like: as near to 1 as goes, that near to 2 goes. that is a limit.
read it as “the limit of , as goes to 1, is 2”. it says where is heading, and nothing about where it is. can be something else, or missing, as here. the movie walks in from both sides.
an animation on a plot from x = −1 to 3 and y = 0 to 4 of f(x) = (x² − 1)/(x − 1): the line y = x + 1 draws itself with a hole at (1, 2), an open ring. then a point walks in toward 1 from the left, stopping at x = 0.5, 0.9, 0.99 and 0.999, while a table beside the plot fills with f(x) = 1.5, 1.9, 1.99 and 1.999. then it walks in from the right, stopping at x = 1.5, 1.1, 1.01 and 1.001, with f(x) = 2.5, 2.1, 2.01 and 2.001. both columns close in on 2, a dotted line marks y = 2, and the limit is written: lim x→1 f(x) = 2. the ring stays open.
the hole has a reason. for every but 1, , and the cancels:
so the graph is the line with one point missing, and the limit is where that point would be: . that is the pattern for every . it isn’t an answer, it’s a sign that the formula is hiding a factor. simplify first, then plug in.
limits are what the next three pages are made of. a derivative is a limit of slopes, an integral is a limit of sums, and a series is a limit of running totals.
explore
the game behind the definition. someone picks how close to they want to be: a band of half-height around . you answer with a window of half-width around , and you win if every in the window, except itself, has inside the band. the limit is when you can win for every , however small. slide and the figure finds the widest that works. drag the point along the curve to check it.
drag the point along the curve, or tab to it and use the left and right arrow keys
- the band, L ± ε
- 1.50 to 2.50
- the window, a ± δ
- δ = 0.500: 0.500 to 1.500
- the point
- x = 1.70: f(x) = 2.700, outside the window, outside the band
on this line f(x) is exactly as far from 2 as x is from 1, so δ = ε = 0.50 works and nothing wider does. the hole at 1 doesn't matter: the game leaves x = 1 out
an interactive plot of the ε–δ game with four curves to pick from: (x² − 1)/(x − 1) near 1, x² near 2, a jump from 1.5 to 2 at 1, and sin x / x near 0. a slider sets ε from 0.05 to 1. the figure shades the band from L − ε to L + ε in cyan, and in amber the widest window from a − δ to a + δ that keeps the curve inside the band, with the piece of curve over the window drawn in amber too. a point drags along the curve, or moves with the left and right arrow keys, and the readout says whether it's inside the window and inside the band. it opens on the line with the hole at ε = 0.5: the band from 1.5 to 2.5, δ = 0.5, the window from 0.5 to 1.5, and the point at x = 1.7, where f(x) = 2.7, outside both. on x² at ε = 0.5, δ = 0.121. the jump has no δ at any ε up to 0.5, and any δ past it. on sin x / x at ε = 0.5, δ = 1.895.
- on the line with the hole, : is exactly as far from 2 as is from 1. the hole doesn’t matter, since the game leaves out
- on near 2 the window is narrower than the band, because the curve is steep there, and the right side decides: at the right edge allows 0.121 and the left 0.129, so . climbs faster to the right of 2
- the jump loses at every up to 0.5. the window always holds an just left of 1, where , outside the band. no wins for every , so there is no limit. past 0.5 any window works, but a limit has to survive every
- has a hole at 0, like the line, and a limit of 1. at the window reaches out to 0.787. the key idea section says why the limit is 1
try it
lim x→1 (x² − 1)/(x − 1) = ?
pick one.
a practice exercise with five kinds of question: a limit that comes out 0/0 and needs factoring, the limit of a function with two rules from the left, the right or both sides, a fraction that blows up and which way, a ratio of polynomials as x → ∞, and whether a function is continuous at a point. it opens on lim x→1 (x² − 1)/(x − 1), which is 2, then a function that is 2x below 1 and x + 3 from 1 on, where the limit at 1 doesn't exist. after each answer the function is drawn.
the rules
the limit
gets as close to as you like, for every close enough to , on either side, and itself is left out. why leave it out: the question is where is heading, and that has an answer whether or not exists, so the definition never looks. and when a limit exists it is one number: two different values can’t both be what every nearby is close to.
one-sided limits
the same question asked from one side only: the minus is from the left, , and the plus from the right. the two-sided limit exists exactly when both one-sided limits exist and agree, and then it is their shared value. why: “close to ” means on both sides, so when the left heads to 2 and the right to 4, no single number is close to all the nearby values. that is a jump, and a jump has no limit at the jump, only one from each side.
limits that blow up
near 0, grows past every number: 100 at , 10,000 at 0.01, a million at 0.001. the limit doesn’t exist, since there’s no number the values close in on, and records how it fails: by growing without bound. isn’t a value to plug in or do arithmetic with. why blows up: name any bound , and as soon as . the graph has a vertical asymptote at . blows up too, but the sides disagree, from the left and from the right, so even the description needs a side. a fraction whose bottom goes to 0 while its top doesn’t blows up, and whether the bottom changes sign at decides if the two sides agree.
limits at infinity
asks what settles toward as grows past every number. settles to 0: it’s under once . for a ratio, divide top and bottom by the biggest power of in it:
the leftover fractions all have in the bottom and go to 0, so only the leading terms survive. a value the graph settles toward is a horizontal asymptote, here : at the function is 2.072, and at 1,000 it’s 2.007. when the top’s biggest power beats the bottom’s, the ratio blows up instead, and when the bottom’s wins, the limit is 0.
the graph of (2x + 1)/(x − 3) from x = −6 to 12 and y = −6 to 10, with its two asymptotes dotted: x = 3, where the left arm runs down toward −∞ (−68 at x = 2.9) and the right arm comes down from +∞ (72 at x = 3.1), and y = 2, which both arms settle toward: 3 at x = 10, 2.072 at 100, 2.007 at 1,000.
continuity
is continuous at when three things hold: exists, the limit exists, and they agree. three ways to break it, one per condition: a hole ( missing, or a value off the curve), a jump (no limit), a blow-up (no limit, and no value). why it matters: for a continuous function the limit is the value, so plugging in answers the limit question. polynomials, roots, , , and are continuous wherever they’re defined, and so is anything built from them with , , , and composition, away from the points where a bottom is 0 or a root or a log gets an input it can’t take. that is why takes no work and the hole took factoring: is continuous at 1, and the original formula isn’t defined there.
a hole
f(1) is missing. the limit, 2, is there
a jump
f(1) = 2, but no limit: 1 from the left, 2 from the right
a blow-up
no value and no limit: f grows past every bound
three sketches at x = 1, each with a dotted line there. a hole: the line y = x + 1 with an open ring at (1, 2), so f(1) is missing while the limit, 2, is there. a jump: y = x up to 1 and y = x + 1 from 1 on, with an open ring at (1, 1) and a filled dot at (1, 2), so f(1) = 2 but the sides disagree and there is no limit. a blow-up: 1/(x − 1)², two arms climbing past the top either side of x = 1, with no value and no limit there.
the limit laws
if and :
limits pass through arithmetic. why: if stays within of and within of , their sum stays within of , and the other laws follow the same way with a little more algebra. the quotient law needs , and that is where comes from: when both limits are 0 the law says nothing, and the answer can be anything. , , and blows up, all three at 1. that is why simplifying first is the rule.
the squeeze: if near , and and both have limit there, so does . why: is trapped between two things heading to the same place. it’s the tool for a limit nothing cancels in, like the first one below.
two limits to know
the first is the small-angle fact from the trig page, for small , made exact: at the ratio is 0.99833, at 0.01 it’s 0.999983. it’s at 0 and nothing cancels, so it takes a squeeze. on the circle of radius 1, for , the triangle with corners , and sits inside the sector of angle , which sits inside the triangle out to the tangent line at , whose top corner is :
divide through by and flip each fraction: . as , , and the ratio is squeezed to 1. that covers the right side, and the left follows since is even.
- the triangle to the point
- ½ sin x = 0.359
- the sector
- ½ x = 0.400
- the triangle to the tangent
- ½ tan x = 0.515
cos x = 0.697 ≤ sin x / x = 0.897 ≤ 1
each area is the one before times something: ½ sin x, then ½ x, then ½ tan x. divide all three by ½ sin x and the sandwich appears. as x shrinks, the three shapes become the same sliver
a quarter of the circle of radius 1 with a point at angle x, 0.8 radians to start, and three nested shapes: the triangle from the center to (1, 0) and the point, in cyan, with area ½ sin x = 0.359; the sector of angle x, in amber, with area ½ x = 0.400; and the triangle out to the tangent line, outlined, with area ½ tan x = 0.515. a slider moves x from 0.1 to 1.1 radians, and a readout gives the three areas and the sandwich they make, cos x = 0.697 ≤ sin x / x = 0.897 ≤ 1. at x = 0.1 it reads cos x = 0.995 ≤ sin x / x = 0.998 ≤ 1.
the second is the number behind compounding, from the exponents + logs page: one unit of money at 100% a year, paid in parts, grows to . that’s 2 for one payment, 2.25 for two, 2.6130 monthly, 2.7146 daily, and the limit, paid at every instant, is . it’s a limit of a different shape. the heads to 0 and the exponent to infinity at once, so neither the limit laws nor plugging in apply: is as empty as . the derivatives page is where earns its place.
worked examples
a hole
. plugging in gives . factor: , cancel, and . the table agrees: at the original is 5.99, and at 3.01 it’s 6.01.
a square root
is again, and there’s nothing to factor. multiply top and bottom by the conjugate, , so the root squares away:
the cancels, and plugging in gives . at the original is 0.2498.
a jump, and a non-jump
for and for . from the left, . from the right, . the rule changes at 1 but the values meet, so , and since as well, is continuous there. change the second rule to and the right side heads to 3: the sides disagree, there is no limit, and jumps.
a blow-up
. the top heads to 3 and the bottom to 0, so the fraction blows up. which way: just left of 2 the bottom is a small negative number, so , and just right of it a small positive one, so . at the value is −299, at 2.01 it’s 301. the sides disagree, so the limit doesn’t exist in either sense, and is a vertical asymptote. square the bottom, , and both sides turn positive, 29,900 at 1.99: then .
at infinity
. divide top and bottom by : . at the ratio is 1.495, and at 1,000 it’s 1.4995. when the powers differ, the bigger one wins: and . at they’re 0.0101 and 99.02.
a limit made continuous
for , and . the limit at 1 is 2 and . they disagree, so isn’t continuous at 1, even though it has a value there: the graph is the line with a hole, plus a stray point at . set and it is continuous. the hole is filled with the limit, which is why this kind of break is called removable.
the key idea up close
the ε–δ definition
“as close as you like” has an exact form. means:
is the challenge: how close to the values must come. is the answer: how close to is close enough. the leaves itself out. the explore figure plays it: for every band there has to be a window, and the window may shrink as the band does. the limit fails when some band has no window.
a proof for the hole, at , . given , take . if , then , so , and
on a curve, how much may move depends on where you are. for at , : . keep , so that . then , and works. it isn’t the widest window, the figure finds , but any window that works is enough: the definition asks for one.
and why the jump has no limit. for and for , and suppose some worked. take . any window around 1 holds an on each side, with values 1.5 and 2, each within 0.25 of and so less than 0.5 apart. but they are exactly 0.5 apart. no works.
the other limits on this page have the same shape with one piece swapped. at infinity the window becomes a threshold: for every there is an with . a blow-up swaps the band for a floor: for every there is a with .
pitfalls
- isn’t an answer, and neither is “undefined”. it says the formula can’t tell you yet. factor, cancel, multiply by a conjugate, or squeeze, then try again. the answer can be any number, or none: , and are all at 1: the first two head to 2 and , and the third blows up
- the limit at isn’t . can be missing, or 3, while the limit is 2. they’re the same thing only when is continuous at , which is what continuous means. plugging in is a shortcut that needs that license
- isn’t a number. “the limit is ” means the limit doesn’t exist in a particular way: the values grow past every bound. don’t do arithmetic with it. and are as empty as : and are both as , and head to and 0
- a limit needs both sides. check the left and the right whenever the rule changes at , with an absolute value or a floor, or when a bottom changes sign, like at 0
- a limit law needs its limits to exist. at 0, though has no limit there. the product law says nothing, since one factor has no limit, and the squeeze does the work:
- floating point near a limit.
(1 - Math.cos(x)) / (x * x)heads to 0.5 as x shrinks, then goes wrong: 0.4999999970 at x = 1e-4, 0.5000444503 at 1e-6, 0.4996003611 at 1e-7, and exactly 0 at 1e-8. the mechanism: , which at is . the next double above 1 is away,1 and the next one below is half that, , since the exponent drops by one there. is nearer to 1 than to that neighbour, soMath.cos(1e-8)is exactly 1 and the top is . before that, subtracting two nearly equal numbers throws away most of their digits, which is the drift. the half-angle form, , is the same quantity with no subtraction in it, and gives 0.5 at 1e-8
practice
-
find and .
answer
the first is at 3, so factor: for , which heads to 6. the second isn’t : the bottom is 6 at , the function is continuous there, and plugging in gives .
-
find .
answer
multiply top and bottom by the conjugate, . the top becomes , the cancels, and what’s left is , which is at . check: at the original is 0.1666.
-
for and for . find both one-sided limits at 2, say whether the limit exists, and whether is continuous at 2.
answer
from the left, . from the right, . they disagree, so doesn’t exist, and isn’t continuous at 2. matches the right side only, so is continuous from the right there, and that’s all.
-
find and .
answer
divide the first by : . at it’s 2.5015. in the second the bottom’s power wins, so the limit is 0: divided by it’s , and at it’s 0.0030.
-
for , and . for which is continuous at 2?
answer
away from 2, , so the limit at 2 is 4. continuity needs to equal the limit: . any other leaves a hole filled in the wrong place.
-
find and .
answer
write the first as . as so does , and , so the limit is 3. check: at the ratio is 2.9996.
for the second, , so the fraction is , and the bracket heads to 1. the limit is . at the ratio is 0.49958. it’s the fraction from the last pitfall, and this form is the one that computes safely.
sources
-
mdn’s Number.EPSILON (opens in a new tab) reference page: the constant is the difference between 1 and the smallest floating point number greater than 1, 2⁻⁵² or about 2.22 × 10⁻¹⁶, because the double format has 52 bits for the mantissa. ↩