Topic 2.4

Make a piecewise join differentiable

Builds on recognizing a vertical tangent or a cusp. 7 minutes.

Fitting a line to a parabola

The left piece is the parabola \(y = x^2\) for \(x \le 1\), which ends at the orange dot \((1, 1)\). The right piece is a line that starts at \(x = 1\), and the sliders set its height and its slope there.

The red segment shows the gap between the two pieces. Move the first slider until the line starts at height 1. The gap closes, so the graph is joined, but it still has a corner at the dot.

The faint orange line is the tangent of the parabola at the dot, and its slope is 2. Move the second slider from 3 to 2. The line now lies along the tangent, so the corner disappears.

The graph needed two matches at x = 1: the same height and the same slope.

Two matches at the join

The left piece \(F\) and the right piece \(G\) meet at \(x = a\), and the sliders change \(G\).

The first match is the value. If the heights differ, the red segment shows a gap, so the graph jumps and has no derivative at a.

The second match is the slope. If the heights match but the slopes differ, the graph has a corner and again no derivative. To avoid the corner, G must lie along the faint orange tangent of F.

When both matches hold, the graph has no gap and no corner, and the derivative exists at a.

Notation

  1. Match the values. Both pieces must give the same output at \(a\).

    \[F(a) = G(a)\]
  2. Match the slopes. Both pieces must have the same derivative at \(a\).

    \[F'(a) = G'(a)\]
  3. If the pieces contain unknown constants, write each match as an equation and solve the two equations together. Often the slope equation gives one constant, and the value equation then gives the other.

  4. When both equations hold, the graph is joined and has no corner, so the piecewise function \(f\) has a derivative at \(a\).

    \[\begin{aligned} \cy{F(a)} &= \cy{G(a)} \\ \cy{F'(a)} &= \cy{G'(a)} \end{aligned}\]

When it fails

If the values do not match, the graph jumps at a. Lift the right piece to open the red gap.

A function with a jump is not continuous at a, so it has no derivative there. Equal slopes cannot repair this, because the pieces do not meet.

Example 1: a line from a cubic

Let \(f(x) = x^3\) for \(x \le 1\) and \(f(x) = ax + b\) for \(x > 1\). Find \(a\) and \(b\) so that \(f\) is differentiable at 1.

  1. The slopes must match at 1. The cubic has slope \(3x^2\), which is 3 there, and the line has slope \(a\).

    \[a = 3\]
  2. The values must match too. The cubic gives \(1^3 = 1\), and the line gives \(a + b\) with \(a = 3\).

    \[3 + b = 1\]
  3. Solve for \(b\). The right piece is the line \(3x - 2\), which is the tangent of the cubic at \((1, 1)\).

    \[\cy{a = 3, \qquad b = -2}\]

Example 2: two unknowns

Let \(f(x) = ax^2 + 1\) for \(x \le 1\) and \(f(x) = bx + 3\) for \(x > 1\). Find \(a\) and \(b\) so that \(f\) is differentiable at 1.

  1. The two pieces must give the same value at 1.

    \[a + 1 = b + 3\]
  2. A tempting wrong move: Choose \(a = 1\) and \(b = -1\). The values are both 2, so the join is smooth.

    \[\cr{1 + 1 = -1 + 3 = 2}\]

    Equal values only join the graph. The left piece has slope \(2a = 2\) at 1, and the right piece has slope \(b = -1\). The red half-lines show a corner.

  3. Match the slopes too. The left piece has slope \(2ax\), which is \(2a\) at 1, and the right piece has slope \(b\).

    \[2a = b\]
  4. Substitute \(b = 2a\) into the value equation and solve.

    \[\begin{aligned} &a + 1 = 2a + 3 \\ &\cy{a = -2, \qquad b = -4} \end{aligned}\]

Practice

Let \(f(x) = ax^2\) for \(x \le 2\) and \(f(x) = 4x + b\) for \(x > 2\). Find \(a\) and \(b\) so that \(f\) is differentiable at 2.

The line has slope 4, so first find the \(a\) that gives the parabola slope 4 at 2. Then move \(b\) until the red gap closes.

Solution
  1. Match the slopes at 2. The parabola has slope \(2ax\), which is \(4a\) there, and the line has slope 4.

    \[4a = 4 \;\Rightarrow\; a = 1\]
  2. Match the values at 2. The parabola gives \(4a = 4\), and the line gives \(8 + b\).

    \[4 = 8 + b \;\Rightarrow\; \cy{b = -4}\]

Questions

Questions 1 and 2 use the parabola and the line from the start of this page. Question 3 needs a calculation.

  1. The line starts at (1, 1) and has slope 3, so the graph has a corner. Which change to the line removes the corner and keeps the graph joined?

    • Tilt the line about the point \((1, 1)\) to slope 2.
    • Raise the line by 1 unit.
    • Tilt the line about the point \((1, 1)\) to slope 4.
    • Lower the line by 1 unit.
    Answer

    Tilt the line about the point \((1, 1)\) to slope 2.

  2. The faint orange line is the tangent of the parabola at \((1, 1)\). What slope must the right piece have?

    • 2
    • 1
    • 3
    • 0
    Answer

    2

  3. Let \(f(x) = ax + b\) for \(x < 2\) and \(f(x) = x^2 + 1\) for \(x \ge 2\). Find \(b\) so that \(f\) is differentiable at 2.

    • −3
    • 1
    • 5
    • 4
    Answer

    −3

Summary

A piecewise function is differentiable at a join when its pieces have the same value and the same slope there.

Equal values remove the jump, and equal slopes remove the corner.

If a problem asks for constants that make the function differentiable, these two equations find them.

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