# MIT OCW Single Variable Calculus - Week 2

## Week 2

### Derivative Formulas

To work towards the goal of “differentiating everything”, need to talk about derivative formulas.

• Specfic – $$f’(x)$$, where $$f(x) = x^n, \frac{1}{x}$$ as a few examples.
• General – $$(u + v)’ = u’ + v’$$ and $$(cu)’ = cu’$$ where c is constant, as a few examples.

$$\frac{\delta}{\delta x} sin \; x$$

$\frac{\delta}{\delta x} sin \; x = \lim_{x \to 0} \frac{sin(x + \Delta) \; – sin(x)}{\Delta x}$

To solve this, we need to revist the trigonometric sum and difference formulas, namely:

$sin(A + B) = sin A \; cos B + cos A \; sin B$

This is a proof of the identity, using Eulers formula

Going back to the derivative:

\begin{align} \frac{\delta}{\delta x} sin \; x &= \lim_{x \to 0} \frac{sin(x + \Delta) \; – sin(x)}{\Delta x} \\ &= \lim_{x \to 0} \frac{sin\:x \; cos\:\Delta x + cos\;x \; sin\:\Delta x – sin\:x}{\Delta x} \\ &= \lim_{x \to 0} \quad sin\:x(\frac{cos\:\Delta x – 1}{\Delta x}) + cos\:x(\frac{sin\:\Delta x}{\Delta x}) \\ &= cos\:x \end{align}

due to the fact that $$\frac{cos\:\Delta x – 1}{\Delta x}$$ tends to 0 as $$\Delta x$$ tends to 0, and $$\frac{sin\:\Delta x}{\Delta x}$$ tends to 1 as $$\Delta x$$ tends to 0. Label these as A and B respectively, as we will prove them later.

$$\frac{\delta}{\delta x} cos x$$

Same as above, only this time using the identity:

$cos(A + B) = cos A \; cos B – sin A \; sin B$

\begin{align} \frac{\delta}{\delta x} cos \; x &= \lim_{x \to 0} \frac{cos(x + \Delta) \; – cos(x)}{\Delta x} \\ &= \lim_{x \to 0} \frac{cos\;x \: cos\;\Delta x – sin\;x \: sin\;\Delta x – cos\;x}{\Delta x} \\ &= \lim_{x \to 0} \quad cos\;x(\frac{cos\;\Delta x – 1}{\Delta x}) – sin\;x(\frac{\sin\;\Delta x}{\Delta x}) \\ &= \quad – sin\;x \end{align}

again, by A and B as stated above.

Proofs of A and B

First, some remarks:

$\frac{\delta}{\delta x} cos\;x \quad \Bigg|^{x=0} \quad \lim_{\Delta x \to 0} \frac{cos(\Delta x) – 1}{\Delta x}$

This shows that the rate of change of $$cos x$$ at $$x = 0$$ is a limit as $$\Delta x$$ tends to 0, which has been simplified:

\begin{align} &\frac{cos(0 + \Delta x) – cos(0)}{\Delta x} \\ = &\frac{cos(\Delta x) – 1}{\Delta x} \end{align}

and likewise

$\frac{\delta}{\delta x} sin\;x \quad \Bigg|^{x=0} \quad \lim_{\Delta x \to 0} \frac{sin(\Delta x)}{\Delta x}$

because of the simplification:

\begin{align} &\frac{sin(0 + \Delta x) – sin(0)}{\Delta x} \\ = &\frac{sin(\Delta x)}{\Delta x} \end{align}

We should note that the derivatives of sine and cosine at $$x = 0$$ give all values of $$\frac{\delta}{\delta x} sin x$$, $$\frac{\delta}{\delta x} cos x$$

Back to the proofs:

Property B

Geometric proof:

Lets rename $$\Delta x$$ as $$\theta$$.

Consider the ratio of the arc length to the line $$sin \theta$$. Then double it for the two $$\theta$$ that were drawn:

\begin{align} &\frac{2 sin \theta}{2 \theta} \\ = &\frac{sin \theta}{\theta} \end{align}

Now, as $$\theta$$ approaches 0, the lines $$sin \theta$$ and $$arclength \theta$$ get close and close to the same line, so the result of the ratio is 1, intuitively because short pieces of curves are nearly straight.

Property A

The basis for the proof for cosine is the same as the proof for sine – that of short pieces of curves being nearly straight.

First, $$cos \theta$$ is going to be negative, so we need to invert the statement:

$\frac{1 – cos \theta}{\theta}$

