Math Core

Lesson 2.3 · Differentiation: Definition and Basic Rules

Differentiability

The derivative is a limit, and limits don't always exist. So some functions have points where there is no derivative: no well-defined slope, no tangent line you can write down. This lesson shows what those points look like, how differentiability relates to continuity, and how to test a piecewise function, which is a classic AP question.

What differentiable means

A function ff is differentiable at x=ax = a if f′(a)=lim⁡h→0f(a+h)−f(a)hf'(a) = \displaystyle \lim_{h \to 0} \frac{f(a + h) - f(a)}{h} exists as a finite number. A two-sided limit exists only when both one-sided limits exist and agree, so you can split the question in two:

  • the left-hand derivative uses h→0−h \to 0^- (secant lines from points to the left of aa),
  • the right-hand derivative uses h→0+h \to 0^+ (secant lines from points to the right).

The function is differentiable at aa exactly when both of these exist, are finite, and are equal. Visually, if you zoom in far enough on the graph near aa, it looks like a straight, non-vertical line.

Three ways to fail

Corners

y = |x − 2| has a corner at x = 2.Open in grapher →

To the left of x=2x = 2, the graph of y=∣x−2∣y = |x - 2| is the line y=2−xy = 2 - x with slope −1-1. To the right, it is y=x−2y = x - 2 with slope 11. The left-hand derivative is −1-1 and the right-hand derivative is 11. They disagree, so f′(2)f'(2) does not exist. No matter how far you zoom in, the corner stays a corner.

Cusps and vertical tangents

y = x^(2/3) has a cusp at 0; y = x^(1/3) has a vertical tangent at 0.Open in grapher →

Both of these graphs are continuous at x=0x = 0, but the secant slopes blow up there. For y=x1/3y = x^{1/3}, the slopes approach +∞+\infty from both sides: the tangent line is vertical, and a vertical line has no slope. For y=x2/3y = x^{2/3}, the slopes approach −∞-\infty from the left and +∞+\infty from the right, making a sharp point called a cusp. In both cases f′(0)f'(0) does not exist.

Discontinuities

If ff has a hole, jump or vertical asymptote at aa, it is not differentiable at aa. This follows from an important theorem.

Differentiability implies continuity

If ff is differentiable at x=ax = a, then ff is continuous at x=ax = a.

The converse is false: a function can be continuous at a point without being differentiable there. y=∣x−2∣y = |x - 2| at x=2x = 2 is the standard example.

Here's why the theorem is true. For x≠ax \ne a,

f(x)−f(a)=f(x)−f(a)x−a⋅(x−a)f(x) - f(a) = \frac{f(x) - f(a)}{x - a} \cdot (x - a)

As x→ax \to a, the fraction approaches f′(a)f'(a) and (x−a)(x - a) approaches 00, so f(x)−f(a)→f′(a)⋅0=0f(x) - f(a) \to f'(a) \cdot 0 = 0. That means lim⁡x→af(x)=f(a)\displaystyle \lim_{x \to a} f(x) = f(a), which is the definition of continuity.

The contrapositive is often more useful: if ff is not continuous at aa, it is not differentiable at aa. Always check continuity first.

Testing a piecewise function

For a piecewise function built from polynomials (or other smooth pieces), the only suspicious point is where the rule changes. At that point:

  1. Check continuity. The two pieces must meet: the left and right limits must both equal f(a)f(a). If they don't, stop: ff is not differentiable.
  2. Check that the slopes match. Differentiate each piece and evaluate both derivatives at aa. If they agree, ff is differentiable at aa.

Worked example: A smooth join

Is f(x)={x2,x≤12x−1,x>1f(x) = \begin{cases} x^2, & x \le 1 \\ 2x - 1, & x > 1 \end{cases} differentiable at x=1x = 1?

Continuity: the left piece gives 12=11^2 = 1 and the right piece approaches 2(1)−1=12(1) - 1 = 1. Both equal f(1)=1f(1) = 1, so ff is continuous at 1.

Slopes: the slope of x2x^2 at x=1x = 1 is 22 (from ddxx2=2x\frac{d}{dx}x^2 = 2x, found with the definition last lesson). The line 2x−12x - 1 has slope 22. They match.

So ff is differentiable at x=1x = 1, and f′(1)=2f'(1) = 2. In fact y=2x−1y = 2x - 1 is the tangent line to y=x2y = x^2 at x=1x = 1, so the pieces blend seamlessly.

Worked example: Finding constants that make it work

Find aa and bb so that f(x)={ax2,x≤24x+b,x>2f(x) = \begin{cases} ax^2, & x \le 2 \\ 4x + b, & x > 2 \end{cases} is differentiable everywhere.

Each piece is differentiable on its own, so only x=2x = 2 matters. You need two conditions, and you have two unknowns.

Slopes match: the derivative of ax2ax^2 is 2ax2ax, which is 4a4a at x=2x = 2. The line has slope 44. So 4a=44a = 4 and a=1a = 1.

Continuity: a(2)2=4(2)+ba(2)^2 = 4(2) + b, so 4a=8+b4a = 8 + b. With a=1a = 1, b=−4b = -4.

Check: f(x)=x2f(x) = x^2 for x≤2x \le 2 and 4x−44x - 4 for x>2x > 2. Both give 44 at x=2x = 2, and both have slope 44 there.

Common mistake

Matching derivatives is not enough on its own. If f(x)=x2f(x) = x^2 for x≤1x \le 1 and 2x+52x + 5 for x>1x > 1, the slopes both equal 2 at x=1x = 1, but the pieces don't meet (1≠71 \ne 7). The function has a jump, so it is not differentiable at 1. Check continuity first.

Tip

Graphing-calculator displays can hide non-differentiable points. A corner on y=∣x2−4∣y = |x^2 - 4| looks sharp, but a vertical tangent can look like an ordinary steep curve. When you have a formula, test the point algebraically.

Practice

Practice 1

Which statement is always true?

Practice 2

At which value of xx is f(x)=∣x+3∣f(x) = |x + 3| not differentiable?

Practice 3

Let f(x)={x2+1,x<12x,x≥1f(x) = \begin{cases} x^2 + 1, & x < 1 \\ 2x, & x \ge 1 \end{cases}. Which statement is true about ff at x=1x = 1?

Practice 4

Let f(x)={3x+1,x<2x2+k,x≥2f(x) = \begin{cases} 3x + 1, & x < 2 \\ x^2 + k, & x \ge 2 \end{cases}. Find the value of kk that makes ff continuous at x=2x = 2. (With that kk, is ff differentiable at 2?)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Find the constants aa and bb that make f(x)={ax+b,x<1x3,x≥1f(x) = \begin{cases} ax + b, & x < 1 \\ x^3, & x \ge 1 \end{cases} differentiable at x=1x = 1. Enter your answer as (a,b)(a, b).

Enter a point like (2, -3)

Practice 6

The graph of g(x)=x1/3g(x) = x^{1/3} passes through the origin. Which best describes gg at x=0x = 0?

Practice 7

Find all values of xx where f(x)=∣x2−4∣f(x) = |x^2 - 4| is not differentiable.

Separate answers with commas, e.g. 2, -5

Practice 8

Let h(x)={x2−1,x≤0x+1,x>0h(x) = \begin{cases} x^2 - 1, & x \le 0 \\ x + 1, & x > 0 \end{cases}. Which statement is true?