Derivative of logarithmic functions

Theorem 1

Consider the logarithmic function f(x)=loga(x)f(x)=\log_a(x) where aa is the base (e.g. f(x)=ln(x)f(x)=\ln(x), or f(x)=log2(x)f(x)=\log_2(x)). The following is true:

Equation 1
f(x)=loga(x)f(x)=1ln(a)xf(x)=\log_a(x) \overset{\prime}{\rightarrow} f'(x)=\frac{1}{\ln(a)\cdot x}

Derivative of Logarithmic Function

In particular it follows

Equation 2
f(x)=ln(x)f(x)=1xf(x)=\ln(x) \overset{\prime}{\rightarrow} f'(x)=\frac{1}{x}
Proof

We just give a plausibility argument. Sketching the derivative of f(x)=ln(x)f(x)=\ln(x), we see that its graph indeed looks similar to the graph of the function 1x\frac{1}{x}.

So we can argue (but it is not a proof, of course), that the derative of ln(x)\ln(x) is fx=1xf^\prime{x}=\frac{1}{x}. And this turns out to be true. The more general case for f(x)=loga(x)f(x)=\log_a(x) will be proven later with the chain rule.

Example 1
  • f(x)=log2(x)f(x)=1ln(2)x=10.693...xf(x)=\log_2(x) \rightarrow f'(x)=\frac{1}{\ln(2)\cdot x}=\frac{1}{0.693...\cdot x}
  • f(x)=ln(x)f(x)=1ln(e)x=1xf(x)=\ln(x) \rightarrow f'(x)=\frac{1}{\ln(e)\cdot x}=\frac{1}{x}

A more formal proof of the theorem is given in the exercise (uncollapse) but can be skipped. The graphical argument is more important.

Show

Prove that the derivative of f(x)=log2(x)f(x)=\log_2(x) is f(x)=1ln(2)xf'(x)=\frac{1}{\ln(2)\cdot x}. To do so, answer the questions below. You can also use the rule that the derivative of g(x)=2xg(x)=2^x is g(x)=ln(2)2xg'(x)=\ln(2)\cdot 2^x. Let's use some small exercises for this:

Exercise 1

Consider a point P(xy)P(x\vert y). If PP is reflected about the diagonal, what are the coordinates of the new point PP'?

Solution

Reflect some points, and you will see that the order of the coordinates switches: P(xy)P(yx)P(x\vert y) \rightarrow P'(y\vert x)

Exercise 2

A straight line tt with slope aa. If tt is reflected about the diagonal, what is the slope of the new line tt'?

Solution

The slope of tt' is a=1aa'=\frac{1}{a}.

To see this, pick to points A(xAyA)A(x_A\vert y_A) and B(xByB)B(x_B\vert y_B) on tt and form the slope triangle between these two points. The slope of tt is a=yByAxBxAa=\frac{y_B-y_A}{x_B-x_A}. The reflected points AA' and BB' are on tt' and have the coordinates switched, that is, A(yAxA)A'(y_A\vert x_A) and B(yBxB)B'(y_B \vert x_B). Thus, the slope of tt' is a=xBxAyByA=1yByAxBxA=1aa'=\frac{x_B-x_A}{y_B-y_A}=\frac{1}{\frac{y_B-y_A}{x_B-x_A}}=\frac{1}{a}.

Exercise 3

The graphs of the functions f(x)=log2(x)f(x)=\log_2(x) and g(x)=2xg(x)=2^x are shown below. Observe that if we reflect the graph of ff about the diagonal, we obtain the graph of gg. Can you show this with a calculation? For example, take the point AA with coordinate x=2.5x=2.5 on the graph of ff. Why must the reflected point be on the graph of gg, and what are its exact coordinates?

Solution

Note that a point P(xy)P(x\vert y) is on the graph of a function ll, if y=l(x)y=l(x). As AA is on the graph of ff, it must have the coordinates A(2.5f(2.5))=A(2.5log2(2.5))A(2.5\vert f(2.5))=A(2.5\vert \log_2(2.5)).

