Topic 2.4

Compare one-sided slopes

Builds on checking that a function is continuous before looking for a derivative. 7 minutes.

A walker passes a bus stop

The graph shows a person's distance d from a bus stop, in meters, against the time t in seconds. It has a sharp corner at t = 4, when the person passes the stop.

The orange line joins the corner to a point on the right, and the chalk line joins it to a point on the left. Each line's rise is red where the distance falls and green where it grows. Move the slider toward 0.

The chalk line has slope −3 at every position, because the distance falls 3 meters each second before the stop. The limit of these slopes is the left-hand slope, −3.

The orange line has slope 3, because the distance grows 3 meters each second after the stop, so the right-hand slope is 3.

A derivative must be one number, but these one-sided slopes differ, so d′(4) does not exist. No single line fits the corner, however close the points come.

Two slopes meeting at one point

The graph is joined at the orange dot above \(a\). The red half-lines show the slope \(\cr{m_L}\) of the left piece and the slope \(\cr{m_R}\) of the right piece.

Move the slider to tilt the right piece. While \(m_R\) differs from \(m_L\), the half-lines form a corner at the dot, and the corner stays sharp however closely you look.

Press "Remove the tilt". When \(m_R\) equals \(m_L\), the two half-lines join into one line and the corner disappears.

The derivative exists when the left slope and the right slope are equal, and only then.

Notation

  1. The left-hand slope is the limit of the slopes of the chalk lines from the left, where \(h\) is negative.

    \[f'_-(a) = \lim_{h\to 0^-}\dfrac{f(a+h)-f(a)}{h}\]
  2. The right-hand slope is the limit of the slopes of the orange lines from the right, where \(h\) is positive.

    \[f'_+(a) = \lim_{h\to 0^+}\dfrac{f(a+h)-f(a)}{h}\]
  3. If the pieces meet at \(a\), each one-sided slope is the slope at \(a\) of the piece on that side, because \(f\) equals that piece.

  4. The derivative exists when both one-sided slopes exist and are equal. If they differ, the graph has a corner and no derivative.

    \[f'(a) \text{ exists} \iff \cy{f'_-(a) = f'_+(a)}\]

When it fails

The graph is joined at \(a\), so \(f\) is continuous there. If you tilt the right piece, the one-sided slopes differ, so a corner appears and \(f'(a)\) does not exist.

Continuity is not enough, because the one-sided slopes must also be equal.

Example 1: two lines

Let \(f(x) = x + 2\) for \(x < 1\) and \(f(x) = 4x - 1\) for \(x \ge 1\). Does \(f'(1)\) exist?

  1. The pieces meet at 1, because the left piece gives \(1+2 = 3\) and the right piece gives \(4-1 = 3\).

  2. The left-hand slope uses \(h < 0\). Because the left piece is a line, the chalk line has slope 1 for every such \(h\).

    \[\dfrac{(1+h)+2-3}{h} = 1\]
  3. The right-hand slope uses \(h > 0\), and the orange line has slope 4 for every such \(h\).

    \[\dfrac{4(1+h)-1-3}{h} = 4\]
  4. The slopes 1 and 4 differ, so the red half-lines form a corner and \(f'(1)\) does not exist.

    \[\cy{f'_-(1) = 1 \ne 4 = f'_+(1)}\]

Example 2: a parabola and a line

Let \(g(x) = x^2\) for \(x < 1\) and \(g(x) = 3x - 2\) for \(x \ge 1\). Does \(g'(1)\) exist?

  1. The pieces meet: \(1^2 = 1\) and \(3 - 2 = 1\), so the graph is joined.

  2. A tempting wrong move: Differentiate \(x^2\) and substitute 1 for \(x\). This gives \(g'(1) = 2\).

    \[\cr{2x \big|_{x=1} = 2}\]

    The formula \(x^2\) describes only the left piece, so 2 is only the left-hand slope. The right piece \(3x-2\) leaves the dot more steeply than the red line of slope 2.

  3. Find the slope of each piece at 1. The left piece has slope \(2x = 2\), and the right piece has slope 3.

    \[\cy{g'_-(1) = 2, \qquad g'_+(1) = 3}\]
  4. The slopes 2 and 3 differ, so \(g'(1)\) does not exist.

    \[\cy{g'(1) \text{ does not exist}}\]

Practice

Let \(f(x) = 2x^2\) for \(x \le 1\) and \(f(x) = 4x - 2\) for \(x > 1\). Does \(f'(1)\) exist? If it does, find it.

Check that the pieces meet at 1. Then move the slider toward 0 and compare the two slope readouts.

Solution
  1. The pieces meet, because \(2\cdot 1^2 = 2\) and \(4-2 = 2\).

  2. The left piece has slope \(4x\), which is 4 at 1. The right piece has slope 4.

    \[f'_-(1) = 4, \qquad f'_+(1) = 4\]
  3. The slopes are equal, so the derivative exists and one orange tangent line fits both sides.

    \[\cy{f'(1) = 4}\]

Questions

Questions 1 and 2 use the graph of the walker's distance from the bus stop. Question 3 needs a calculation.

  1. The chalk point at \((2, 6)\) lies to the left of the corner, and the chalk line joins it to the corner. What is the left-hand slope of \(d\) at \(t = 4\)?

    • −3
    • 3
    • 0
    • It does not exist.
    Answer

    −3

  2. What can you say about \(d'(4)\)?

    • It does not exist, because the slopes −3 and 3 differ.
    • It is 0, the average of −3 and 3.
    • It is 3, because the graph is joined.
    • It is −3, because the person walks toward the stop.
    Answer

    It does not exist, because the slopes −3 and 3 differ.

  3. Let \(f(x) = 3x - 1\) for \(x < 2\) and \(f(x) = x^2 + 1\) for \(x \ge 2\). Does \(f'(2)\) exist?

    • No. The pieces meet, but the slopes are 3 and 4.
    • Yes. Both pieces give 5 at 2.
    • Yes. The slope is the average, 3.5.
    • No. The values at 2 are different.
    Answer

    No. The pieces meet, but the slopes are 3 and 4.

Summary

You find the slope from the left and the slope from the right at the point and compare them.

The derivative exists only when they are equal, because a derivative is one limit and a corner gives two different slopes.

You use it at the join of a piecewise function and at any sharp point of a graph.

This is one of five skills in topic 2.4 of Which & Why: AP Calculus.