Your first idea of continuity is probably the right one: a function is continuous at a point if you can draw its graph through that point without lifting your pen. Here we make that idea precise using limits. You will test piecewise functions, find the constants that make a function continuous, and see how continuity is related to differentiability.
We call a function continuous if it is continuous at every point of its domain. Polynomials, sinx, cosx, ex and ∣x∣ are continuous everywhere, and rational functions are continuous wherever the denominator is non-zero (x1 is continuous on its domain, which excludes 0).
This saves a lot of work: add, subtract, multiply or divide continuous functions (with a non-zero denominator) and the result is continuous. The same goes for composites.
Example 1.f(x)={3x−1,x2+1,x≤2x>2. The left limit is 5, the right limit is 5, and f(2)=5. So it is continuous at 2, and hence everywhere.
Both pieces reach (2, 5): the graph is drawn without lifting the pen.
Example 2.f(x)={x−4x2−16,7,x=4x=4. Here x→4limf(x)=8=7, so the function is discontinuous at 4.
The limit at 4 is 8, but the value there is 7.
Example 3. The greatest integer function [x] is discontinuous at every integer. At n, the left limit is n−1 but the right limit is n.
The greatest integer function jumps up by 1 at every integer.
Example 4 (finding a constant).f(x)={kx+1,cosx,x≤πx>π is continuous at π when the two pieces meet, that is, when kπ+1=−1, which gives k=−π2.
Example 5.f(x)=⎩⎨⎧ax+1,5,bx−4,x≤11<x<3x≥3. Matching the pieces at 1 gives a+1=5, and at 3 gives 3b−4=5. So a=4, b=3.
f is differentiable atc if f′(c)=h→0limhf(c+h)−f(c) exists, which means the left and right difference quotients agree.
Every differentiable function is continuous, but the reverse is false. Take ∣x∣: it is continuous at 0, yet the left and right quotients are −1 and 1, so it has no derivative there. You can see the reason on the graph, a sharp corner.
y = |x| is continuous at 0 but has a corner there.
Example 6.f(x)=∣x−3∣ is continuous everywhere but not differentiable at 3. On the other hand, f(x)=x∣x∣ is differentiable at 0, since both quotients tend to 0.