Differentiation

Last updated: December 2024

Disclaimer: These are my personal notes compiled for my own reference and learning. They may contain errors, incomplete information, or personal interpretations. While I strive for accuracy, these notes are not peer-reviewed and should not be considered authoritative sources. Please consult official textbooks, research papers, or other reliable sources for academic or professional purposes.

1. Definition of Derivative

The derivative of a function $f(x)$ at a point $x = a$ is:

$$f'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h}$$

This represents the instantaneous rate of change of $f$ at $x = a$.

2. Basic Differentiation Rules

3. Chain Rule

For composite functions $f(g(x))$:

$$\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)$$

This is one of the most important rules in calculus.

4. Derivatives of Common Functions

5. Implicit Differentiation

When $y$ is defined implicitly by an equation $F(x,y) = 0$:

$$\frac{dy}{dx} = -\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial y}}$$

Example: For $x^2 + y^2 = 1$, we get $\frac{dy}{dx} = -\frac{x}{y}$.

6. Higher Order Derivatives

The $n$-th derivative is denoted $f^{(n)}(x)$ or $\frac{d^n f}{dx^n}$:

$$f''(x) = \frac{d^2 f}{dx^2}, \quad f'''(x) = \frac{d^3 f}{dx^3}, \quad \ldots$$

7. Applications

7.1 Optimization

Critical points occur where $f'(x) = 0$ or $f'(x)$ is undefined.

7.2 Related Rates

When two variables are related, their rates of change are also related:

$$\frac{dA}{dt} = \frac{dA}{dr} \cdot \frac{dr}{dt}$$

8. L'Hôpital's Rule

For indeterminate forms $\frac{0}{0}$ or $\frac{\infty}{\infty}$:

$$\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}$$

9. Taylor Series

The Taylor series expansion of $f(x)$ around $x = a$ is:

$$f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \cdots$$

10. Code Example

# Python code for symbolic differentiation
import sympy as sp

# Define variable and function
x = sp.Symbol('x')
f = x**3 + 2*x**2 - 5*x + 1

# First derivative
f_prime = sp.diff(f, x)
print(f"f'(x) = {f_prime}")

# Second derivative
f_double_prime = sp.diff(f, x, 2)
print(f"f''(x) = {f_double_prime}")

# Evaluate at specific point
f_prime_at_2 = f_prime.subs(x, 2)
print(f"f'(2) = {f_prime_at_2}")

11. References