Week 2 Discussion Notes

Table of Contents

Review of Exponentials and Logarithms

Here are the main properties you'll want to remember:

Proposition

Let b(0,){1}b \in \p{0, \infty} \setminus \set{1}. Then

bx+y=bxbylogb(xy)=logbx+logby(bx)k=bkxlogb(xk)=klogbxb0=1logb1=0\begin{aligned} b^{x+y} &= b^xb^y &&& \log_b\p{xy} &= \log_bx + \log_by \\ \p{b^x}^k &= b^{kx} &&& \log_b\p{x^k} &= k\log_bx \\ b^0 &= 1 &&& \log_b1 &= 0 \end{aligned}

Notice how I arranged these equations—it's not a coincidence! On each row, the left and right equations are essentially the same. For example, in the first row, we turn a sum (x+yx + y) into a product (bxbyb^xb^y) on the left and on the right, we turn a product (xyxy) into a sum (logbx+logby\log_bx + \log_by).

Example 1.

Assuming bx+y=bxbyb^{x+y} = b^xb^y is true, prove the identity logb(xy)=logbx+logby\log_b\p{xy} = \log_bx + \log_by for x,y>0x, y > 0.

Solution.

Since x,y>0x, y > 0, we can write x=blogbxx = b^{\log_bx} and y=blogbyy = b^{\log_by}. Then by assumption, blogbxblogby=blogbx+logbyb^{\log_bx}b^{\log_by} = b^{\log_bx + \log_by}, so

logb(xy)=logb(blogbxblogby)=logb(blogbx+logby)=logbx+logby.\begin{aligned} \log_b\p{xy} &= \log_b\p{b^{\log_bx}b^{\log_by}} \\ &= \log_b\p{b^{\log_bx + \log_by}} \\ &= \log_bx + \log_by. \end{aligned}
Exercise 1.

Do the same thing for the last two identities from the proposition.

Another very important identity for logarithms is the change-of-base formula:

Theorem (change-of-base)

Let a,b(0,){1}a, b \in \p{0, \infty} \setminus \set{1}. Then

logax=logbxlogba.\log_ax = \frac{\log_bx}{\log_ba}.
Proof.

We can write x=alogaxx = a^{\log_ax}, since logarithms and exponentials are inverses for the same base. Then

logbx=logb(alogax)=(logax)(logba).\log_bx = \log_b\p{a^{\log_ax}} = \p{\log_ax}\p{\log_ba}.

If we divide both sides by logba\log_ba, we get the identity:

logax=logbxlogba.\log_ax = \frac{\log_bx}{\log_ba}.

\square

This is how I remember the formula: we're changing the base, so each side should use logarithms of only one base, i.e., in the formula, there are only loga\log_a's on the left side and only logb\log_b's on the right side.

To remember which one goes on top and which one goes on bottom, I like to use the fact that aa is written lower than xx (aa is a subscript) on the left side. So, on the right side, aa should go on the "lower side," i.e., the denominator:

logax=logbxlogba.\log_{\colorbox{red}{$a$}}x = \frac{\log_bx}{\colorbox{red}{$\log_ba$}}.

Differentiation and Integration

Next, let's talk about the calculus of exponentials and logarithms. There are really only two things you need to remember:

ddxex=exandddxlnx=1x.\deriv{}{x} e^x = e^x \quad\text{and}\quad \deriv{}{x} \ln{x} = \frac{1}{x}.

This is because we have the formulas b=elnbb = e^{\ln{b}} and the change-of-base formula, and we'll see why right now.

Theorem

Let b(0,){1}b \in \p{0, \infty} \setminus \set{1}. Then

ddxbx=bxlnbandddxlogbx=1xlnb.\deriv{}{x} b^x = b^x\ln{b} \quad\text{and}\quad \deriv{}{x} \log_bx = \frac{1}{x\ln{b}}.
Proof.

By the chain rule and the properties we talked about,

ddxbx=ddx(elnb)x=ddxexlnb=exlnb.\deriv{}{x} b^x = \deriv{}{x} \p{e^{\ln{b}}}^x = \deriv{}{x} e^{x\ln{b}} = e^x\ln{b}.

Similarly, using the change-of-base formula, we get

ddxlogbx=ddxlnxlnb=1xlnb.\deriv{}{x} \log_bx = \deriv{}{x} \frac{\ln{x}}{\ln{b}} = \frac{1}{x\ln{b}}.

