This site is being phased out.

Differentiation without limits: part 4

From Mathematics Is A Science
Jump to navigationJump to search

Next algebraic operation is composition...

Consider $y = (1 + 2x)^{2}$. This is a composition of 2 functions. What's its derivative? $$\left. \begin{aligned} f(x) & = x^{2} \text{ } \to f^{\prime}(x) = 2x \\ g(x) & = 1 + 2x \to g^{\prime}(x) = 2 \end{aligned} \right\} \qquad \text{How do we combine these to get the derivative of the whole?} $$

Let's try a simple example first...

Example: What the derivative of the composition of two functions? $$\begin{aligned} h(x) & = 15x \to h^{\prime}(x) = 15 \\ & = f(g(x)) \end{aligned} $$ with $$\left. \begin{aligned} f(y) & = 5y \to f^{\prime}(y) = 5 \\ g(x) & = 3x \to g^{\prime}(x) = 3 \end{aligned} \right\} \qquad \text{ How do we combine 5 and 3 to get 15?}$$

A simple idea: multiply them. Of course! The composition won't work -- the result would be either 5 or 3.

Then, the derivative of the composition of $f,g$ is the product of the derivatives $f',g'$.

Example: Consider $$y = (1 + 2x)^{2}$$ (Can be done differently: expand $1 + 4x + 4x^{2}$, then use the Power Formula.)

Decompose first: $$ \begin{aligned} x & \to u \to y \\ u & = 1 + 2x \to \frac{du}{dx} = 2 \\ y &= u^{2} \to \frac{dy}{du} = 2u \\ & \text{Now multiply them (this is called the Chain rule aka the composition rule).} \\ \frac{dy}{dx} & = \frac{dy}{du}\cdot\frac{du}{dx} \\ & = 2u\cdot 2 \\ & = 4u \end{aligned} $$ Done. But the answer has to be in terms of $x$! Lat step: substitute $u = 1 + 2x$. So the answer is $4(1+2x)$.

Example: What's the relationship between $\sin$ and $\cos$?

Right Angle Triangle.

$$\cos x = \sin y $$ where $$ \begin{aligned} y & = 90^{\circ} – x \\ y & = \frac{\pi}{2} – x \end{aligned}$$

$$\underbrace{\cos x = \sin (\frac{\pi}{2} – x)}_{\text{flip about } y\text{– axis shift horizontal}}$$ Use CR to find $\dfrac{d}{dx}\cos x$. $$\begin{alignat}{3} y & = \cos x, &\quad u &= \frac{\pi}{2} – x, \quad y &= \sin u \text{ (decomposition)} \\ & &\quad \frac{du}{dx} & = -1 & \quad \frac{dy}{du} & = \cos u \end{alignat} $$ So by chain rule $$ \begin{aligned} \frac{d}{dx} \cos x = -1 \cdot \cos u & = -\cos\left(\frac{\pi}{2} – x\right) \\ & = \sin x \end{aligned}$$


Review Exercise. $$\begin{aligned} \lim_{x \to 0} \frac{\sin 4x}{\sin 6x} & \to \frac{0}{0}, \text{ Main idea: use } \lim_{t \to 0} \dfrac{\sin t}{t} = 1 \\ & \text{ Algebra: find or create } t \text{ for each } \sin t\\ & = \lim_{x \to 0} \underbrace{\frac{\sin 4x}{4x}}_{t = 4x} \cdot \underbrace{\frac{6x}{\sin 6x}}_{t = 6x} \cdot \underbrace{\frac{4}{6}}_{\text{Make up the difference}} \\ & \text{These limits exist, so apply Product Rule for limits.} \\ & = \lim_{x \to 0} \frac{\sin \color{maroon}{4x}}{\color{maroon}{4x}} \cdot \lim_{x \to 0} \frac{\color{green}{6x}}{\sin \color{green}{6x}} \cdot\frac{4}{6} \\ & = \underbrace{1}_{\text{Since } x \to 0 \text{ means } 4x \to 0} \cdot \frac{1}{\lim_{x \to 0} \dfrac{\sin 6x}{6x}}\cdot\frac{4}{6} \\ & \overset{\text{QR}}{=} \underbrace{1}_{\text{Since } x \to 0 \text{ means } 6x \to 0} \cdot \frac{4}{6}, \quad \text{use the limit again with } t = 6x \\ & = \frac{4}{6} \end{aligned}$$

What about a proof of the Chain Rule? At least an idea: $$\frac{dy}{dx} = \frac{dy}{\color{maroon}{du}}\cdot\frac{\color{maroon}{du}}{dx} $$ Tempting... except these aren't fractions!

So what do we do?

Recall the definition: $$\begin{aligned} \frac{dy}{dx} & = \lim_{\Delta x \to 0} \underbrace{\frac{\Delta y}{\Delta x}}_{\text{this IS a fraction}} \\ & = \lim_{\Delta x \to 0} \underbrace{\frac{\Delta y}{\Delta u}\cdot\frac{\Delta u}{\Delta x}}_{\text{ Trouble: we assumed that} \Delta u \neq 0.}\\ & = \lim_{\Delta x \to 0} \frac{\Delta y}{\Delta u} \cdot \lim_{\Delta x \to 0} \frac{\Delta u}{\Delta x} \\ & \text{If $x \to 0$ then $\Delta u \to 0$ and vice versa, because $u$ is continuous.}\\ & = \frac{dy}{du}\cdot\frac{du}{dx}. \end{aligned} $$ Seems to have worked out... See however the comment above.