This is a similar image as before, only magnified.
The distance from the centre of the circle to the circumference is 1 (because this is a unit circle, and the gap between the $$sin \theta$$ line and the circumference is $$1 – cos \theta$$. As $$\theta$$ tends to 0, this gap gets smaller and smaller, and as such, $$\frac{1 – cos \theta}{\theta}$$ tends to 0.

NOTE TO SELFRECORD GEOMETRIC PROOF

General Derivative Rules

Product Rule

$(uv)’ = u’v + uv’$

can be remembered as changing one variable at a time. Will be proven as such.

Example:

$\frac{\delta}{\delta x} (x^n sin\;x) = nx^{n-1}sin\;x + x^n cos\;x$

Proof:

Going back to first principles of calculus, we can rewrite the sum in terms of the rate of change:

\begin{align} \frac{\delta}{\delta x} uv &= \lim_{\Delta x \to 0} \frac{u(x + \Delta x)v(x + \Delta x) – u(x)v(x)}{\Delta x} \\ &= \lim_{\Delta x \to 0} \frac{u(x + \Delta x)(v(x + \Delta x) – v(x)) + v(x)(u(x + \Delta x) – u(x))}{\Delta x} \qquad \text{(1)} \\ &= \lim_{\Delta x \to 0} u(x + \Delta x)\frac{\delta v}{\delta x} + v(x)\frac{\delta u}{\delta x} \\ &= uv’ + vu’ \end{align}

We converted the sum in (1) to a new form to aid in the proof. You can multiply out (1) to show that it is indeed equal:

\begin{align} u(x + \Delta x)(v(x + \Delta x) – v(x)) + v(x)(u(x + \Delta x) – u(x)) &= u(x + \Delta x)v(x + \Delta x) – v(x)u(x + \Delta x) + v(x)u(x + \Delta x) – v(x)u(x) \\ &= u(x + \Delta x)v(x + \Delta x) – v(x)u(x) \end{align}

As $$\Delta x$$ tends to 0, then $$u(x + \Delta x)$$ approaches $$u(x)$$, which will complete the proof.

Quotient Rule

$\left(\frac{u}{v}\right)’ = \frac{u’v – uv’}{v^2}$

only works when $$v \ne 0$$.

Proof:

First, recall that $$\frac{\delta}{\delta x}$$ is equal to $$\frac{\Delta y}{\Delta x}$$ and we can compute $$\Delta y$$ in a separate step, and then just divide by $$\Delta x$$.

\begin{align} \Delta \left( \frac{u}{v} \right) &= \frac{u + \Delta u}{v + \Delta v} – \frac{u}{v} \\ &= \frac{uv + v(\Delta u) – uv – u(\Delta v)}{(v + \Delta v)v} \\ &= \frac{v(\Delta u) – u(\Delta v)}{(v + \Delta v)v} \\ \frac{\Delta \left( \frac{u}{v} \right) }{\Delta x} &= \frac{ \frac{\Delta u}{\Delta x}v – u\frac{\Delta v}{\Delta x} }{(v + \Delta v)v} \\ \frac{\delta}{\delta x} \left( \frac{u}{v} \right) &= \lim_{\Delta x \to 0} \frac{ \frac{\delta u}{\delta x}v – u\frac{\delta v}{\delta x} }{v^2} \\ &= \frac{u’v – uv’}{v^2} \end{align}

Let us reconsider the above, setting $$u = 1$$:

\begin{align} \frac{\delta}{\delta x} \left( \frac{1}{v} \right) &= \frac{-1v’}{v^2} \\ &= -v^{-2}v’ \end{align}

and now, lets consider the above example generally, with $$\frac{1}{x^n}$$ represented as $$x^{-n}$$:

\begin{align} \frac{\delta}{\delta x} x^{-n} &= \frac{\delta}{\delta x} \left( \frac{1}{x^n} \right) \\ &= -x^{-2n}nx^{n-1} \\ &= -nx^{-n-1} \end{align}

You’ll notice that this follows the same pattern that applies to $$x^n$$.

Chain rule

We’ll start by derriving the rule, then writing it down.

Proof:

\begin{align} \frac{\Delta y}{\Delta t} &= \frac{\Delta y}{\Delta x} \frac{\Delta x}{\Delta t} \\ \frac{\delta y}{\delta t} &= \frac{\delta y}{\delta x} \frac{\delta x}{\delta t} \end{align}

TODO: FIND A BETTER PROOF OF THIS, OR SHOW A MORE EXPLICIT EXAMPLE *

Example:

\begin{align} \frac{\delta}{\delta t} (sin\;t)^{10} &= x^{10} & \text{Substituting x = sin t} \\ &= 10x^9 cos\;t \\ &= 10(sin\;t)^9 cos\;t & \text{Substituting the value of x back in} \end{align}

Example 2:

\begin{align} \frac{\delta}{\delta t} sin(10t) &= sin(x) & \text{Substituting x = 10t} \\ &= cos(x) \times 10 \\ &= cos(10t) \times 10 & \text{Substituting 10t = x back in} \end{align}

Higher derrivatives *

Refers to multiple steps of differentiation.

Consider the function $$u = u(x)$$, then $$u’$$ is a new function in and of itself. We can differentiate this function: $$u’’$$. This is the second derivative, and it too is a new function, and can be differentiated.

You can continue this to any number of higher derrivatives, second, third, fourth, etc.

Notation:
\begin{align} u’ &= \frac{\delta u}{\delta x} = \frac{\delta}{\delta x} u \\ u’’ &= \frac{\delta}{\delta x}\frac{\delta u}{\delta x} = \frac{\delta}{\delta x}\frac{\delta}{\delta x} u \\ &= \left(\frac{\delta}{\delta x}\right)^2 u \\ &= \frac{\delta^2}{(\delta x)^2} u \\ &= \frac{\delta^2}{\delta x^2} u \end{align}

Example:

\begin{align} D^nx^n &= ? \\ Dx^n &= nx^{n-1} \\ D^2x^n &= n(n-1)x^{n-2} \\ D^3x^n &= n(n-1)(n-2)x^{n-3} \\ D^{n-1}x^n &= (n(n-1)(n-2) \ldots 2)x^1 \\ D^nx^n &= (n(n-1)(n-2) \ldots 2 \times 1) \times 1 \\ &= n! \end{align}