Derivative tricks

Added 2022-07-29, Modified 2022-08-01

Nonstandard derivative exercises, used for a calculus class I'm teaching.

Using this document

I recommend you think for 1-3 minutes after getting stuck before viewing a hint, and 10-15 minutes before viewing giving up and viewing the solution.

Pay attention to the lower and upper bounds! There's no honor in staring blankly at a problem for 30 minutes when you're stuck, and likewise viewing solutions prematurely is inefficient.


Inverse and Implicit Differentiation

Using the fact that (ex)=ex(e^x)' = e^x and elnx=xe^{\ln x} = x find (lnx)(\ln x)'


Differentiate both sides of elnx=xe^{\ln x} = x then solve for (lnx)(\ln x)'


We know

elnx=xe^{\ln x} = x

Taking the derivative of both sides and using the chain rule gives

(lnx)elnx=1(\ln x)'e^{\ln x} = 1

Since elnx=xe^{\ln x} = x dividing by xx isolates (lnx)(\ln x)' to give

(lnx)=1/x(\ln x)' = 1/x

Logarithmic Differentiation

Derive the product rule (fg)=fg+gf(fg)' = f'g+g'f using the chain rule and logarithms.


Logarithms turn multiplication into addition, and we know how to handle addition (derivative of sum is sum of derivatives!)


Let h=fgh = fg (or more verbosely h(x)=f(x)g(x)h(x) = f(x)g(x)) then take the log of both sides

lnh=lnf+lng\ln h = \ln f + \ln g

Differentiate both sides, the chain rule and the fact that (lnx)=1/x(\ln x)' = 1/x imply (lnf(x))=f(x)/f(x)(\ln f(x))' = f'(x)/f(x) giving

hh=ff+gg\frac{h'}{h} = \frac{f'}{f} + \frac{g'}{g}

Since h=fgh = fg this becomes

(fg)fg=ff+gg\frac{(fg)'}{fg} = \frac{f'}{f} + \frac{g'}{g}

Solving for (fg)(fg)' by multiplying both sides by fgfg finally gives the familiar product rule

(fg)=fg+gf(fg)' = f'g + g'f

Generalize the product rule to a product f1fnf_1\dots f_n of more than two functions.


Use the logarithm approach from the previous exercise.


Let h=f1fnh = f_1\dots f_n, take logs to get

lnh=i=1nlnfi\ln h = \sum_{i=1}^n \ln f_i

Take derivatives

hh=i=1nfifi\frac{h'}{h} = \sum_{i=1}^n \frac{f_i'}{f_i}

Multiply both sides by hh and substitute back in for hh

(f1fn)=f1(f2fn)+f2(f1f3fn)+(f_1\dots f_n)' = f_1'(f_2\dots f_n) + f_2'(f_1f_3\dots f_n) + \dots

Compute the following derivative

ddxx5(110x)x2+2\frac{d}{dx} \frac{x^5}{(1 - 10x)\sqrt{x^2 + 2}}


y=x5(110x)x2+2y = \frac{x^5}{(1 - 10x)\sqrt{x^2 + 2}}

and take the logarithm of both sides


Take the log of both sides and simplify

lny=ln(x5(110x)x2+2)=5ln(x)ln(110x)12ln(x2+2)\begin{aligned} \ln y &= \ln\left(\frac{x^5}{(1 - 10x)\sqrt{x^2 + 2}}\right) \\ &= 5 \ln(x) - \ln(1 - 10x) - \frac 12 \ln(x^2 + 2) \end{aligned}

Take derivatives to get

yy=51x10110x122xx2+2\frac{y'}{y} = 5\frac{1}{x} - \frac{-10}{1 - 10x} - \frac 12 \frac{2x}{x^2 + 2}

Multiply by yy and substitute back in

y=(x5(110x)x2+2)(5x10110x122xx2+2)y' = \left(\frac{x^5}{(1 - 10x)\sqrt{x^2 + 2}}\right)\left(\frac{5}{x} - \frac{-10}{1 - 10x} - \frac 12 \frac{2x}{x^2 + 2}\right)

Deriving Identities

In probability, we need to compute the following sum to find the expected value of a random variable with a geometric distribution

E(X)=k=0kqkpE(X) = \sum_{k=0}^\infty kq^kp

Using the identity k=0qk=11q\sum_{k=0}^\infty q^k = \frac{1}{1-q} find the sum above


Differentiate both sides of the identity with respect to qq

11q=k=0qkddx1(1q)2=k=0kqk1\frac{1}{1-q} = \sum_{k=0}^\infty q^k \substack{\frac{d}{dx} \\ \implies} \frac{1}{(1-q)^2} = \sum_{k=0}^\infty kq^{k-1}

Multiply both sides by qq to turn qk1q^{k-1} into qkq^k, multiply by pp to get the desired sum

qp(1q)2=k=0kqkp\frac{qp}{(1-q)^2} = \sum_{k=0}^\infty kq^kp

(Footnote about probability: since q=1pq=1-p the expectation simplifies to 1/p11/p - 1.)