Chapter 5a: Differentiation
What is Differentiation?
Differentiation is a fundamental concept in calculus that deals with the instantaneous rate of change of a function.
It allows us to understand:

Key Concepts Today:
Consider a curve and a fixed point \(P\) on it. How do we define a line that “just touches” the curve at \(P\)?
Secant vs. Tangent
Note
The tangent at \(P\) is the limiting position of the secant line \(PQ\) as \(Q\) approaches \(P\). \[ \text {slope} = \lim _ {Q \rightarrow P} \text {slope} \]

Sometimes, a unique tangent line at a point does not exist.
Sharp Corners (Kinks)

To find the equation of a tangent, we need its gradient (slope).
Slope of the Secant Line \(PQ\)
Let \(P = (x_P, y_P)\) and \(Q = (x_Q, y_Q)\) be two points on the curve.
The slope of the chord \(PQ\) is: \[ \mathrm {S l o p e o f c h o r d P Q} = \frac {y _ {Q} - y _ {P}}{x _ {Q} - x _ {P}}. \]
Slope of the Tangent at \(P\)
The slope of the tangent at \(P\) is the limit of the secant slopes as \(Q\) approaches \(P\): \[ \mathrm {S l o p e o f t a n g e n t a t P} = \lim _ {Q \to P} \frac {y _ {Q} - y _ {P}}{x _ {Q} - x _ {P}}. \]