The reflected point has therefore the switched coordinates A(log2(2.5)2.5)A'(\log_2(2.5)\vert 2.5). To check if this point is on gg, we have to show that g(log2(2.5))=2log2(2.5)=2.5g(\log_2(2.5))=2^{\log_2(2.5)}=2.5. And this is indeed the case, because if we set log2(2.5)=u\log_2(2.5)=u it follows from the definition of the logarithm that 2u=2.52^{u}=2.5. So we have 2log2(2.5)=2u=2.52^{\log_2(2.5)}=2^{u}=2.5

Exercise 4

Put all the pieces together. Can you show that f(2.5)=1ln(2)2.5f'(2.5)=\frac{1}{\ln(2) \cdot 2.5}? More generally, can you show that f(x)=1ln(2)xf'(x)=\frac{1}{\ln(2)\cdot x}? Hint: Use the already proven rule g(x)=ln(2)2xg'(x)=\ln(2)\cdot 2^x

Solution

Consider the tangent tt to the graph of ff at A(2.5log2(2.5))A(2.5\vert \log_2(2.5)) and denote its slope by aa, that is, a=f(2.5)a=f'(2.5). We want to find the value of aa.

To do so note that the reflected tangent tt' passes through the point A(log2(2.5)2.5)A'(\log_2(2.5)\vert 2.5) (see Q1 and Q3) and is the tangent tt' to the graph of gg. As the slope of tt' is a=g(log2(2.5))=ln(2)2log2(2.5)=ln(2)2.5a'=g'(\log_2(2.5))=\ln(2)\cdot 2^{\log_2(2.5)}=\ln(2)\cdot 2.5 (see hint), and because a=1aa=\frac{1}{a'} (see Q2) we get a=1ln(2)2.5a=\frac{1}{\ln(2)\cdot 2.5}.

The argumentation for the general rule is similar.

Exercise 5
  1. Consider the function f(x)=log3(x)x2+3f(x)=\log_3(x)-x^2+3.

    1. Sketch the graph of ff (you can use the calculator).
    2. Find the coordinates of the highest point PP of the graph.
  2. A straight line ll passes through the origin and touches the graph of the function f(x)=log5(x)f(x)=\log_5(x) at point PP.

    1. Find the coordinates of PP.

    2. Find the angle of intersection between ll and the xx-axis.

Solution
    1. To draw the graph, use a table of values (hint: use powers of 33 for the xx-values). The graph is shown below.

    2. The tangent at the highest point of graph ff has slope 00, that is, we have to find xx with f(x)=1ln(3)x2x=0f'(x)=\frac{1}{\ln(3)x}-2x=0. It follows x=12ln(3)=0.675x=\sqrt{\frac{1}{2\ln(3)}}=0.675 and thus P(0.6752.187)\underline{P(0.675\vert 2.187)}.

  1. Assume PP has the (unknown) xx-coordinates uu, thus we have P(ulog5(u))P(u\vert\log_5(u)). We need to find uu. Create a figure. You will note that we can express the slope of the line ll in two different ways:

    • Because ll passes through the origin and through P(log5(u))P(\vert\log_5(u)), we can form a slope triangle with Δx=u\Delta x = u and Δy=log5(u)\Delta y=\log_5(u). Thus ll has slope a=ΔyΔx=log5(u)ua=\frac{\Delta y}{\Delta x}=\frac{\log_5(u)}{u}
    • Because ll is the tangent to the graph of ff at x=ux=u, we also have a=f(u)=1ln(5)ua=f'(u)=\frac{1}{\ln(5)u}.

    Taken together, we have two expression for aa and therefore an equation for uu:

    log5(u)u=1ln(5)u\frac{\log_5(u)}{u} = \frac{1}{\ln(5)u}

    Multiplying both sides by uu, we get

    log5(u)=1ln(5)\log_5(u) = \frac{1}{\ln(5)}

    In other words, 51/ln(5)=u5^{1/\ln(5)}=u, thus u=2.718u=2.718 and P(2.7180.621)\underline{P(2.718\vert 0.621)}. The slope of ll is a=1ln(5)2.718=0.229a=\frac{1}{\ln(5)\cdot 2.718}=0.229, the angle of intersection between ll and the xx-axis is therefore arctan(0.229)=12.877\arctan(0.229)=\underline{12.877}