Topic 2.7

Combine and evaluate these derivatives

Builds on differentiating logarithmic functions. 7 minutes.

The slope of a sum of two pieces

The curve \(y = 2e^x + 3\sin x\) is the sum of two pieces, \(2e^x\) and \(3\sin x\). The orange line is its tangent.

Show the two pieces to see a faint curve and a faint tangent for each one.

Go to \(x = 0\), where the piece \(2e^x\) has slope 2 and the piece \(3\sin x\) has slope 3. The tangent to the sum has slope 5.

Move the point. At every x the two slopes add, because the height of the sum is the sum of the two heights.

Any combination of these functions

The curve is now a sum of two terms, \(a f(x)\) and \(b g(x)\). Here \(a\) and \(b\) are constants, and \(f\) and \(g\) are sine, cosine, exponential or logarithmic functions.

Each term has its own slope, which is its constant times the derivative of its function. At every point, the slope of the whole curve is the sum of these slopes.

The steps are the same for every combination. Differentiate each term. Add the results. Then substitute the \(x\)-value.

Notation

  1. Step from \(x\) to \(x + h\). The green bar is the rise of the sum, green because the sum goes up. It is the rise of \(a f(x)\) stacked on the rise of \(b g(x)\), so the secant slopes of the two pieces add.

    \[\begin{aligned} &\frac{\text{rise of the sum}}{h} \\ &= a\,\frac{f(x+h)-f(x)}{h} \\ &\quad + b\,\frac{g(x+h)-g(x)}{h} \end{aligned}\]
  2. Let \(h\) approach 0, and the secant turns into the tangent. If \(f\) and \(g\) are differentiable at \(x\), each quotient approaches the derivative of its own function. The constants \(a\) and \(b\) stay as factors.

    \[\begin{aligned} &\frac{d}{dx}\big[a\,f(x) + b\,g(x)\big] \\ &\quad= \cy{a\,f'(x) + b\,g'(x)} \end{aligned}\]
  3. The rules for the pieces come from this topic.

    \[\begin{aligned} (\sin x)' &= \cos x \\ (\cos x)' &= -\sin x \\ (e^x)' &= e^x \\ (a^x)' &= a^x\ln a \\ (\ln x)' &= \tfrac1x \end{aligned}\]
  4. To find the slope at a point, differentiate first. Then substitute the x-value into the derivative.

    If you substitute first, every term becomes a number, and the derivative of a number is 0. State the units when a problem has them.

Example 1: a logarithm and a cosine

Find the slope of \(f(x) = 6\ln x - 2\cos x\) at \(x = \frac{\pi}{2}\).

  1. Differentiate each term with its own rule. The derivative of \(6\ln x\) is \(\frac6x\), and the derivative of \(-2\cos x\) is \(-2\cdot(-\sin x) = 2\sin x\).

    \[f'(x) = \frac6x + 2\sin x\]
  2. Substitute \(x = \frac{\pi}{2}\), which is in the domain of \(\ln x\). Here \(\sin\frac{\pi}{2} = 1\).

    \[f'\!\left(\frac\pi2\right) = \frac{6}{\pi/2} + 2\cdot 1 = \cy{\frac{12}{\pi} + 2}\]
  3. As a check, the slope is about 5.82, which matches the orange bar. The curve is green here because it rises, so a positive slope fits the picture.

Example 2: a rate with units

Tea cools toward room temperature. Its temperature is \(T(t) = 20 + 70\left(\frac12\right)^t\) degrees Celsius, \(t\) minutes after it is poured. Find the rate of change at \(t = 2\).

  1. The constant 20 has derivative 0. The derivative of \(70\left(\frac12\right)^t\) is \(70\left(\frac12\right)^t\ln\frac12\), and \(\ln\frac12 = -\ln 2\).

    \[T'(t) = -70\ln 2\cdot\left(\tfrac12\right)^t\]
  2. A tempting wrong move: Divide the change in temperature from \(t = 0\) to \(t = 2\) by 2 minutes.

    \[\begin{aligned} &\cr{\frac{T(2) - T(0)}{2}} \\ &\quad\cr{= \frac{37.5 - 90}{2} = -26.25} \end{aligned}\]

    This is the average rate over 2 minutes, which is the slope of the red line. The tea cools more slowly as time passes, so the orange tangent at \(t = 2\) is less steep.

  3. A rate at one moment is the derivative at that moment. Substitute \(t = 2\), where \(\left(\frac12\right)^2 = \frac14\).

    \[T'(2) = -70\ln 2\cdot\tfrac14 = \cy{-\tfrac{35}{2}\ln 2}\]
  4. The rate is \(-\frac{35}{2}\ln 2 \approx -12.1\) degrees Celsius per minute, negative because the tea cools.

Practice

Find \(f'(1)\) for \(f(x) = 5\cdot 3^x - 4\ln x\).

Move the point to \(x = 1\). There the faint curve of \(5\cdot 3^x\) rises steeply and the faint curve of \(-4\ln x\) falls gently, so add a positive slope and a negative one.

Solution
  1. Differentiate each term with its own rule.

    \[f'(x) = 5\cdot 3^x\ln 3 - \frac4x\]
  2. Substitute \(x = 1\). Here \(3^1 = 3\).

    \[f'(1) = 15\ln 3 - 4\]
  3. As a check, the slope is about 12.48. It is positive, because the exponential term is steeper than the logarithm term.

Questions

Questions 1 and 2 use the curve \(y = 2e^x + 3\sin x\), with the tangents to the sum and to each piece. Question 3 needs a calculation.

  1. The marked point is at \(x = 0\). What is the slope of the tangent to the sum?

    • 6
    • 1
    • 5
    Answer

    5

  2. The marked point is at \(x = -2\). To the nearest tenth, what is the slope of the tangent to the sum?

    • −1.5
    • −1.2
    • −1.0
    Answer

    −1.0

  3. Find \(f'(0)\) for \(f(x) = 7\cdot 4^x - 5\sin x\).

    • \(7\ln 4 - 5\)
    • 2
    • \(7\ln 4 + 5\)
    • −5
    Answer

    \(7\ln 4 - 5\)

Summary

You differentiate each term of a combination with its own rule, add the results, and then substitute the x-value.

The method works because the tangent slope of a sum is the sum of the slopes of its terms.

You use it for the slope or the rate of any such combination, and you state the units when the problem has them.

This is one of four skills in topic 2.7 of Which & Why: AP Calculus.