Example Find: $$(\sqrt{\sin x})^{\prime}.$$ The function is computed in two consecutive steps (that's how we know this is a composition). Indeed, if $$ y = \sqrt{\sin x}$$ then, to compute, we have to do this: $$ x \to u = \sin x \to y=\sqrt{u}.$$ Then $$\frac{du}{dx} = \cos x, \qquad \frac{dy}{du} = \frac{1}{2\sqrt{u}}.$$ Apply the Chain Rule, then substitute $u = \sin x$, $$\begin{aligned} \frac{dy}{dx} &= \cos x\cdot \frac{1}{2\sqrt{u}} & = \cos x \cdot \frac{1}{2\sqrt{\sin x}}. \end{aligned}$$

Example $$z = e^{\sqrt{\sin x}}$$ Find $\frac{dy}{dx}$. Three functions this time! $$ \begin{aligned} x & \to u = \sin x \\ & \to y = \sqrt{u} \\ & \to z = e^{y} \end{aligned} $$ So $$\begin{aligned} x \to y & = \sqrt{\sin x} \to z = e^{y} \\ \frac{dy}{dx} & = \cos x\cdot\frac{1}{2\sqrt{\sin x}}\cdot\frac{dz}{dy} = e^{y} \\ \frac{dz}{dx} & = \cos x \cdot \frac{1}{2\sqrt{\sin x}}\cdot e^{y} \\ & = \cos x\cdot \frac{1}{2\sqrt{\sin x}}\cdot e^{\sqrt{\sin x}} \end{aligned}$$

Here: 3 functions -- 3 derivatives. Just multiply them! General Chain Rule: $$\begin{aligned} x& \to u\to y\to z \\ \frac{dz}{dx} & = \frac{du}{dx} \cdot \frac{dy}{du} \cdot \frac{dz}{dy} \end{aligned}$$

Why? Same "proof" as for two functions (canceling): $$\frac{dz}{dx} = \frac{\color{maroon}{du}}{dx} \cdot \frac{\color{green}{dy}}{\color{maroon}{du}} \cdot \frac{dz}{\color{green}{dy}}.$$

Example:

What is $$(a^{x})'$$ where $a$ is an arbitrary base? We'll use $(e^{x})^{\prime} = e^{x}$. We know the relationship between them: stretch of the graph. So, $$a^{x} = e^{\text{some power?}} = e^{\ln a^{x}}.$$ Here $e^{\ln}$ cancels as they are inverses of each other.

How to convert to $e^{..}$? Use Base Conversion Formula: $$a^{x} = e^{x \ln a}.$$ Now, $$(a^{x})^{\prime} = (e^{x\ln a})^{\prime}$$ By the Chain Rule: $$ e^{x\ln a}: \underbrace{x \to u = \ln a}_{\frac{du}{dx}= \ln a} \to \underbrace{y = e^{u}}_{\frac{dy}{dx} = e^{u}}$$

CR: $$(a^{x})^{\prime} = \ln a\cdot e^{u} = \ln a\cdot e^{x\ln a} = \ln a\cdot a^{x}$$ So $$(a^{x})^{\prime} = a^{x}\ln a \to (e^{x})^{\prime} = e^{x}$$

Review exercise. Compute: $$ \left( \frac{x e^{x}}{\sin x}\right)^{\prime}. $$

Solution: The plan: identify

  • the participants -- functions -- and find their derivatives
  • the relations between them -- algebraic operations -- and write down the corresponding differentiation rules.

Functions:

  • $x \to (x)^{\prime} = 1$,
  • $\sin x \to (\sin x)^{\prime} = \cos x$,
  • $e^{x} \to (e^{x})^{\prime} = e^{x}$.

Operations:

  • Multiplication $\to$ Product Rule : $(fg)^{\prime} = f^{\prime}g + g^{\prime}f$;
  • Division $\to$ Quotient Rule : $\left(\frac{f}{g}\right)^{\prime} = \frac{f^{\prime}g – g^{\prime}f}{g^{2}}$.

Now, find the derivative of $x\cdot e^{x}$ with the Product Rule: above set

  • $f = x$ and
  • $g = e^{x}$.

So $$\begin{aligned} f = x & \quad f^{\prime} & = 1 \\ g = e^{x} &\quad g^{\prime} = e^{x} \end{aligned}$$ Substitute into PR: $$(x e^{x})^{\prime} = 1\cdot e^{x} + e^{x}\cdot x = e^{x}( 1 + x)$$

Next, find the derivative of the whole with the Quotient Rule: above set

  • $f = x\cdot e^{x}$ and
  • $g = \sin x$.

We already have their derivatives: $$\begin{aligned} f^{\prime} & = (x e^{x})^{\prime} = e^x(1 + x)\\ g^{\prime} & = (\sin x)^{\prime} = \cos x \end{aligned}$$ Substitute: $$\begin{aligned} \left(\frac{x e^x}{\sin x}\right)^{\prime} = \frac{f^{\prime} g – g^{\prime} f}{g^{2}} \\ & = \frac{e^{x}\cdot(1+x)\cdot\sin x - \cos x\cdot x \cdot e^{x}}{(\sin x)^{2}}. \end{aligned}$$

Same color coded: Differentiation example.png