Week 1 Discussion Notes

Table of Contents

Exponentials and Logarithms

Basic Properties

Definition

Let b>0b > 0 and b1b \neq 1.

  1. bxb^x is called an exponential.
  2. logbx\log_b{x} is called a logarithm.

The reason why we're avoiding b=1b = 1 is because 1x=11^x = 1 for any xx, which isn't interesting to us. Same thing for b=0b = 0. Lastly, we don't want to deal with negative values of bb because we could end up with something like (1)1/2\p{-1}^{1/2} which is an imaginary number, which is not covered in this class.

These functions have the following properties:

domain(bx)=(,)domain(logbx)=(0,)range(bx)=(0,)range(logbx)=(,)b0=1logb1=0bx+y=bxbylogb(xy)=logbx+logby(bx)y=bxylogb(xy)=ylogbx\begin{aligned} \operatorname{domain}\p{b^x} &= \p{-\infty, \infty} &&& \operatorname{domain}\p{\log_bx} &= \p{0, \infty} \\ \operatorname{range}\p{b^x} &= \p{0, \infty} &&& \operatorname{range}\p{\log_bx} &= \p{-\infty, \infty} \\ b^0 &= 1 &&& \log_b1 &= 0 \\ b^{x+y} &= b^xb^y &&& \log_b\p{xy} &= \log_bx + \log_by \\ \p{b^x}^y &= b^{xy} &&& \log_b\p{x^y} &= y\log_bx \end{aligned}

These properties should look pretty similar to each other to you. For example, the domain and range of the two functions are swapped, and the fourth line is "swapping addition and multiplication." This is because bxb^x and logbx\log_bx are inverses:

blogbx=xif x>0,logb(bx)=xfor all x.\begin{aligned} b^{\log_bx} = x & \quad\text{if } x > 0, \\ \log_b\p{b^x} = x & \quad\text{for all } x. \end{aligned}

Change-of-Base Formula

Proposition

Let a,b>0a, b > 0 both be different from 11. Then

logbx=logaxlogab.\log_b{x} = \frac{\log_a{x}}{\log_a{b}}.
Proof.

The proof of this formula is good practice for using the properties of these functions. First, let k=logbxk = \log_b{x}. Then because bxb^x and logbx\log_b{x} are inverses,

bk=blogbx=x.b^k = b^{\log_b{x}} = x.

Then if we apply logax\log_a{x} on both sides, we get

loga(bk)=logax    klogab=logax    k=logaxlogab.\begin{aligned} \log_a\p{b^k} &= \log_a{x} \\ \implies k\log_a{b} &= \log_a{x} \\ \implies k = \frac{\log_a{x}}{\log_a{b}}. \end{aligned}

\square

This is how I personally remember the formula: first, I remember very roughly what it looks like:

logbx=logaloga\log_b{x} = \frac{\log_a}{\log_a}

From here, I see that bb is below xx in the left-hand side, so it stays below in the end:

logbx=logaxlogab.\log_{\colorbox{red}{$b$}}{x} = \frac{\log_a{x}}{\colorbox{red}{$\log_a{b}$}}.

Differentiation

