Limits and Continuity

Study Sheet

Limits and Continuity

Everything you need for AP Calculus BC, Topic 1

Limit Notation & the Intuitive Idea

Concept
What a limit means

The statement lim⁡x→af(x)=L\lim_{x\to a} f(x) = L means: as xx gets arbitrarily close to aa (from both sides) but x≠ax\neq a, the outputs f(x)f(x) get arbitrarily close to LL. A limit describes where a function is heading, not necessarily its value at aa. In fact f(a)f(a) may be undefined, or different from LL.

The limit describes the trend of the outputs near aa, not the output at aa. That separation is the whole point: the derivative is a limit of slopes f(a+h)−f(a)h\frac{f(a+h)-f(a)}{h}, an expression that is meaningless at h=0h=0 itself, so calculus needs a way to talk about where a quantity is heading without ever evaluating it there.

You can estimate a limit from a table (plug in values of xx close to aa from both sides) or from a graph (trace the curve toward x=ax=a from the left and the right).

Example
Estimating from a table
xy123123456
Away from x=2x=2 the function equals x+2x+2; at x=2x=2 there is a hole, but the heights around it close in on 44.

Estimate lim⁡x→2x2−4x−2\displaystyle\lim_{x\to 2}\frac{x^2-4}{x-2}.

x1.91.991.9992.0012.012.1f(x)3.93.993.9994.0014.014.1\begin{array}{c|ccc|ccc} x & 1.9 & 1.99 & 1.999 & 2.001 & 2.01 & 2.1\\\hline f(x) & 3.9 & 3.99 & 3.999 & 4.001 & 4.01 & 4.1 \end{array}

Both sides approach 44, so the limit is 44 (even though f(2)f(2) is undefined).

Side note
Where it goes wrong

Assuming a limit exists because the function is defined there, or vice versa. Existence of the limit is about the neighbors; the value at the point is separate. Check both one-sided limits.

Tip

Tip: The value f(a)f(a) is irrelevant to lim⁡x→af(x)\lim_{x\to a}f(x). Only the behavior near aa matters.

Try it
Quick check

Estimate lim⁡x→0sin⁡xx\displaystyle\lim_{x\to0}\frac{\sin x}{x} using x=±0.1x=\pm0.1 and x=±0.01x=\pm0.01 (radians).

Show the answer

Answer: 11. sin⁡0.10.1≈0.99833\dfrac{\sin0.1}{0.1}\approx0.99833 and sin⁡0.010.01≈0.99998\dfrac{\sin0.01}{0.01}\approx0.99998; the function is even, so the negative inputs give the same values. Both sides close in on 11 even though x=0x=0 itself gives 00\tfrac00.

Limit Laws & Evaluating Algebraically

Concept
Limit laws

If lim⁡x→af(x)\lim_{x\to a}f(x) and lim⁡x→ag(x)\lim_{x\to a}g(x) both exist, then limits distribute over sums, differences, products, quotients (denominator ≠0\neq 0), constant multiples, and powers/roots. Consequently, for any polynomial or rational function that is defined at aa, you may use direct substitution.

If f(x)f(x) is close to LL and g(x)g(x) is close to MM, then f(x)+g(x)f(x)+g(x) is close to L+ML+M and f(x)g(x)f(x)g(x) is close to LMLM; the laws make that precise. They let you break a limit into pieces you already know. The one law with a condition is the quotient law, and when the denominator's limit is 00 the algebra (factoring, conjugates) is what rescues the calculation.

Strategy when direct substitution gives 00\tfrac00 (indeterminate):

  • Factor and cancel the common factor.
  • Rationalize (multiply by the conjugate) when a square root appears.
  • Combine a complex fraction into a single fraction, then simplify.
Example
Factoring
lim⁡x→3x2−9x−3=lim⁡x→3(x−3)(x+3)x−3=lim⁡x→3(x+3)=6.\lim_{x\to 3}\frac{x^2-9}{x-3}=\lim_{x\to 3}\frac{(x-3)(x+3)}{x-3}=\lim_{x\to 3}(x+3)=6.
Example
Rationalizing (conjugate)
lim⁡x→0x+4−2x=lim⁡x→0(x+4−2)(x+4+2)x(x+4+2)=lim⁡x→0xx(x+4+2)=14.\lim_{x\to 0}\frac{\sqrt{x+4}-2}{x} =\lim_{x\to 0}\frac{(\sqrt{x+4}-2)(\sqrt{x+4}+2)}{x(\sqrt{x+4}+2)} =\lim_{x\to 0}\frac{x}{x(\sqrt{x+4}+2)}=\frac{1}{4}.
Example
Complex fraction
lim⁡x→21x−12x−2=lim⁡x→22−x2xx−2=lim⁡x→2−(x−2)2x(x−2)=lim⁡x→2−12x=−14.\lim_{x\to 2}\frac{\frac{1}{x}-\frac{1}{2}}{x-2} =\lim_{x\to 2}\frac{\frac{2-x}{2x}}{x-2} =\lim_{x\to 2}\frac{-(x-2)}{2x(x-2)} =\lim_{x\to 2}\frac{-1}{2x}=-\frac14.
Tip

Tip: 00\tfrac00 is indeterminate, not an answer — it signals you must simplify. But (nonzero)0\tfrac{(\text{nonzero})}{0} signals an infinite limit or a vertical asymptote.

Try it
Quick check

Evaluate lim⁡x→4x−2x−4\displaystyle\lim_{x\to4}\frac{\sqrt x-2}{x-4}.

Show the answer

Answer: 14\dfrac14. Substitution gives 00\tfrac00. Factor the denominator as a difference of squares: x−4=(x−2)(x+2)x-4=(\sqrt x-2)(\sqrt x+2), so the quotient is 1x+2→14\dfrac{1}{\sqrt x+2}\to\dfrac{1}{4}.

One-Sided Limits & When a Limit Fails to Exist

Concept
One-sided limits

lim⁡x→a−f(x)\displaystyle\lim_{x\to a^{-}}f(x) uses only x<ax<a (approach from the left); lim⁡x→a+f(x)\displaystyle\lim_{x\to a^{+}}f(x) uses only x>ax>a (approach from the right). The two-sided limit exists if and only if both one-sided limits exist and are equal:

lim⁡x→af(x)=L  ⟺  lim⁡x→a−f(x)=lim⁡x→a+f(x)=L.\lim_{x\to a}f(x)=L \iff \lim_{x\to a^{-}}f(x)=\lim_{x\to a^{+}}f(x)=L.

A two-sided limit asks the outputs to settle on one number no matter which side xx comes from. Checking each side separately is how you catch the functions that settle on two different numbers, such as step and piecewise functions, and it is the natural question at an endpoint, where only one side exists.

A limit fails to exist (DNE) when: the left and right limits disagree (a jump); the function grows without bound (±∞\pm\infty); or the function oscillates without settling (e.g. sin⁡(1/x)\sin(1/x) near 00).

Jump discontinuity at x=2x=2: lim⁡x→2−f=1\lim_{x\to2^{-}}f=1, lim⁡x→2+f=3\lim_{x\to2^{+}}f=3, so lim⁡x→2f\lim_{x\to2}f DNE.

Try it
Quick check

Let g(x)=x+1g(x)=x+1 for x<1x<1 and g(x)=3xg(x)=3x for x≥1x\ge1. Find lim⁡x→1−g(x)\displaystyle\lim_{x\to1^-}g(x), lim⁡x→1+g(x)\displaystyle\lim_{x\to1^+}g(x), g(1)g(1), and decide whether lim⁡x→1g(x)\displaystyle\lim_{x\to1}g(x) exists.

Show the answer

Answer: 22, 33, g(1)=3g(1)=3; the limit does not exist. Each side uses its own formula: 1+1=21+1=2 from the left, 3⋅1=33\cdot1=3 from the right. They disagree, so there is a jump at x=1x=1.

Infinite Limits & Limits at Infinity

Concept
Vertical vs. horizontal asymptotes
xy−6−4−22468−4−2246y = 1
y=x+1x−2y=\dfrac{x+1}{x-2}: blows up at x=2x=2 (vertical asymptote), levels off at y=1y=1 (horizontal).

An infinite limit, e.g. lim⁡x→af(x)=+∞\lim_{x\to a}f(x)=+\infty, means ff grows without bound near x=ax=a; the line x=ax=a is a vertical asymptote. A limit at infinity, e.g. lim⁡x→∞f(x)=L\lim_{x\to\infty}f(x)=L, describes end behavior; the line y=Ly=L is a horizontal asymptote.

Rational end behavior p(x)q(x)\dfrac{p(x)}{q(x)} as x→±∞x\to\pm\infty: compare degrees.

  • deg top << deg bottom ⇒\Rightarrow limit 00.
  • deg top == deg bottom ⇒\Rightarrow limit == ratio of leading coefficients.
  • deg top >> deg bottom ⇒\Rightarrow limit =±∞=\pm\infty (no horizontal asymptote).
Example
Rational limit at infinity
lim⁡x→∞3x2−5x6x2+1=lim⁡x→∞3−5x6+1x2=36=12.\lim_{x\to\infty}\frac{3x^2-5x}{6x^2+1} =\lim_{x\to\infty}\frac{3-\frac5x}{6+\frac1{x^2}}=\frac{3}{6}=\frac12.
Example
Radical end behavior (mind the sign)

For x→+∞x\to+\infty, x2=x\sqrt{x^2}=x, but for x→−∞x\to-\infty, x2=−x=∣x∣\sqrt{x^2}=-x=|x|.

lim⁡x→∞9x2+1x=lim⁡x→∞∣x∣9+1x2x=3,lim⁡x→−∞9x2+1x=−3.\lim_{x\to\infty}\frac{\sqrt{9x^2+1}}{x}=\lim_{x\to\infty}\frac{|x|\sqrt{9+\frac1{x^2}}}{x}=3, \qquad \lim_{x\to-\infty}\frac{\sqrt{9x^2+1}}{x}=-3.

Horizontal asymptote: lim⁡x→±∞3x2x2+1=3\displaystyle\lim_{x\to\pm\infty}\frac{3x^2}{x^2+1}=3.

Try it
Quick check

Evaluate lim⁡x→3+2x−3\displaystyle\lim_{x\to3^+}\frac{2}{x-3} and lim⁡x→∞5x2+12x2−x\displaystyle\lim_{x\to\infty}\frac{5x^2+1}{2x^2-x}.

Show the answer

Answer: +∞+\infty and 52\dfrac52. Just right of 33 the denominator is a tiny positive number, so the quotient is huge and positive. For the second, the degrees are equal, so the limit is the ratio of leading coefficients.

Continuity at a Point & Types of Discontinuity

Concept
The three conditions for continuity at x=ax=a

ff is continuous at aa if and only if all three hold:

  • f(a)f(a) is defined;
  • lim⁡x→af(x)\displaystyle\lim_{x\to a}f(x) exists;
  • lim⁡x→af(x)=f(a)\displaystyle\lim_{x\to a}f(x)=f(a).

Each condition rules out one way of breaking the graph. Without a value at aa there is a hole; without a limit there is a jump or a blow-up; with both but unequal, the dot has been moved off the curve. When all three hold, the value at aa is exactly what the nearby values predict, so the graph passes through without a break.

Types of discontinuity:

  • Removable (hole): lim⁡x→af\lim_{x\to a}f exists but ≠f(a)\neq f(a) (or f(a)f(a) undefined). Can be “patched.”
  • Jump: left and right limits exist but differ.
  • Infinite: the function blows up (vertical asymptote).

Removable discontinuity: lim⁡x→2f\lim_{x\to2}f exists but f(2)f(2) sits off the curve.

Try it
Quick check

Find kk so that f(x)=kx2f(x)=kx^2 for x≤2x\le2 and f(x)=3x+kf(x)=3x+k for x>2x>2 is continuous at x=2x=2.

Show the answer

Answer: k=2k=2. The left piece gives f(2)=4kf(2)=4k; the right piece approaches 6+k6+k. Continuity needs 4k=6+k4k=6+k, so 3k=63k=6.

IVT, Squeeze Theorem & the Special Trig Limit

Concept
Intermediate Value Theorem (IVT)

If ff is continuous on [a,b][a,b] and NN is any value between f(a)f(a) and f(b)f(b), then there exists at least one cc in (a,b)(a,b) with f(c)=Nf(c)=N. Common use: show a root exists by finding a sign change (f(a)<0<f(b)f(a)<0<f(b)).

Reminder — The Intermediate Value Theorem:  f continuous on [a,b], f(a)<k<f(b) ⟹ f(c)=k for some c∈(a,b)f \text{ continuous on } [a,b],\ f(a)<k<f(b) \ \Longrightarrow\ f(c)=k \text{ for some } c\in(a,b)
Example
IVT root existence
xy−0.50.51−112
A continuous path from (0,−1)(0,-1) to (1,1)(1,1) must cross the axis; here it does near x≈0.68x\approx0.68.

Let f(x)=x3+x−1f(x)=x^3+x-1 (continuous). f(0)=−1<0f(0)=-1<0 and f(1)=1>0f(1)=1>0, so by IVT there is a c∈(0,1)c\in(0,1) with f(c)=0f(c)=0.

Concept
Squeeze (Sandwich) Theorem
xy−1−0.50.5−1−0.50.5
x2sin⁡1xx^2\sin\frac1x wiggles between ±x2\pm x^2 (dashed), so it is squeezed to 00 at x=0x=0.

If g(x)≤f(x)≤h(x)g(x)\le f(x)\le h(x) near aa and lim⁡x→ag(x)=lim⁡x→ah(x)=L\lim_{x\to a}g(x)=\lim_{x\to a}h(x)=L, then lim⁡x→af(x)=L\lim_{x\to a}f(x)=L. Classic use: lim⁡x→0x2sin⁡(1/x)=0\lim_{x\to0}x^2\sin(1/x)=0 since −x2≤x2sin⁡(1/x)≤x2-x^2\le x^2\sin(1/x)\le x^2.

Concept
The special limit
 lim⁡x→0sin⁡xx=1 and consequentlylim⁡x→01−cos⁡xx=0.\boxed{\ \lim_{x\to0}\frac{\sin x}{x}=1\ }\qquad\text{and consequently}\qquad \lim_{x\to0}\frac{1-\cos x}{x}=0.
Tip

Tip: sin⁡xx→1\dfrac{\sin x}{x}\to1 only as x→0x\to0 with the same argument on top and bottom. Match them: sin⁡(5x)x=5⋅sin⁡(5x)5x→5\dfrac{\sin(5x)}{x}=5\cdot\dfrac{\sin(5x)}{5x}\to5.

Try it
Quick check

Evaluate lim⁡x→0sin⁡7x2x\displaystyle\lim_{x\to0}\frac{\sin7x}{2x}.

Show the answer

Answer: 72\dfrac72. Match the argument: sin⁡7x2x=72⋅sin⁡7x7x\dfrac{\sin7x}{2x}=\dfrac72\cdot\dfrac{\sin7x}{7x}, and sin⁡7x7x→1\dfrac{\sin7x}{7x}\to1.

Going Deeper: Advanced Limit Ideas

Concept
The formal ε\varepsilon–δ\delta definition

lim⁡x→af(x)=L\displaystyle\lim_{x\to a}f(x)=L means: for every ε>0\varepsilon>0 there exists δ>0\delta>0 such that

0<∣x−a∣<δ ⟹ ∣f(x)−L∣<ε.0<|x-a|<\delta \ \Longrightarrow\ |f(x)-L|<\varepsilon.

In words: no matter how tight a tolerance ε\varepsilon you demand around LL, you can find an input window δ\delta around aa that keeps f(x)f(x) inside that tolerance.

Example
An ε\varepsilon–δ\delta argument

Prove lim⁡x→3(2x−1)=5\lim_{x\to3}(2x-1)=5. Given ε>0\varepsilon>0, we need ∣(2x−1)−5∣<ε|(2x-1)-5|<\varepsilon, i.e. 2∣x−3∣<ε2|x-3|<\varepsilon. Choose δ=ε/2\delta=\varepsilon/2. Then 0<∣x−3∣<δ0<|x-3|<\delta forces ∣(2x−1)−5∣=2∣x−3∣<2δ=ε|(2x-1)-5|=2|x-3|<2\delta=\varepsilon. ■\blacksquare

Example
Piecewise continuity: solve for a parameter

Find kk making ff continuous everywhere, where

