With­out lift­ing the pen

Your first idea of con­ti­nu­ity is prob­a­bly the right one: a func­tion is con­tin­u­ous at a point if you can draw its graph through that point with­out lift­ing your pen. Here we make that idea pre­cise using lim­its. You will test piece­wise func­tions, find the con­stants that make a func­tion con­tin­u­ous, and see how con­ti­nu­ity is related to dif­fer­en­tia­bil­ity.

Con­ti­nu­ity

ff is con­tin­u­ous at cc (in its domain) if

lim⁡x→c−f(x)=lim⁡x→c+f(x)=f(c).\displaystyle \lim_{x \to c^-} f(x) = \lim_{x \to c^+} f(x) = f(c).

We call a func­tion con­tin­u­ous if it is con­tin­u­ous at every point of its domain. Poly­no­mi­als, sin⁡x\sin x, cos⁡x\cos x, exe^x and ∣x∣\lvert x \rvert are con­tin­u­ous every­where, and ratio­nal func­tions are con­tin­u­ous wher­ever the denom­i­na­tor is non-zero (1x\displaystyle \tfrac{1}{x} is con­tin­u­ous on its domain, which excludes 00).

This saves a lot of work: add, sub­tract, mul­ti­ply or divide con­tin­u­ous func­tions (with a non-zero denom­i­na­tor) and the result is con­tin­u­ous. The same goes for com­pos­ites.