\square

Example 2.

Calculate bxdx\int b^x \,\diff{x}.

Solution.

Let u=bxu = b^x so that du=bxlnbdx\diff{u} = b^x\ln{b} \,\diff{x}. Then

bxdx=bxlnblnbdx=1lnbdu=ulnb+C=bxlnb+C.\begin{aligned} \int b^x \,\diff{x} = \int \frac{b^x\ln{b}}{\ln{b}} \,\diff{x} &= \frac{1}{\ln{b}} \int \,\diff{u} \\ &= \frac{u}{\ln{b}} + C \\ &= \boxed{\frac{b^x}{\ln{b}} + C}. \end{aligned}
Example 3.

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

Solution.

Let u=lnx    du=1xdxu = \ln{x} \implies \diff{u} = \frac{1}{x} \,\diff{x}. The integral becomes

duu=lnu+C=lnlnx+C.\int \frac{\diff{u}}{u} = \ln\abs{u} + C = \boxed{\ln{\abs{\ln{x}}} + C}.
Example 4.

Calculate exexex+exdx\int \frac{e^x - e^{-x}}{e^x + e^{-x}} \,\diff{x}.

Solution.

Let u=ex+ex    du=(exex)duu = e^x + e^{-x} \implies \diff{u} = \p{e^x - e^{-x}} \,\diff{u}. uu is precisely the denominator and du\diff{u} is the numerator, so the integral becomes

duu=lnu+C=lnex+ex+C.\int \frac{\diff{u}}{u} = \ln{\abs{u}} + C = \boxed{\ln{\abs{e^x + e^{-x}}} + C}.

Logarithmic Differentiation

The motivation behind this technique is that logarithms turn products into sums, and sums are much easier to work with than products. For example, try calculating the derivatives of ex+sinxe^x + \sin{x} and exsinxe^x\sin{x}. Which one was easier?

This technique is best illustrated through examples.

Example 5.

Calculate ddxx2exsinx\deriv{}{x} x^2e^x\sin{x}.

Solution.

When you want to use logarithmic differentiation, you always want to start by setting yy equal to what you want to take the derivative of. In this case, y=x2exsinxy = x^2e^x\sin{x}, and if we take logarithms on both sides, we get

lny=ln(x2exsinx)=ln(x2)+lnex+ln(sinx)=2lnx+x+ln(sinx).\begin{aligned} \ln{y} = \ln\p{x^2e^x\sin{x}} &= \ln\p{x^2} + \ln{e^x} + \ln\p{\sin{x}} \\ &= 2\ln{x} + x + \ln\p{\sin{x}}. \end{aligned}

Taking derivatives on both sides, we then get