Let \(\Delta x\) denote the change in \(x\), and \(\Delta y\) the corresponding change in \(y\).
The slope of the tangent at \(P\) can then be written as: \[ \mathrm {S l o p e o f t a n g e n t a t P} = \lim _ {\Delta x \to 0} \frac {\Delta y}{\Delta x}. \]
If the curve is the graph of a function \(f(x)\), we have \(y_P = f(x_P)\) and \(y_Q = f(x_Q)\). So the slope of the tangent becomes: \[ \mathrm {S l o p e o f t a n g e n t a t P} = \lim _ {x \rightarrow x _ {P}} \frac {f (x) - f \left(x _ {P}\right)}{x - x _ {P}}. \] This limit, if it exists, is called the derivative of \(f\) at \(x_P\).
Beyond geometry, derivatives describe how things change in the real world.
Increments (\(\Delta x\), \(\Delta f\))
Average Rate of Change
The ratio \(\frac{\Delta f}{\Delta x}\) is the average change in \(f\) as \(x\) changes from \(x_1\) to \(x_2\).
Instantaneous Rate of Change
The limit \(\lim_{\Delta x \to 0} \frac{\Delta f}{\Delta x}\) is the instantaneous rate of change in \(f\) with respect to \(x\).
Examples in Science & Engineering:
Tip
The derivative \(f'(x)\) is equivalent to the instantaneous rate of change!
Formal definitions of the derivative and differentiability.
Definition 5.1.2: Derivative at a Number
The derivative of a function \(f\) at a number \(c\), denoted by \(f'(c)\), is: \[ f ^ {\prime} (c) = \lim _ {x \to c} \frac {f (x) - f (c)}{x - c}, \] if this limit exists.
If \(f'(c)\) exists, we say \(f\) is differentiable at \(c\).
Definition 5.1.3: Derivative Function
Important
Alternative Notations for \(f'(c)\):
These forms are often easier to use in calculations.
Remarks on Derivative Notation
Example 5.1.4: Differentiating \(f(x) = x^2\)
Is \(f(x) = x^2\) differentiable at \(x = 1\)? \[ \lim _ {x \rightarrow 1} \frac {f (x) - f (1)}{x - 1} = \lim _ {x \rightarrow 1} \frac {x^2 - 1^2}{x - 1} = \lim _ {x \rightarrow 1} \frac {(x - 1)(x + 1)}{x - 1} = \lim _ {x \rightarrow 1} (x + 1) = 2. \]
Since the limit exists, \(f\) is differentiable at \(x = 1\) and \(f'(1) = 2\).
Find \(f'(x)\) and the domain of \(f'\).
\[ f ^ {\prime} (x) = \lim _ {h \rightarrow 0} \frac {f (x + h) - f (x)}{h} = \lim _ {h \rightarrow 0} \frac {(x + h)^2 - x^2}{h} \\ = \lim _ {h \rightarrow 0} \frac {x ^ {2} + 2 x h + h ^ {2} - x ^ {2}}{h} = \lim _ {h \rightarrow 0} \frac {2 x h + h ^ {2}}{h} \\ = \lim _ {h \rightarrow 0} (2 x + h) = 2 x. \]
Thus, \(f'(x) = 2x\) for all \(x \in \mathbb{R}\). The domain of \(f'\) is \(\mathbb{R}\).
Example 5.1.5: \(f(x) = |x|\)
Solution: We evaluate \(\lim_{x\to 0}\frac{f(x) - f(0)}{x - 0} = \lim_{x\to 0}\frac{|x|}{x}\).
Since \(f(x) = \left\{ \begin{array}{l l} x & \text {i f} x \geq 0 \\ - x & \text {i f} x < 0 \end{array} \right.\), we check left and right limits:
Since \(\lim_{x\to 0^{+}}\frac{|x|}{x}\neq \lim_{x\to 0^{-}}\frac{|x|}{x}\), the limit \(\lim_{x\to 0}\frac{|x|}{x}\) does not exist.
Therefore, \(f(x) = |x|\) is not differentiable at 0.
Graphically, this corresponds to the “kink” at \(x=0\), where no unique tangent exists.
Example 5.1.5: \(f(x) = |x|\)
In conclusion:
\[ f ^ {\prime} (x) = \left\{ \begin{array}{l l} 1 & \text {i f} x > 0 \\ - 1 & \text {i f} x < 0 \end{array} \right. \]
The domain of \(f'\) is \(\mathbb{R} \setminus \{0\}\).
Remarks on Tangents and Derivatives
If \(f'(c)\) exists, the graph of \(f\) has a tangent at \(x = c\), and \(f'(c)\) is its slope.
The equation of the tangent is given by:
\[ \frac {y - f (c)}{x - c} = f ^ {\prime} (c), \quad \text{or} \quad y = f(c) + f'(c)(x-c). \]
It is possible for a graph to have a tangent even when the derivative does not exist (e.g., a vertical tangent).
Example 5.1.6: \(f(x) = x^{1/3}\)
Solution: At \(x = 0\), we look at the limit:
\[ \lim _ {h \to 0} \frac {f (0 + h) - f (0)}{h} = \lim _ {h \to 0} \frac {h ^ {1 / 3} - 0}{h} = \lim _ {h \to 0} \frac {1}{h ^ {2 / 3}} = \infty. \]
Since the limit is not a finite number, \(f\) is not differentiable at 0.
However, the graph of \(f\) has a vertical tangent at \(x = 0\). (The slope is infinite).
For \(x \neq 0\):
\[ \lim _ {y \to x} \frac {y ^ {1 / 3} - x ^ {1 / 3}}{y - x} = \frac {1}{3 x ^ {2 / 3}}. \]
Thus, \(f'(x) = \frac{1}{3x^{2/3}}\) for \(x \in \mathbb{R} \setminus \{0\}\).
Example 5.1.7: Derivative of a Constant
Use the definition of derivative to prove \(\frac{dC}{dx} = 0\) for any constant \(C\).
Solution: Let \(f(x) = C\).
\[ f ^ {\prime} (x) = \lim _ {h \to 0} \frac {f (x + h) - f (x)}{h} = \lim _ {h \to 0} \frac {C - C}{h} = \lim _ {h \to 0} \frac {0}{h} = \lim _ {h \to 0} 0 = 0. \]
Thus, the derivative of any constant is 0.
Theorem 5.1.8: Power Rule for Positive Integers
Let \(f(x) = x^n\), where \(n\) is a positive integer. Then,
\[ f ^ {\prime} (x) = n x ^ {n - 1}, \quad \text{i.e.,} \quad \frac {d x ^ {n}}{d x} = n x ^ {n - 1}. \]
Theorem 5.1.9: Constant Multiple Rule
Let \(\alpha\) be a real constant. Consider the function \(\alpha f\), defined by \((\alpha f)(x) = \alpha \cdot f(x)\).
If \(f\) is differentiable at \(x = c\), then \(\alpha f\) is differentiable at \(x = c\) and its derivative at \(c\) is:
\[ \left(\alpha f\right) ^ {\prime} (c) = \alpha \cdot f ^ {\prime} (c). \]
Example 5.1.10:
We know \(\frac{d}{dx} (x^{1/3}) = \frac{1}{3x^{2/3}}\), \(x \neq 0\).
By the Constant Multiple Rule:
\[ \frac {d}{d x} (1 7 9 x ^ {1 / 3}) = 1 7 9 \frac {d}{d x} (x ^ {1 / 3}) = \frac {1 7 9}{3 x ^ {2 / 3}}. \]
Derivatives don’t stop at the first one! We can differentiate a function multiple times.
Example 5.1.11: Higher Derivatives of \(f(x) = x^5\)
(All subsequent derivatives will also be zero.)
Higher derivatives provide deeper insights into a function’s behavior.
Applications:
Kinematics:
Curve Shape: The first and second derivatives help determine the shape of a function’s graph (e.g., increasing/decreasing, concavity). We’ll cover this in more detail in the next sections.
Approximation: Higher derivatives are crucial for approximating functions using Taylor series, which allow us to represent complex functions as polynomials.
There’s a strong relationship between differentiability and continuity.
Theorem 5.2.1: Differentiability Implies Continuity
If a function \(f\) is differentiable at \(x = c\), then \(f\) is continuous at \(x = c\).

Caution
The converse is FALSE: A function can be continuous at \(x=c\) but NOT differentiable at \(x=c\). (Recall \(f(x) = |x|\) at \(x=0\)).
Corollary 5.2.2:
If \(f\) is not continuous at \(x = c\), then \(f\) is not differentiable at \(x = c\).
(This is the contrapositive of Theorem 5.2.1)
Theorem 5.2.3: Differentiability of Piecewise Functions
Suppose \(f\) is continuous at \(x = c\). If
\[ \lim _ {x \to c ^ {+}} f ^ {\prime} (x) = \lim _ {x \to c ^ {-}} f ^ {\prime} (x) = L, \]
then \(f\) is differentiable at \(x = c\) and \(f'(c) = L\).
This theorem is very useful for functions defined by different expressions on different intervals.
Example 5.2.4: Differentiating a Piecewise Function
Let \(f(x) = \left\{ \begin{array}{ll} x^3 + 2 & \text{if } x > 1 \\ 3x & \text{if } x \leq 1 \end{array} \right.\), find \(f'(x)\).
Solution:
Final Derivative Function:
\[ f ^ {\prime} (x) = \left\{ \begin{array}{l l} 3 x ^ {2} & \text {i f} x > 1 \\ 3 & \text {i f} x \leq 1 \end{array} \right. \]
These rules allow us to differentiate sums and differences of functions easily.
Theorem 5.2.5 (Sum and Difference Rules):
Suppose \(f\) and \(g\) are differentiable at \(x = c\). Then:
These rules handle derivatives of products and quotients of functions.
Theorem 5.2.6 (Product and Quotient Rules):
Suppose \(f\) and \(g\) are differentiable at \(x = c\). Then:
Product Rule: \(fg\) is differentiable at \(x = c\) and \[ (f g) ^ {\prime} (c) = f ^ {\prime} (c) g (c) + f (c) g ^ {\prime} (c). \]
(Memorize as: (derivative of first) times (second) plus (first) times (derivative of second))
Quotient Rule: \(f / g\) is differentiable at \(x = c\), provided \(g(c) \neq 0\), and \[ \left(\frac {f}{g}\right) ^ {\prime} (c) = \frac {f ^ {\prime} (c) g (c) - f (c) g ^ {\prime} (c)}{(g (c)) ^ {2}}. \]
(Memorize as: (derivative of top) times (bottom) minus (top) times (derivative of bottom), all over (bottom squared))
Reciprocal Rule: If \(g(x) \neq 0\) near \(c\), then \(\frac{1}{g}\) is differentiable at \(x = c\), and \[ \left(\frac {1}{g}\right) ^ {\prime} (c) = \frac {- g ^ {\prime} (c)}{(g (c)) ^ {2}}. \]
(This is a special case of the Quotient Rule where \(f(x)=1\).)
Combining previous rules, we get a general power rule for all integers.
Theorem 5.2.7: Linear Combination Rule
The function \(\alpha f + \beta g\) is differentiable at \(x = c\), where \(\alpha\) and \(\beta\) are real constants, and \[ (\alpha f + \beta g) ^ {\prime} (c) = \alpha f ^ {\prime} (c) + \beta g ^ {\prime} (c). \]
(This follows from the Constant Multiple Rule and the Sum Rule.)
Proposition 5.2.8: The Power Rule for Negative Integers
Suppose \(m\) is a negative integer, say \(m = -n\), where \(n \in \mathbb{Z}^+\). If \(f(x) = x^m\) where \(x \neq 0\), then \(f'(x) = mx^{m-1}\).
Conclusion:
\[ \frac {d}{d x} \left(x ^ {n}\right) = n x ^ {n - 1}, \text {for every (positive and negative) i n t e g e r} n. \]
The Chain Rule is used to differentiate composite functions (functions within functions).
Theorem 5.2.9 (The Chain Rule):
Let \(f\) and \(g\) be functions such that \(g(x)\) is differentiable at \(x = c\) and \(f(u)\) is differentiable at \(u = g(c)\). Then \(f \circ g\) (defined as \(f(g(x))\)) is differentiable at \(x = c\) and
\[ (f \circ g) ^ {\prime} (c) = f ^ {\prime} (g (c)) g ^ {\prime} (c). \]
Or with Leibniz notation (very intuitive!): \[ \frac {d f}{d x} = \frac {d f}{d u} \cdot \frac {d u}{d x}. \]
Example 5.2.10: Differentiating \(h(x) = \sqrt{3x^5 - 6x^2 + 7x + \pi}\)
Solution:
Let \(f(u) = \sqrt{u}\) (the “outer” function) and \(g(x) = 3x^5 - 6x^2 + 7x + \pi\) (the “inner” function).
Then \(h(x) = f(g(x))\).
Applying the Chain Rule, \(h'(x) = f'(g(x))g'(x)\):
\[ h ^ {\prime} (x) = \frac {1}{2 \sqrt {3 x ^ {5} - 6 x ^ {2} + 7 x + \pi}} \cdot (1 5 x ^ {4} - 1 2 x + 7). \]
The Chain Rule leads to convenient forms for common function types.
Corollary 5.2.11:
Generalized Power Rule: For \(n \in \mathbb{Z}\), \[ \frac{d}{dx} (f(x))^n = n(f(x))^{n - 1}f'(x). \]
(This combines the Power Rule and Chain Rule for a function raised to an integer power.)
Derivative of Square Root of a Function: For \(f(x) > 0\), \[ \frac{d}{dx}\sqrt{f(x)} = \frac{1}{2}\frac{f'(x)}{\sqrt{f(x)}}. \]
(This is a special case of (a) where \(n=1/2\), often seen enough to be remembered.)
Key derivatives for trigonometric functions.
Theorem 5.2.12:
Corollary 5.2.13 (Chain Rule for Trigonometric Functions):
Another crucial set of derivatives.
Theorem 5.2.15:
Note
The exponential function \(e^x\) is unique because its derivative is itself! (\(f'(x) = f(x)\)).
Proposition 5.2.17 (Chain Rule for Exp/Log):
Example 5.2.16:
When \(x\) and \(y\) are both functions of a third variable (a parameter \(t\)), we use parametric differentiation.
Let \(y = u(t)\) and \(x = v(t)\).
Then, to find \(\frac{dy}{dx}\), we use the formula:
\[ \frac {d y}{d x} = \frac {\frac {d y}{d t}}{\frac {d x}{d t}} = \frac {u ^ {\prime} (t)}{v ^ {\prime} (t)}, \quad \text{provided } \frac{dx}{dt} \neq 0. \]
To find the second derivative \(\frac{d^2y}{dx^2}\):
\[ \frac {d ^ {2} y}{d x ^ {2}} = \frac {d}{d x} \left(\frac {d y}{d x}\right) = \frac {\frac {d}{d t} \left(\frac {d y}{d x}\right)}{\frac {d x}{d t}}. \]
(Note: \(\frac{d^2y}{dx^2} \neq \frac{d^2y/dt^2}{d^2x/dt^2}\))
Example 5.2.18: Cycloid Curve
Let \(x = 9(t - \sin t)\) and \(y = 9(1 - \cos t)\).
Find \(\frac{dy}{dt}\) and \(\frac{dx}{dt}\):
Find \(\frac{dy}{dx}\): \[ \frac {d y}{d x} = \frac {9 \sin t}{9 (1 - \cos t)} = \frac {2 \sin \frac {t}{2} \cos \frac {t}{2}}{2 \sin^ {2} \frac {t}{2}} = \cot \frac {t}{2}. \]
Find \(\frac{d^2y}{dx^2}\):
First, differentiate \(\frac{dy}{dx}\) with respect to \(t\):
\(\frac{d}{dt}\left(\cot \frac{t}{2}\right) = -\csc^2\left(\frac{t}{2}\right) \cdot \frac{1}{2}\). Then, divide by \(\frac{dx}{dt}\):
\[ \frac {d ^ {2} y}{d x ^ {2}} = \frac {- \frac {1}{2} \csc^2 \left(\frac{t}{2}\right)}{9 (1 - \cos t)} = \frac {- \frac {1}{2 \sin^2 \left(\frac{t}{2}\right)}}{9 \cdot 2 \sin^2 \left(\frac{t}{2}\right)} = - \frac {1}{3 6 \sin^ {4} \left(\frac {t}{2}\right)}. \]
When \(x\) and \(y\) are related by an equation \(F(x, y) = 0\) that isn’t easily solved for \(y\), we use implicit differentiation.
We differentiate both sides of the equation with respect to \(x\), treating \(y\) as an unknown function of \(x\) (i.e., \(y(x)\)) and applying the Chain Rule whenever differentiating a term involving \(y\).
Example 5.3.1: Find \(\frac{dy}{dx}\) if \(3x^4 y^2 - 7xy^3 = 4 - 8y\).
Solution: Differentiating each term with respect to \(x\):
\[ \frac {d}{d x} (3x^4 y^2) - \frac {d}{d x} (7xy^3) = \frac {d}{d x} (4) - \frac {d}{d x} (8y). \]
Applying Product Rule and Chain Rule:
Example 5.3.1: Find \(\frac{dy}{dx}\) if \(3x^4 y^2 - 7xy^3 = 4 - 8y\). (cont.)
Substituting these back into the equation: \[ 12x^3 y^2 + 6x^4 y \frac{dy}{dx} - (7y^3 + 21xy^2 \frac{dy}{dx}) = 0 - 8 \frac{dy}{dx}. \]
Rearranging terms to isolate \(\frac{dy}{dx}\):
\[ 6x^4 y \frac{dy}{dx} - 21xy^2 \frac{dy}{dx} + 8 \frac{dy}{dx} = 7y^3 - 12x^3 y^2. \] \[ \frac {d y}{d x} (6x^4 y - 21xy^2 + 8) = 7y^3 - 12x^3 y^2. \] Therefore: \[ {\frac {d y}{d x}} = \frac {7y^3 - 12x^3 y^2}{6x^4 y - 21xy^2 + 8}. \]
We can now differentiate \(x^n\) for all integers \(n\). What about rational exponents like \(x^{3/2}\)?
For a rational number \(r = \frac{m}{n}\), where \(m \in \mathbb{Z}\) and \(n \in \mathbb{Z}^+\), \(x^{\frac{m}{n}} = (x^{\frac{1}{n}})^m\).
Theorem 5.3.2: Power Rule for Rational Powers
Suppose \(r = \frac{m}{n}\), where \(n\) is a positive integer, and \(m \in \mathbb{Z}\). Then \[ \frac {d}{d x} \left(x ^ {r}\right) = r x ^ {r - 1}. \]
Example 5.3.3:
\[ \frac {d}{d x} \left(x ^ {3 / 2} - \pi x ^ {- 9 / 5} + x ^ {1 / 3}\right) = \frac{3}{2}x^{1/2} - \pi \left(-\frac{9}{5}\right)x^{-14/5} + \frac{1}{3}x^{-2/3}. \\ = \frac{3}{2}\sqrt{x} + \frac{9\pi}{5}x^{-14/5} + \frac{1}{3}x^{-2/3}. \]
Logarithmic differentiation is a technique useful for functions with complex products, quotients, or variable exponents.
Theorem 5.3.4: Power Rule for General Real Exponents
Let \(r\) be a real constant. The function \(f(x) = x^r\) is defined for \(x > 0\), and \[ f ^ {\prime} (x) = r x ^ {r - 1}. \]
Verification using Logarithmic Differentiation (for \(x > 0\)):
Let \(y = x^r\).
Take the natural logarithm of both sides: \[ \ln y = \ln (x^r) \Rightarrow \ln y = r \ln x. \] Differentiate implicitly with respect to \(x\): \[ \frac {1}{y} \frac {d y}{d x} = r \frac {1}{x}. \] Solve for \(\frac{dy}{dx}\): \[ \frac {d y}{d x} = r \left(\frac {y}{x}\right) = r \left(\frac {x ^ {r}}{x}\right) = r x ^ {r - 1}. \]
Theorem 5.3.2: Power Rule for Rational Powers
Example 5.3.5: Find the derivative \(\frac{d}{dx}\left(x^{\pi} - \pi^{x}\right)\).
Solution:
Apply the sum/difference rule:
\(\frac{d}{dx}\left(x^{\pi} - \pi^{x}\right) = \frac{d}{dx}(x^{\pi}) - \frac{d}{dx}(\pi^{x})\). - For \(x^{\pi}\): This is \(x^r\) where \(r=\pi\) is a constant. Use power rule: \(\pi x^{\pi-1}\). - For \(\pi^{x}\): This is \(a^x\) where \(a=\pi\) is a constant. Use exponential rule: \(\pi^x \ln \pi\).
So, \(\frac{d}{dx}\left(x^{\pi} - \pi^{x}\right) = \pi x^{\pi-1} - \pi^x \ln \pi\).
Example 5.3.6: Find the derivative of \(y = x^x\) for \(x > 0\).
Solution: This has a variable in both the base and the exponent, so we use logarithmic differentiation.
Take the natural logarithm of both sides: \[ \ln y = \ln (x^x) \Rightarrow \ln y = x \ln x. \] Differentiate implicitly with respect to \(x\): \[ \frac {1}{y} \frac {d y}{d x} = (1) \ln x + x \left(\frac {1}{x}\right) \quad (\text{using Product Rule on } x \ln x). \] \[ \frac {1}{y} \frac {d y}{d x} = \ln x + 1. \] Solve for \(\frac{dy}{dx}\): \[ \frac {d y}{d x} = y (\ln x + 1) = x^x (\ln x + 1). \]
How do we find the derivative of an inverse function?
Theorem 5.3.7 (Derivative of Inverse Function):
If \(f\) is increasing (respectively decreasing) and continuous on an interval \((a, b)\) and \(f'(x_0) \neq 0\) for some \(x_0 \in (a, b)\), then \(f^{-1}\) is differentiable at the point \(y_0 = f(x_0)\), and \[ (f ^ {- 1}) ^ {\prime} (y _ {0}) = \frac {1}{f ^ {\prime} (f ^ {- 1} (y _ {0}))} = \frac {1}{f ^ {\prime} (x _ {0})}. \]
The condition \(f'(x_0) \neq 0\) ensures the tangent to \(f\) is not horizontal, so the tangent to \(f^{-1}\) is not vertical.
Example 5.3.8: Derivative of Inverse Cosine
Let \(f(x) = \cos x\), where \(x \in (0, \pi)\). Find \((f^{-1})'(0)\).
Solution:
Here, \(y_0 = 0\). We need to find \(x_0\) such that \(f(x_0) = y_0\), i.e., \(\cos x_0 = 0\).
For \(x_0 \in (0, \pi)\), \(x_0 = \frac{\pi}{2}\).
So, \(f^{-1}(0) = \frac{\pi}{2}\).
Now, find \(f'(x)\):
\(f'(x) = \frac{d}{dx}(\cos x) = -\sin x\).
Evaluate \(f'(x_0)\) at \(x_0 = \frac{\pi}{2}\):
\(f'(\frac{\pi}{2}) = -\sin(\frac{\pi}{2}) = -1\).
Apply the inverse derivative formula: \[ (f ^ {- 1}) ^ {\prime} (0) = \frac {1}{f ^ {\prime} (f ^ {- 1} (0))} = \frac {1}{f ^ {\prime} (\pi / 2)} = \frac {1}{- \sin (\pi / 2)} = \frac {1}{-1} = -1. \]
Using the inverse function theorem, we can derive derivatives for inverse trigonometric functions.
Theorem 5.3.9: