5.1 Differentiation of Univariate Functions
Differentiation of univariate functions is fundamental in understanding how functions change with respect to their input. A derivative measures the instantaneous rate of change or slope of the tangent line to a function at a point.
One can compute the slope of the secant line through two points on \(f(x)\) using the difference quotient.
Definition 5.1 Difference Quotient
\[
\frac{\delta y}{\delta x} = \frac{f(x + \delta x) - f(x)}{\delta x}
\]
As \(\delta x \to 0\), the secant approaches the tangent line. We call the value of the difference quotient as \(\delta x \rightarrow 0\) the derivative and use the notation \(\frac{df}{dx}\) to denote the derivative.
Definition 5.2 Derivative
\[
\frac{df}{dx} = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}
\]
The derivative represents the slope of the tangent to \(f\) at point \(x\). It points in the direction of steepest ascent of \(f\).
Example 5.1 For \(f(x) = x^n\): \[ \frac{df}{dx} = \lim_{h \to 0} \frac{(x + h)^n - x^n}{h} = nx^{n-1} \]
5.1.1 Taylor Series and Polynomial Approximation
Definition 5.3 A Taylor series approximates a function \(f(x)\) around a point \(x_0\): \[ T_\infty(x) = \sum_{k=0}^{\infty} \frac{f^{(k)}(x_0)}{k!}(x - x_0)^k \]
If \(x_0 = 0\), the Taylor series is known as the Maclaurin series. If \(f(x) = T_\infty(x)\), then \(f\) is analytic.
Example 5.2 Taylor Polynomial for \(f(x) = x^4\) At \(x_0 = 1\): \[ T_6(x) = 1 + 4(x - 1) + 6(x - 1)^2 + 4(x - 1)^3 + (x - 1)^4 \] Expanding gives \(T_6(x) = x^4 = f(x)\).
Example 5.3 Taylor Series of \(f(x) = \sin(x) + \cos(x)\) At \(x_0 = 0\): \[ T_\infty(x) = \cos(x) + \sin(x) \] Derived using power series: \[ \cos(x) = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k}}{(2k)!}, \quad \sin(x) = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k+1}}{(2k+1)!} \]
5.1.2 Differentiation Rules
Theorem 5.1 Let \(f\) and \(g\) be continuous functions. Then:
Product Rule
\[ (f(x)g(x))' = f'(x)g(x) + f(x)g'(x) \]Quotient Rule
\[ \left( \frac{f(x)}{g(x)} \right)' = \frac{f'(x)g(x) - f(x)g'(x)}{[g(x)]^2} \]Sum Rule
\[ (f(x) + g(x))' = f'(x) + g'(x) \]Chain Rule
For \(h(x) = g(f(x))\): \[ h'(x) = g'(f(x)) \cdot f'(x) \]
Example 5.4 Given \(f(x) = 2x + 1\) and \(g(x) = x^4\), if \(h(x) = g(f(x)) = (2x+1)^4\), then \[ h'(x) = g'(f) \cdot f'(x) = 4(2x + 1)^3 \cdot 2 = 8(2x + 1)^3 \]
Exercises
Exercise 5.1 Differentiate \(f(x) = e^x \sin(x) + \cos(\ln(x))\).
Exercise 5.2 Differentiate \(f(x) = \dfrac{\ln(x)}{x^2 + x + 5}\).
Exercise 5.3 Differentiate \(f(x) = \frac{\sin(x)\cos(x)}{x^2e^x}\). Hint, take logs on both sides.
Exercise 5.4 Differentiate \(g(x) = e^{\sin(x)e^x}\). Hint, take logs on both sides.
Exercise 5.5 Find the Taylor series for \(f(x) = x^4\) around \(x_0 = 1\).
Exercise 5.6 Find the Taylor series for \(f(x) = \cos(x)\) around \(x_0 = 0\).
Exercise 5.7 Find the Taylor series for \(f(x) = e^x\) around \(x_0 = 0\).