When b=eb = e (Euler's number), a lot of really nice things happen. For example,

ddxex=ex\deriv{}{x} e^x = e^x

ee is so important that logex\log_e{x} has its own symbol: lnx\ln{x}, which satisfies

ddxlnx=1x.\deriv{}{x} \ln{x} = \frac{1}{x}.

Using the properties of exponentials and logarithms, we can use the facts above to find the derivative of bxb^x for general values of bb. Notice that b=elnbb = e^{\ln{b}}, so

bx=(elnb)x=exlnb.b^x = \p{e^{\ln{b}}}^x = e^{x\ln{b}}.

Then by the chain rule,

ddxbx=ddxexlnb=exlnb(ddxxlnb)=bxlnb.\begin{aligned} \deriv{}{x} b^x &= \deriv{}{x} e^{x\ln{b}} \\ &= e^{x\ln{b}} \p{\deriv{}{x} x\ln{b}} \\ &= b^x \ln{b}. \end{aligned}

Similarly, if we use the change-of-base formula,

ddxlogbx=ddxlnxlnb=1lnb(ddxlnx)=1xlnb.\begin{aligned} \deriv{}{x} \log_b{x} &= \deriv{}{x} \frac{\ln{x}}{\ln{b}} \\ &= \frac{1}{\ln{b}} \p{\deriv{}{x} \ln{x}} \\ &= \frac{1}{x\ln{b}}. \end{aligned}

Integration

Since integration and differentiation are (almost) inverses, the fact that ddxex=ex\deriv{}{x} e^x = e^x tells us that

exdx=ex+C.\int e^x \,\diff{x} = e^x + C.

As before, we can use this fact to calculate the integral of any bxb^x:

bxdx=exlnbdx=eulnbdu(u=xlnb    du=lnbdx)=eulnb+C=exlnblnb+C=bxlnb+C.\begin{aligned} \int b^x \,\diff{x} &= \int e^{x\ln{b}} \,\diff{x} \\ &= \int \frac{e^u}{\ln{b}} \,\diff{u} && \p{u = x\ln{b} \implies \diff{u} = \ln{b} \,\diff{x}} \\ &= \frac{e^u}{\ln{b}} + C \\ &= \frac{e^{x\ln{b}}}{\ln{b}} + C \\ &= \frac{b^x}{\ln{b}} + C. \end{aligned}

Surprisingly, we can't integrate lnx\ln{x} with what we've learned yet. We'll learn later how to do it, but for now, just know that

lnxdx=xlnxx+C.\int \ln{x} \,\diff{x} = x\ln{x} - x + C.

Logarithmic Differentiation

Which is harder to differentiate, exsinxe^x\sin{x} or ex+sinxe^x + \sin{x}? You (hopefully) said that the first one is harder, and that's because derivatives are easier with sums than with products.

The property that logb(xy)=logbx+logby\log_b\p{xy} = \log_b{x} + \log_b{y} is very useful for us because it turns the product into a sum, and we can use this (with the chain rule) to make some derivatives easier to compute.

Example 1.

Let f(x)=exsinxf\p{x} = e^x\sin{x}. Use logarithmic differentiation to calculate f(x)f'\p{x}.

Solution.

Notice that

lnf(x)=ln(exsinx)=lnex+ln(sinx)=x+ln(sinx).\begin{aligned} \ln{f\p{x}} &= \ln\p{e^x\sin{x}} \\ &= \ln{e^x} + \ln\p{\sin{x}} \\ &= x + \ln\p{\sin{x}}. \end{aligned}

Then by the chain rule, taking derivatives on both sides gives

f(x)f(x)=1+cosxsinx.\frac{f'\p{x}}{f\p{x}} = 1 + \frac{\cos{x}}{\sin{x}}.

Multiplying both sides by f(x)=exsinxf\p{x} = e^x\sin{x} then gives

f(x)=exsinx+exsinxcosxsinx=exsinx+excosx.f'\p{x} = e^x\sin{x} + e^x\sin{x} \cdot \frac{\cos{x}}{\sin{x}} = \boxed{e^x\sin{x} + e^x\cos{x}}.

Examples

Example 2.

Calculate ddxlog2x\displaystyle\deriv{}{x} \log_2{x}.

Solution.

You could write down the derivative from the formulas, or if you don't remember it, you can use the change-of-base formula:

ddxlog2x=ddxlnxln2=1xln2.\begin{aligned} \deriv{}{x} \log_2{x} &= \deriv{}{x} \frac{\ln{x}}{\ln{2}} \\ &= \frac{1}{x\ln{2}}. \end{aligned}
Example 3.

Find the equation of the tangent line to y=log2(1+4x1)y = \log_2\p{1 + 4x^{-1}} at x=4x = 4.

Solution.

To specify a line uniquely, you need two pieces of information: a point through the line and its slope. For a tangent line at x=4x = 4, the line must pass through (4,f(4))\p{4, f\p{4}} with slope f(4)f'\p{4}. So, we need to calculate f(4)f\p{4} and f(4)f'\p{4}:

f(4)=log2(1+44)=log2(1+1)=log22=1.f\p{4} = \log_2\p{1 + \frac{4}{4}} = \log_2\p{1 + 1} = \log_2{2} = 1.

For the derivative, we get

f(x)=1(1+4x1)ln2ddx(1+4x1)=1(1+4x1)ln2(4x2)    f(4)=1(1+44)ln2(442)=18ln2.\begin{aligned} f'\p{x} &= \frac{1}{\p{1 + 4x^{-1}}\ln{2}} \cdot \deriv{}{x} \p{1 + 4x^{-1}} \\ &= \frac{1}{\p{1 + 4x^{-1}}\ln{2}} \p{-\frac{4}{x^2}} \\ \implies f'\p{4} &= \frac{1}{\p{1 + \frac{4}{4}}\ln{2}} \p{-\frac{4}{4^2}} \\ &= -\frac{1}{8\ln{2}}. \end{aligned}

So the tangent line passes through (4,1)\p{4, 1} and has slope 18ln2-\frac{1}{8\ln{2}}, so if we use the point-slope formula, we get

y1=18ln2(x4).\boxed{y - 1 = -\frac{1}{8\ln{2}}\p{x - 4}}.
Example 4.

Sketch the graph of f(x)=xln(x2+1)f\p{x} = x - \ln\p{x^2 + 1}.

Solution.

Curve sketching is pretty hard to explain over text compared to during the live discussions. I'll explain my approach and give some resources to help you sketch it.

Before sketching, I like to calculate two sets of things:

  1. The zeroes of f(x)f'\p{x} (these are the critical points of ff)
  2. The zeroes of f(x)f''\p{x} (these are the potential inflection points of ff)

For (1), you get

f(x)=11x2+1ddx(x2+1)=x2+1x2+12xx2+1=(x1)2x2+1.\begin{aligned} f'\p{x} &= 1 - \frac{1}{x^2 + 1} \cdot \deriv{}{x} \p{x^2 + 1} \\ &= \frac{x^2 + 1}{x^2 + 1} - \frac{2x}{x^2 + 1} \\ &= \frac{\p{x - 1}^2}{x^2 + 1}. \end{aligned}

So the only zero of ff' is x=1x = 1. For (2),

f(x)=(ddx(x1)2)(x2+1)(x1)2ddx(x2+1)(x2+1)2=2(x1)(x2+1)2x(x1)2(x2+1)2=2(x1)[(x2+1)x(x1)](x2+1)2=2(x1)(x2+1x2+x)(x2+1)2=2(x1)(x+1)(x2+1)2\begin{aligned} f''\p{x} &= \frac{\p{\deriv{}{x} \p{x - 1}^2} \p{x^2 + 1} - \p{x - 1}^2 \deriv{}{x} \p{x^2 + 1}}{\p{x^2 + 1}^2} \\ &= \frac{2\p{x - 1}\p{x^2 + 1} - 2x\p{x - 1}^2}{\p{x^2 + 1}^2} \\ &= \frac{2\p{x - 1}\br{\p{x^2 + 1} - x\p{x - 1}}}{\p{x^2 + 1}^2} \\ &= \frac{2\p{x - 1}\p{x^2 + 1 - x^2 + x}}{\p{x^2 + 1}^2} \\ &= \frac{2\p{x - 1}\p{x + 1}}{\p{x^2 + 1}^2} \end{aligned}

which gives x=1,1x = -1, 1 as the potential inflection points. From here, you can figure out the signs of ff' and ff'' everywhere:

The sign of ff' tells you whether ff is increasing or decreasing, and the sign of ff'' tells you whether you're concave up or concave down. You can look at these notes to see how the signs translate to the rough shape of ff. You can also use Desmos to graph ff to check your answer.

Example 5.

Calculate dxxlnx\displaystyle\int \frac{\diff{x}}{x\ln{x}}.

Solution.

If u=lnxu = \ln{x}, then du=1xdx\diff{u} = \frac{1}{x} \,\diff{x}, so the integral becomes

dxxlnx=duu=lnu+C=lnlnx+C.\begin{aligned} \int \frac{\diff{x}}{x\ln{x}} &= \int \frac{\diff{u}}{u} \\ &= \ln\abs{u} + C \\ &= \boxed{\ln\abs{\ln{x}} + C}. \end{aligned}
Example 6.

Calculate dxx(lnx)ln(lnx)\displaystyle\int \frac{\diff{x}}{x \p{\ln{x}} \ln\p{\ln{x}}}.

Solution.

Similar to the previous one, we can let

u=ln(lnx)    du=1xlnxdx.u = \ln\p{\ln{x}} \implies \diff{u} = \frac{1}{x\ln{x}} \,\diff{x}.

Then

dx(xlnx)ln(lnx)=duu=lnu+C=lnln(lnx)+C.\begin{aligned} \int \frac{\diff{x}}{\p{x \ln{x}} \ln\p{\ln{x}}} &= \int \frac{\diff{u}}{u} \\ &= \ln\abs{u} + C \\ &= \boxed{\ln\abs{\ln\p{\ln{x}}} + C}. \end{aligned}