Note 3

Chain Rule

The chain rule is a formula for computing the derivative of the composition of two or more functions. It is a key rule for finding the derivative of composite functions. \[ f(g(x))' = f'(g(x)) \cdot g'(x). \] In other words, the derivative of the outer function evaluated at the inner function times the derivative of the inner function.

Example. Find the derivative of \( y = (3x^2 + 1)^4 \).

Solution. Let \( f(x) = x^4 \) and \( g(x) = 3x^2 + 1 \). Then \( y = f(g(x)) \). \[ f'(x) = 4x^3, \quad g'(x) = 6x. \] \[ y' = f'(g(x))\cdot g'(x) = 4(3x^2 + 1)^3\cdot 6x = 24x(3x^2 + 1)^3. \]

Here is the alternative way to express the chain rule.

Theorem. If \( u = g(x) \) and \( y = f(u) \) are differentiable functions with domains consisting of real numbers, the derivative of \( y \) is \[ \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}. \]

Now, we look at some applications of chain rule:

Theorem. If \( g \) is differentiable, then \[ \frac{d}{dx} \left( g(x) \right)^n = n \left( g(x) \right)^{n-1} g'(x) \quad \text{(for any number \( n \))} \] \[ \frac{d}{dx} e^{g(x)} = e^{g(x)} g'(x) \]

Once, we know the chain rule, we can derive the quotient rule by using the product rule:

\[ \begin{aligned} h(x) &= \dfrac{f(x)}{g(x)} = f(x)\cdot (g(x))^{-1}, \\ h'(x) &= f'(x)\cdot (g(x))^{-1} + f(x)\cdot \left( \dfrac{d}{dx} (g(x))^{-1} \right) \\ &= f'(x)\cdot (g(x))^{-1} - f(x)\cdot (g(x))^{-2}\cdot g'(x) \\ &= \dfrac{f'(x)\cdot g(x) - f(x)\cdot g'(x)}{(g(x))^2}. \end{aligned} \]


Implicit Differentiation

So far all the differentiation rules we have learned are for functions that are defined explicitly.

We say that \( y \) is defined \(\textit{explicitly}\) as a function of \( x \) if we can use \( x \) to express \( y \).

Examples.\(y = 3x^2 + 1\), \(y = x^3 + 1\), \(y = \dfrac{x^2}{e^x}\).

We have developed techniques for calculating a derivative \( \frac{dy}{dx} \) when \( y \) is given in terms of \( x \).

However, sometimes we cannot use \( x \) to express \( y \). For example, \[ y^4 + xy = x^3 - x + 2. \] In this case, we say that \( y \) is defined \(\textit{implicitly}\) as a function of \( x \).

Find \(\dfrac{dy}{dx}\) when the Function is Implicit

If we denote \(f(x, y)\) and \(g(x, y)\) as the equations that defines \(y\) implicitly as a function of \(x\), and \[ f(x, y) = g(x, y), \] then we can differentiate both sides of the equation with respect to \(x\). \[ \frac{d}{dx} f(x, y) = \frac{d}{dx} g(x, y). \] Moreover, \(y\) is a function of \(x\), so we can use the chain rule to find \( \frac{dy}{dx} \).

Example. Find the derivative of \( y \) with respect to \( x \) if \( y^4 + xy = x^3 - x + 2 \).

Solution. Let the left hand side be \( f(x, y) = y^4 + xy \) and the right hand side be \( g(x, y) = x^3 - x + 2 \). Then we have \[ f(x, y) = g(x, y). \] Differentiating both sides with respect to \( x \), we have \[ \frac{d}{dx} f(x, y) = \frac{d}{dx} g(x, y). \] \[ \frac{d}{dx} (y^4 + xy) = \frac{d}{dx} (x^3 - x + 2). \] \[ \frac{d}{dx} (x^3 - x + 2) = 3x^2 - 1. \] \[ \frac{d}{dx} (y^4 + xy) = 4y^3 \frac{dy}{dx} + y + x \frac{dy}{dx}. \] Since the derivative of the left hand side is equal to the derivative of the right hand side, we have \[ 4y^3 \frac{dy}{dx} + y + x \frac{dy}{dx} = 3x^2 - 1. \] \[ \frac{dy}{dx} (4y^3 + x) = 3x^2 - y - 1. \] \[ \frac{dy}{dx} = \frac{3x^2 - y - 1}{4y^3 + x}. \]

Derivatives of General Exponential Function

Theorem. \[ \frac{d}{dx} e^x = e^x. \]

Theorem. If \( a \) is a positive constant, then \[ \frac{d}{dx} a^x = a^x \ln a. \]

Example. Find the derivative of \( y = 2^x \). \[ \frac{d}{dx} 2^x = 2^x \ln 2. \]


Derivatives of General Logarithmic Functions

Theorem. \[ \frac{d}{dx} \ln(x) = \frac{1}{|x|}. \]

Theorem. Find the derivative of \( f(x) = \log_a(x) \), where \( a \) is a positive constant. \[ \frac{d}{dx} \log_a(x) = \frac{1}{x \ln a}. \]

Example. Find the derivative of \( y = 2^x \). \[ \frac{d}{dx} 2^x = 2^x \ln 2. \]


Rate of Change

Velocity and Position

Definition (Velocity). The velocity of an object is the rate of change of its position with respect to time.

Remark. Most of the time, we denote the position of an object as \( s(t) \), where \(t\) is the time.

Definition (Acceleration). The acceleration of an object is the rate of change of its velocity with respect to time.

Remark. Most of the time, we denote the velocity of an object as \( v(t) \), where \(t\) is the time.


Velocity

The velocity of an object is the \(\textbf{instantaneous velocity}\).

Theorem. If \(s(t)\) is the position of an object at time \(t\), then the velocity of the object at time \(t\) is \[ v(t) = s'(t) = \dfrac{d}{dt}s(t). \]


Acceleration

The acceleration of an object is the \(\textbf{instantaneous acceleration}\).

Definition. If \(v(t)\) is the position of an object at time \(t\), then the acceleration of the object at time \(t\) is \[ a(t) = v'(t) = \dfrac{d}{dt}v(t). \]


Motion Under the Influence of Gravity

Given that \(s(t)\) measures the height of an object tossed in the air vertically, we have \[ s(t) = s_0 + v_0 t - \frac{1}{2} g t^2, \] where

Given that \(s(t)\) measures the height of an object tossed in the air vertically, we have \[ s(t) = s_0 + v_0 t - \frac{1}{2} g t^2, \] \[ v(t) = s'(t) = v_0 - g t. \]

When will the object hit the maximum height?

When the velocity of the object equals to \(0\), the object hits the maximum height.

So we need to solve the equation \(v(t) = 0\).


Second Derivative

Definition. We say \(g(x)\) is the second derivative of \(f(x)\) if \[ g(x) = ((f(x))')' = \dfrac{d}{dx}(f(x))'. \]

Remark. The second derivative is the derivative of the derivative. We sometimes denote it as \[ g(x) = f''(x) = \dfrac{d^2}{dx^2}(f(x)). \]

Example. Find the second derivative of \( f(x) = x^3 + 2x^2 - 3x + 1 \).

Solution. \[ f'(x) = 3x^2 + 4x - 3, \] \[ f''(x) = 6x + 4. \]


Third Derivative

Definition. We say \(g(x)\) is the third derivative of \(f(x)\) if \[ g(x) = \dfrac{d}{dx}(f''(x)). \]

Remark. The third derivative is the derivative of the derivative. We sometimes denote it as \[ g(x) = f'''(x) = \dfrac{d^3}{dx^3}(f(x)). \]

Example. Find the second derivative of \( f(x) = x^3 + 2x^2 - 3x + 1 \).

Solution. \[ \begin{align} f''(x) &= 6x + 4, \\ f'''(x) &= 6. \\ \end{align} \]


Higher Order Derivative

Definition.[\(n\)th Derivative] We say \(g(x)\) is the \(n\)th derivative of \(f(x)\) if \[ g(x) = \dfrac{d}{dx}(f^{(n-1)}(x)) \] where \(f^{(n-1)}\) is the \((n-1)\)th derivative.

Remark. We denote the \(n\)th derivative as \[ g(x) = f^{(n)}(x) = \dfrac{d^n}{dx^n}(f(x)). \]

Examples.

Remark. We say \(f(x)\) is \(n\) times differentiable if all the derivatives of \(f(x)\) up to the \(n\)th derivative exist. We say \(f^{(n)}(x)\) is a higher order derivative of \(f(x)\) if \(n\geq 2\).


Derivative of Sine and Cosine

Theorem. The functions \( y = \sin x \) and \( y = \cos x \) are differentiable and \[ \frac{d}{dx} \sin x = \cos x \quad \text{and} \quad \frac{d}{dx} \cos x = -\sin x \]

For other trigonometric functions, we have

\[ \frac{d}{dx} \tan x = \sec^2 x, \quad \frac{d}{dx} \sec x = \sec x \tan x \]

\[ \frac{d}{dx} \cot x = -\csc^2 x, \quad \frac{d}{dx} \csc x = -\csc x \cot x \]


Squeeze Theorem

Squeeze Theorem. Assume that for \( x \neq c \) (in some open interval containing \( c \)), \[ l(x) \leq f(x) \leq u(x) \quad \text{and} \quad \lim_{x \to c} l(x) = \lim_{x \to c} u(x) = L \] Then \( \lim\limits_{x \to c} f(x) \) exists and \( \lim\limits_{x \to c} f(x) = L \).

Application of Squeeze Theorem.

If we want to find the limit of \( \dfrac{\sin x}{x} \) as \( x \) approaches \( 0 \), we can use the Squeeze Theorem. But we firstly need to find \(u(x)\) and \(l(x)\).

\[ \cos \theta \leq \frac{\sin \theta}{\theta} \leq 1 \quad \text{for} \quad -\frac{\pi}{2} < \theta < \frac{\pi}{2}, \quad \theta \neq 0 \]

Since \( \lim\limits_{\theta \to 0} \cos \theta = 1 \) and \( \lim\limits_{\theta \to 0} 1 = 1 \), we have \[ \lim_{\theta\to 0}\cos \theta \leq \lim_{\theta \to 0} \frac{\sin \theta}{\theta} \leq \lim_{\theta \to 0} 1. \] \[ 1 \leq \lim_{\theta \to 0} \frac{\sin \theta}{\theta} \leq 1. \] So \[ \lim\limits_{\theta \to 0} \frac{\sin \theta}{\theta} = 1. \]

Now, we want to find the limit of \( \dfrac{1 - \cos \theta}{\theta} \) as \( \theta \) approaches \( 0 \).

Solution. \[ \begin{align} \lim_{\theta \to 0} \frac{1 - \cos \theta}{\theta} &= \lim_{\theta \to 0} \left(\frac{1 - \cos \theta}{\theta} \cdot \frac{1 + \cos \theta}{1 + \cos \theta}\right) \\ &= \lim_{\theta \to 0} \frac{1 - \cos^2 \theta}{\theta(1 + \cos \theta)} \\ &= \lim_{\theta \to 0} \frac{\sin^2 \theta}{\theta(1 + \cos \theta)} \\ &= \lim_{\theta \to 0} \frac{\sin \theta}{\theta} \cdot \lim_{\theta \to 0} \frac{\sin \theta}{1 + \cos \theta} \\ \end{align} \] Since we know that \(\lim\limits_{\theta \to 0} \frac{\sin \theta}{\theta} = 1\), we have \[ \lim_{\theta \to 0} \frac{1 - \cos \theta}{\theta} = \lim_{\theta \to 0} \frac{\sin \theta}{\theta} \cdot \lim_{\theta \to 0} \frac{\sin \theta}{1 + \cos \theta} = 1\cdot 0 = 0. \]

Thus, we can conclude that

Theorem. \[ \lim_{\theta \to 0} \frac{\sin \theta}{\theta} = 1 \quad \text{and} \quad \lim_{\theta \to 0} \frac{1 - \cos \theta}{\theta} = 0 \]

We can have the more general form of the theorem above:

Theorem. \[ \lim_{\theta \to 0} \frac{\sin (c\cdot \theta)}{c\cdot \theta} = 1 \quad \text{and} \quad \lim_{\theta \to 0} \frac{1 - \cos (c\cdot \theta)}{c\cdot \theta} = 0, \] where \(c\) is a nonzero constant.