Exam­ple 1. f(x)={3x−1,x≤2x2+1,x>2f(x) = \begin{cases} 3x - 1, & x \le 2 \\ x^2 + 1, & x > 2 \end{cases}. The left limit is 55, the right limit is 55, and f(2)=5f(2) = 5. So it is con­tin­u­ous at 22, and hence every­where.

Graph of the line y = 3x - 1 up to x = 2 joined to the curve y = x squared + 1 after x = 2; both pieces reach the point (2, 5), so the graph has no break.
Both pieces reach (2, 5): the graph is drawn with­out lift­ing the pen.

Exam­ple 2. f(x)={x2−16x−4,x≠47,x=4\displaystyle f(x) = \begin{cases} \frac{x^2 - 16}{x - 4}, & x \ne 4 \\ 7, & x = 4 \end{cases}. Here lim⁡x→4f(x)=8≠7\displaystyle \lim_{x \to 4} f(x) = 8 \ne 7, so the func­tion is dis­con­tin­u­ous at 44.

The line y = x + 4 with an open circle at (4, 8), where the limit is 8, and a separate filled dot at (4, 7) showing the value f(4) = 7 below the gap.
The limit at 4 is 8, but the value there is 7.

Exam­ple 3. The great­est inte­ger func­tion [x][x] is dis­con­tin­u­ous at every inte­ger. At nn, the left limit is n−1n - 1 but the right limit is nn.

Step graph of y = [x] from -3 to 3: flat steps with a filled dot at each left end and an open circle at each right end; at x = 2 the left limit is 1 and the right limit 2.
The great­est inte­ger func­tion jumps up by 1 at every inte­ger.

Exam­ple 4 (find­ing a con­stant). f(x)={kx+1,x≤πcos⁡x,x>πf(x) = \begin{cases} kx + 1, & x \le \pi \\ \cos x, & x > \pi \end{cases} is con­tin­u­ous at π\pi when the two pieces meet, that is, when kπ+1=−1k\pi + 1 = -1, which gives k=−2π\displaystyle k = -\tfrac{2}{\pi}.

Exam­ple 5. f(x)={ax+1,x≤15,1<x<3bx−4,x≥3f(x) = \begin{cases} ax + 1, & x \le 1 \\ 5, & 1 < x < 3 \\ bx - 4, & x \ge 3 \end{cases}. Match­ing the pieces at 11 gives a+1=5a + 1 = 5, and at 33 gives 3b−4=53b - 4 = 5. So a=4a = 4, b=3b = 3.

Dif­fer­en­tia­bil­ity

ff is dif­fer­en­tiable at cc if f′(c)=lim⁡h→0f(c+h)−f(c)h\displaystyle f'(c) = \lim_{h \to 0}\tfrac{f(c + h) - f(c)}{h} exists, which means the left and right dif­fer­ence quo­tients agree.

Every dif­fer­en­tiable func­tion is con­tin­u­ous, but the reverse is false. Take ∣x∣\lvert x \rvert: it is con­tin­u­ous at 00, yet the left and right quo­tients are −1-1 and 11, so it has no deriv­a­tive there. You can see the rea­son on the graph, a sharp cor­ner.

Graph of y = |x|, a V shape with slope -1 on the left and slope 1 on the right, meeting in a sharp corner at the origin where there is no derivative.
y = |x| is con­tin­u­ous at 0 but has a cor­ner there.

Exam­ple 6. f(x)=∣x−3∣f(x) = \lvert x - 3 \rvert is con­tin­u­ous every­where but not dif­fer­en­tiable at 33. On the other hand, f(x)=x∣x∣f(x) = x\lvert x \rvert is dif­fer­en­tiable at 00, since both quo­tients tend to 00.

Try these your­self

  1. Is f(x)=2x2−5x+3f(x) = 2x^2 - 5x + 3 con­tin­u­ous at x=1x = 1? Every­where?
  2. Exam­ine con­ti­nu­ity of f(x)={x+4,x<15x,x≥1f(x) = \begin{cases} x + 4, & x < 1 \\ 5x, & x \ge 1 \end{cases} at x=1x = 1.
  3. Find all points of dis­con­ti­nu­ity of f(x)=x+2x2−9\displaystyle f(x) = \frac{x + 2}{x^2 - 9} and of [2x][2x] on [0,2][0, 2].
  4. Find kk so that f(x)={sin⁡3xx,x≠0k,x=0\displaystyle f(x) = \begin{cases} \frac{\sin 3x}{x}, & x \ne 0 \\ k, & x = 0 \end{cases} is con­tin­u­ous at 00.
  5. Find aa and bb so that f(x)={2,x≤0ax+b,0<x<410,x≥4f(x) = \begin{cases} 2, & x \le 0 \\ ax + b, & 0 < x < 4 \\ 10, & x \ge 4 \end{cases} is con­tin­u­ous every­where.
  6. Is f(x)={x2sin⁡1x,x≠00,x=0\displaystyle f(x) = \begin{cases} x^2 \sin\frac{1}{x}, & x \ne 0 \\ 0, & x = 0 \end{cases} con­tin­u­ous at 00?
  7. Show that f(x)=∣x+2∣f(x) = \lvert x + 2 \rvert is con­tin­u­ous but not dif­fer­en­tiable at x=−2x = -2.
  8. Is f(x)=∣x∣+∣x−1∣f(x) = \lvert x \rvert + \lvert x - 1 \rvert dif­fer­en­tiable at 00 and 11?
  9. Give a func­tion that is con­tin­u­ous on R\mathbf{R} but not dif­fer­en­tiable at x=5x = 5.
  10. Is f(x)=[x]f(x) = [x] dif­fer­en­tiable at x=2.5x = 2.5? At x=2x = 2?

Answers to check against

Show answers
  1. Yes; yes (poly­no­mial).
  2. The left limit is 55, the right 55, and f(1)=5f(1) = 5, so it is con­tin­u­ous.
  3. x=±3x = \pm 3; x=12,1,32,2\displaystyle x = \tfrac{1}{2}, 1, \tfrac{3}{2}, 2 (and 00 from the right is fine).
  4. k=3k = 3.
  5. b=2b = 2, 4a+2=104a + 2 = 10: a=2a = 2.
  6. Yes, because ∣x2sin⁡1x∣≤x2→0\displaystyle \lvert x^2\sin\tfrac{1}{x} \rvert \le x^2 \to 0.
  7. Left and right lim­its are 0=f(−2)0 = f(-2); the one-sided quo­tients are −1-1 and 11.
  8. Not dif­fer­en­tiable at either (both are cor­ners).
  9. ∣x−5∣\lvert x - 5 \rvert.
  10. Yes (deriv­a­tive 00); no, since it is not even con­tin­u­ous there.