f(x)={x2−1x−1,x≠1k,x=1.f(x)=\begin{cases} \dfrac{x^2-1}{x-1}, & x\neq 1\\[2mm] k, & x=1.\end{cases}

For x≠1x\neq1, f(x)=x+1f(x)=x+1, so lim⁡x→1f(x)=2\lim_{x\to1}f(x)=2. Continuity requires f(1)=2f(1)=2, hence k=2k=2.

Example
Matching the argument: sin⁡(stuff)stuff\frac{\sin(\text{stuff})}{\text{stuff}}
lim⁡x→0sin⁡(3x)sin⁡(5x)=lim⁡x→0sin⁡(3x)3x⋅3xsin⁡(5x)5x⋅5x=1⋅31⋅5=35.\lim_{x\to0}\frac{\sin(3x)}{\sin(5x)} =\lim_{x\to0}\frac{\frac{\sin(3x)}{3x}\cdot 3x}{\frac{\sin(5x)}{5x}\cdot 5x} =\frac{1\cdot3}{1\cdot5}=\frac35.
Example
The 1−cos⁡xx\frac{1-\cos x}{x} family

Multiply by the conjugate 1+cos⁡x1+\cos x:

lim⁡x→01−cos⁡xx=lim⁡x→01−cos⁡2xx(1+cos⁡x)=lim⁡x→0sin⁡xx⋅sin⁡x1+cos⁡x=1⋅02=0.\lim_{x\to0}\frac{1-\cos x}{x}=\lim_{x\to0}\frac{1-\cos^2 x}{x(1+\cos x)}=\lim_{x\to0}\frac{\sin x}{x}\cdot\frac{\sin x}{1+\cos x}=1\cdot\frac{0}{2}=0.

A related result: lim⁡x→01−cos⁡xx2=12.\displaystyle\lim_{x\to0}\frac{1-\cos x}{x^2}=\frac12.

Concept
L'Hôpital preview

If lim⁡fg\lim\frac{f}{g} has indeterminate form 00\frac00 or ∞∞\frac{\infty}{\infty} and f,gf,g are differentiable, then

lim⁡x→af(x)g(x)=lim⁡x→af′(x)g′(x).\lim_{x\to a}\frac{f(x)}{g(x)}=\lim_{x\to a}\frac{f'(x)}{g'(x)}.

Example: lim⁡x→0sin⁡xx=L’Hlim⁡x→0cos⁡x1=1\lim_{x\to0}\frac{\sin x}{x}\overset{\text{L'H}}{=}\lim_{x\to0}\frac{\cos x}{1}=1. (You will prove this rigorously later; it is a fast check now.)

Example
Limits with the floor function ⌊x⌋\lfloor x\rfloor

⌊x⌋\lfloor x\rfloor is the greatest integer ≤x\le x, so it jumps at every integer.

lim⁡x→2−⌊x⌋=1,lim⁡x→2+⌊x⌋=2,lim⁡x→2⌊x⌋ DNE.\lim_{x\to2^{-}}\lfloor x\rfloor=1,\qquad \lim_{x\to2^{+}}\lfloor x\rfloor=2,\qquad \lim_{x\to2}\lfloor x\rfloor \text{ DNE.}

But at a non-integer, e.g. lim⁡x→2.5⌊x⌋=2\lim_{x\to2.5}\lfloor x\rfloor=2 (it is locally constant).

Tip

Big picture: Every limit technique answers one question — does the function settle to a single finite value as xx approaches aa? Substitution first; if 00\frac00, simplify (factor / conjugate / common denominator / trig identity); if still stuck, L'Hôpital or Squeeze.

Reminder — L'Hôpital's Rule:  lim⁡x→cf(x)g(x)=lim⁡x→cf′(x)g′(x)when 00 or ∞∞\lim_{x\to c}\frac{f(x)}{g(x)} = \lim_{x\to c}\frac{f'(x)}{g'(x)} \quad\text{when } \tfrac{0}{0} \text{ or } \tfrac{\infty}{\infty}
Try it
Quick check

Evaluate lim⁡x→01−cos⁡2xx2\displaystyle\lim_{x\to0}\frac{1-\cos2x}{x^2}.

Show the answer

Answer: 22. Use 1−cos⁡2x=2sin⁡2x1-\cos2x=2\sin^2x: the quotient is 2(sin⁡xx)2→2⋅1=22\left(\dfrac{\sin x}{x}\right)^2\to2\cdot1=2.

Why It Works

The squeeze theorem: if g(x)≤f(x)≤h(x)g(x) \le f(x) \le h(x) near aa and both gg and hh tend to LL, then ff is trapped and tends to LL too. This proves lim⁡x→0sin⁡xx=1\lim_{x\to0}\tfrac{\sin x}{x} = 1: comparing the areas of a triangle, a sector and a larger triangle in the unit circle gives cos⁡x≤sin⁡xx≤1\cos x \le \tfrac{\sin x}{x} \le 1 for small xx, and cos⁡x→1\cos x \to 1. The intermediate value theorem is a property of the real numbers themselves (they have no gaps), which is why it fails for functions on the rationals.

Reminder — The Squeeze Theorem:  g(x)≤f(x)≤h(x)  and lim⁡g=lim⁡h=L ⟹ lim⁡f=Lg(x)\le f(x)\le h(x) \ \text{ and } \lim g=\lim h=L \ \Longrightarrow\ \lim f = L
Tip
Reading a proof

Do not read a proof the way you read a rule. Cover the last line, ask what the previous line forces, and only then uncover it. If a step feels like magic, that is the step to work by hand with a concrete number.

Formulas, Proofs & Tips

Tip
The difference quotient and the derivative
f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}

What it means. The slope of the tangent line — the instantaneous rate of change.

Example. For f(x)=x2f(x)=x^2: f′(x)=lim⁡h→0(x+h)2−x2h=2xf'(x)=\lim_{h\to0}\tfrac{(x+h)^2-x^2}{h}=2x.

Why it works. f(x+h)−f(x)h\tfrac{f(x+h)-f(x)}{h} is the slope of the secant through two nearby points. Letting h→0h\to 0 slides the second point into the first, so the secant becomes the tangent.

Tip. The hh must cancel before you substitute h=0h=0; otherwise you get the meaningless 00\tfrac00.

Tip
L'Hôpital's Rule
lim⁡x→cf(x)g(x)=lim⁡x→cf′(x)g′(x)when 00 or ∞∞\lim_{x\to c}\frac{f(x)}{g(x)} = \lim_{x\to c}\frac{f'(x)}{g'(x)} \quad\text{when } \tfrac{0}{0} \text{ or } \tfrac{\infty}{\infty}

What it means. If a limit gives the indeterminate form 00\tfrac{0}{0} or ∞∞\tfrac{\infty}{\infty}, differentiate the top and bottom separately and try again.

Why it works. Near cc both functions are approximated by their tangent lines, f(x)≈f′(c)(x−c)f(x)\approx f'(c)(x-c) and g(x)≈g′(c)(x−c)g(x)\approx g'(c)(x-c). The common factor (x−c)(x-c) cancels in the ratio, leaving f′(c)g′(c)\tfrac{f'(c)}{g'(c)}.

Tip. Check the form FIRST — applying it to a limit that isn't indeterminate gives a wrong answer. It is not the quotient rule: do not differentiate fg\tfrac{f}{g} as a whole.

Tip
The Squeeze Theorem
g(x)≤f(x)≤h(x)  and lim⁡g=lim⁡h=L ⟹ lim⁡f=Lg(x)\le f(x)\le h(x) \ \text{ and } \lim g=\lim h=L \ \Longrightarrow\ \lim f = L

What it means. If a function is trapped between two others that meet at LL, it must go to LL too.

Example. Since −x2≤x2sin⁡1x≤x2-x^2\le x^2\sin\tfrac1x\le x^2 and both bounds →0\to0, the limit at 00 is 00.

Why it works. Beyond some point ff never leaves the gap between gg and hh. As that gap closes to zero width around LL, ff has nowhere else to go.

Tip. The classic use is lim⁡x→0x2sin⁡1x=0\lim_{x\to 0}x^{2}\sin\tfrac1x = 0, squeezed by −x2-x^{2} and x2x^{2}.

Tip
The Intermediate Value Theorem
f continuous on [a,b], f(a)<k<f(b) ⟹ f(c)=k for some c∈(a,b)f \text{ continuous on } [a,b],\ f(a)<k<f(b) \ \Longrightarrow\ f(c)=k \text{ for some } c\in(a,b)

What it means. A continuous graph cannot skip a value on its way from f(a)f(a) to f(b)f(b).

Example. f(x)=x2−2f(x)=x^2-2 is −2-2 at x=0x=0 and 22 at x=2x=2, so it equals 00 somewhere between (at 2\sqrt2).

Why it works. Continuity means the graph is drawn without lifting the pen; to get from below kk to above kk the pen must cross the line y=ky=k.

Tip. This is how you prove a root exists: if ff changes sign between aa and bb, there is a zero in between.