yy=2x+1+cosxsinx    y=(2x+1+cosxsinx)y    y=(2x+1+cotx)x2exsinx.\begin{aligned} \frac{y'}{y} = \frac{2}{x} + 1 + \frac{\cos{x}}{\sin{x}} &\implies y' = \p{\frac{2}{x} + 1 + \frac{\cos{x}}{\sin{x}}}y \\ &\implies y' = \boxed{\p{\frac{2}{x} + 1 + \cot{x}}x^2e^x\sin{x}}. \end{aligned}
Example 6.

Calculate ddxesinxtanx\deriv{}{x} e^{\sin{x}}\sqrt{\tan{x}}.

Solution.

Setting y=esinxtanxy = e^{\sin{x}}\sqrt{\tan{x}} and taking logarithms as before,

lny=ln(esinxtanx)=ln(esinx)+lntanx=sinx+12ln(tanx)=sinx+12ln(sinx)12ln(cosx).\begin{aligned} \ln{y} = \ln\p{e^{\sin{x}}\sqrt{\tan{x}}} &= \ln\p{e^{\sin{x}}} + \ln\sqrt{\tan{x}} \\ &= \sin{x} + \frac{1}{2}\ln\p{\tan{x}} \\ &= \sin{x} + \frac{1}{2}\ln\p{\sin{x}} - \frac{1}{2}\ln\p{\cos{x}}. \end{aligned}

Taking derivatives,

yy=cosx+12cosxsinx12(sinx)cosx    y=(cosx+cotx2+tanx2)y=(cosx+cotx2+tanx2)esinxtanx.\begin{aligned} \frac{y'}{y} &= \cos{x} + \frac{1}{2}\frac{\cos{x}}{\sin{x}} - \frac{1}{2}\frac{\p{-\sin{x}}}{\cos{x}} \\ \implies y' &= \p{\cos{x} + \frac{\cot{x}}{2} + \frac{\tan{x}}{2}}y \\ &= \boxed{\p{\cos{x} + \frac{\cot{x}}{2} + \frac{\tan{x}}{2}}e^{\sin{x}}\sqrt{\tan{x}}}. \end{aligned}

Homework

For the homework due this week, there are already discussions on Campuswire for some of them:

  • 7.1.57 (#17)
  • 7.1.91 (#5)
  • 7.2.44 (#8)

So, I won't be covering those here.

Example 7.

(7.1.43) Find the critical points and inflection points of f(x)=xexf\p{x} = xe^{-x} and sketch its graph.

Solution.

There are a lot of ways to approach this, but the way I like to do things is first figure out where f,ff, f', and ff'' are zero. First, we should calculate these derivatives:

f(x)=xexf(x)=exxex=ex(1x)f(x)=exex+xex=ex(x2)\begin{aligned} f\p{x} &= xe^{-x} \\ f'\p{x} &= e^{-x} - xe^{-x} \\ &= e^{-x}\p{1 - x} \\ f''\p{x} &= -e^{-x} - e^{-x} + xe^{-x} \\ &= e^{-x}\p{x - 2} \end{aligned}

f(x)=0    xex=0f\p{x} = 0 \implies xe^{-x} = 0. Since exe^{-x} is never zero (when xx is real), it follows that x=0x = 0 is the only zero of ff.

Next, let's find the critical points of ff, which are where f(x)=0f'\p{x} = 0 or undefined.

f(x)=0    ex(1x)=0    x=1.f'\p{x} = 0 \implies e^{-x}\p{1 - x} = 0 \implies x = 1.

Finally, to find the inflection points of ff, we need to look at where f(x)=0f''\p{x} = 0. Note that x=cx = c is an inflection point only if f(x)f''\p{x} changes signs at x=cx = c (compare this to critical points, which are where f(x)=0f'\p{x} = 0 or undefined, regardless of whether or not f(x)f'\p{x} changes signs or not).

f(x)=0    ex(x2)=0    x=2.f''\p{x} = 0 \implies e^{-x}\p{x - 2} = 0 \implies x = 2.

This means that x=2x = 2 is a potential point of inflection, but we need to check signs to be sure (which will be done in the next step).

The last step before sketching is to make a sign chart, which I like to organize in the following way:

You should check the signs yourself. For example, if you plug in x=0x = 0, you get f(0)>0f'\p{0} > 0, so f(x)f'\p{x} is positive to the left of 11, and so on. From here, you just need to remember that f(x)>0f''\p{x} > 0 means ff is concave up and f(x)<0f''\p{x} < 0 is concave down, so you'll get this graph in the end:

The red line is to help you see where f(1)=0f'\p{1} = 0 shows up, and the red curve is to show you where f(1)<0f''\p{1} < 0 shows up. However, when you sketch these yourself, you don't need to draw anything that's in red here (unless it helps).

I recommend using Desmos to help you check your sketch after you try the problem out.

Example 8.

(7.3.60) Find the tangent line to y=ln(sinx)y = \ln\p{\sin{x}} at x=π4x = \frac{\pi}{4}.

Solution.

The tangent line at c=π4c = \frac{\pi}{4} needs to pass through the point (c,y(c))\p{c, y\p{c}} and have slope y(c)y'\p{c}. So,

y(π4)=ln12=ln21/2=ln22y\p{\frac{\pi}{4}} = \ln\frac{1}{\sqrt{2}} = \ln{2^{-1/2}} = -\frac{\ln{2}}{2}

and

y=cotx    y(π4)=1,y' = \cot{x} \implies y'\p{\frac{\pi}{4}} = 1,

so the equation of the line is given by

yy(π4)=f(π4)(xπ4)    y=xπ4ln22.\begin{gathered} y - y\p{\frac{\pi}{4}} = f'\p{\frac{\pi}{4}}\p{x - \frac{\pi}{4}} \implies \boxed{y = x - \frac{\pi}{4} - \frac{\ln{2}}{2}}. \end{gathered}