3. Practise with Exponentials and Logarithms
≪ 2. Exponents and Logarithms | Table of Contents | 4. Derivatives of Inverse Functions ≫Since there hasn’t been much new content between now and the previous discussion, we’ll be spending our time synthesising what we learned about exponentials and logarithms last week with skills from previous courses.
First and foremost, you may encounter problems that involve taking limits of logarithms that appear not to exist. For instance, consider:
Example 1.
Determine the limit \[\lim _{x\to 7^+} \left( \ln(x-7) - \ln\left( x^2-49 \right) \right). \]
Directly plugging in \(x=7\) gives \(\ln(0) - \ln (0)\), which will incur the wrath of ancient deities. But indeed the limit does exist, and this can be verified by plugging in values closer and closer to \(7\) on a calculator. (Note we need \(x > 7\) so that \(x-7>0\) and \(x^2-49>0\)!)
The idea is to compress the two logarithms into a single logarithm. We have \[\ln (x-7) - \ln \left( x^2-49 \right) = \ln \left( \frac{x-7}{x^2-49}\right) = \ln \left( \frac{x-7}{(x-7)(x+7)}\right) = \ln \left( \frac{1}{x+7} \right) .\] Now I can take limits: \[ \lim _{x\to 7^+} \left( \ln(x-7) - \ln \left( x^2-49 \right) \right) = \lim _{x\to 7^+} \ln \left( \frac{1}{x+7} \right) = \ln \left( \frac{1}{14} \right).\]
In general, you should look out for when you can collect logarithms together like above, as sometimes that can allow you to simplify otherwise unmanageable expressions.
On the flip side, when computing derivatives of logarithmic functions (e.g. in sketching curves), it can be advantageous to instead split up one logarithm into many little ones. For instance,
Exercise 2.
Compute the derivative of \[f(x) = \ln \left( \frac{x^2+4x}{x^2+7x+6} \right).\]
You could use the chain rule right off the bat, but then you would have to wrestle with differentiating \(\frac{x^2+4x}{x^2+7x+6}\). Instead, one could first split up the logarithm: \[f(x) = \ln \left( \frac{x(x+4)}{x^2+7x+6} \right) = \ln x + \ln (x+4) - \ln \left( x^2+7x+6 \right).\] Now it’s easier to differentiate, and applying the chain rule to the latter two terms yields: \[\begin{align*} f’(x) &= \frac{1}{x} + \frac{1}{x+4} \cdot \left[ \frac{d}{dx}(x+4) \right] + \frac{1}{x^2+7x+6} \left[ \frac{d}{dx}\left( x^2+7x+6 \right) \right]\\ &= \frac{1}{x} + \frac{1}{x+4} + \frac{2x+7}{x^2+7x+6}. \end{align*}\]
You can then reduce or simplify this expression further, if necessary.
Finally, you can also use logarithms together with implicit differentiation to take derivatives of functions that would otherwise be nearly impossible to differentiate. Consider, for instance, the following problem:
Example 3.
Let \(y = x^x\) for \(x > 0\). Determine \(\frac{dy}{dx}\).
I have no idea how to differentiate this thingie! Note that I cannot use the power rule because the exponent itself also depends on \(x\). That is to say, the derivative is not \(x \cdot x ^{x-1}\), as tempting as that may be.
Instead, we can use a logarithm to decouple the exponent from the base: \[\ln y = \ln \left( x^x \right) = x\cdot \ln(x).\] Now, differentiating both sides with respect to \(x\) (remembering to use the chain rule on the left and the product rule on the right) yields \[\frac{1}{y}\cdot \frac{dy}{dx} = \left( \frac{d}{dx} x \right)\cdot \ln x + x\cdot \left( \frac{d}{dx}\ln x \right) = \ln x + 1.\] Now remember that \(y = x^x\). Isolating \(\frac{dy}{dx}\) and rewriting everything in terms of \(x\) yields the answer: \[\frac{dy}{dx} = y \left( \ln x + 1 \right) = x^x \left( \ln x + 1 \right).\]