Differentiation: First Princip
Cheatsheet Content
### Differentiation: Introduction Differentiation is a fundamental concept in calculus that allows us to find the rate of change of a function. Geometrically, it represents the slope of the tangent line to a curve at any given point. ### Definition of Gradient The gradient of a curve at a specific point is defined as the gradient of the tangent line to the curve at that point. A tangent is a line that touches the curve at one point without cutting through it at that point. - It's only possible to draw one tangent to a curve at any given point. - The gradient of a curve is constantly changing, unlike a straight line. ### Differentiation from First Principles Differentiation from first principles uses the definition of the derivative: $$f'(x) = \lim_{h\to0} \frac{f(x+h) - f(x)}{h}$$ This formula is IN FORMULA BOOKLET. **Steps to Differentiate from First Principles:** 1. Identify $f(x)$ and substitute it into the formula. 2. Expand $f(x+h)$ in the numerator. 3. Simplify the numerator, factorize, and cancel $h$. 4. Evaluate the remaining expression as $h \to 0$. ### Example: Prove that the derivative of $5x^3$ is $15x^2$. Identify $f(x)$: $f(x) = 5x^3$ $$f'(x) = \lim_{h\to0} \frac{5(x+h)^3 - 5x^3}{h}$$ Expand $f(x+h)$: $(x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3$ $$f'(x) = \lim_{h\to0} \frac{5(x^3 + 3x^2h + 3xh^2 + h^3) - 5x^3}{h}$$ $$f'(x) = \lim_{h\to0} \frac{5x^3 + 15x^2h + 15xh^2 + 5h^3 - 5x^3}{h}$$ Simplify: $$f'(x) = \lim_{h\to0} \frac{15x^2h + 15xh^2 + 5h^3}{h}$$ $$f'(x) = \lim_{h\to0} (15x^2 + 15xh + 5h^2)$$ Evaluate as $h \to 0$: $$f'(x) = 15x^2 + 15x(0) + 5(0)^2 = 15x^2$$ Thus, the derivative of $5x^3$ is $15x^2$. ### Example: Differentiating $\sin x$ from First Principles Identify $f(x)$: $f(x) = \sin x$ $$f'(x) = \lim_{h\to0} \frac{\sin(x+h) - \sin x}{h}$$ Expand $\sin(x+h)$: $$\sin(A \pm B) = \sin A \cos B \pm \cos A \sin B$$ Substitute $A=x$ and $B=h$: $$\sin(x+h) = \sin x \cos h + \cos x \sin h$$ $$f'(x) = \lim_{h\to0} \frac{\sin x \cos h + \cos x \sin h - \sin x}{h}$$ Rearrange and factorize: $$f'(x) = \lim_{h\to0} \frac{\sin x (\cos h - 1) + \cos x \sin h}{h}$$ $$f'(x) = \lim_{h\to0} \left( \sin x \frac{\cos h - 1}{h} + \cos x \frac{\sin h}{h} \right)$$ Using the small angle approximations for $h \to 0$: $$\sin \theta \approx \theta \quad \quad \cos \theta \approx 1 - \frac{\theta^2}{2}$$ Therefore, as $h \to 0$: $$\lim_{h\to0} \frac{\sin h}{h} = 1$$ $$\lim_{h\to0} \frac{\cos h - 1}{h} = \lim_{h\to0} \frac{\left(1 - \frac{h^2}{2}\right) - 1}{h}$$ $$= \lim_{h\to0} \frac{-\frac{h^2}{2}}{h}$$ $$= \lim_{h\to0} -\frac{h}{2}$$ $$= 0$$ Substituting these limits back into the expression for $f'(x)$: $$f'(x) = \sin x \left(\lim_{h\to0} \frac{\cos h - 1}{h}\right) + \cos x \left(\lim_{h\to0} \frac{\sin h}{h}\right)$$ Evaluate as $h \to 0$: $$f'(x) = \sin x (0) + \cos x (1) = \cos x$$ Thus, the derivative of $\sin x$ is $\cos x$. ### Example: Differentiating $\cos x$ from First Principles Identify $f(x)$: $f(x) = \cos x$ $$f'(x) = \lim_{h\to0} \frac{\cos(x+h) - \cos x}{h}$$ Expand $\cos(x+h)$: $$\cos(A \pm B) = \cos A \cos B \mp \sin A \sin B$$ Substitute $A=x$ and $B=h$: $$\cos(x+h) = \cos x \cos h - \sin x \sin h$$ $$f'(x) = \lim_{h\to0} \frac{\cos x \cos h - \sin x \sin h - \cos x}{h}$$ Rearrange and factorize: $$f'(x) = \lim_{h\to0} \frac{\cos x (\cos h - 1) - \sin x \sin h}{h}$$ $$f'(x) = \lim_{h\to0} \left( \cos x \frac{\cos h - 1}{h} - \sin x \frac{\sin h}{h} \right)$$ Using the small angle approximations from the previous example: $$\sin \theta \approx \theta \quad \quad \cos \theta \approx 1 - \frac{\theta^2}{2}$$ $$\lim_{h\to0} \frac{\cos h - 1}{h} = 0$$ $$\lim_{h\to0} \frac{\sin h}{h} = 1$$ Substituting these limits back into the expression for $f'(x)$: $$f'(x) = \cos x \left(\lim_{h\to0} \frac{\cos h - 1}{h}\right) - \sin x \left(\lim_{h\to0} \frac{\sin h}{h}\right)$$ Evaluate as $h \to 0$: $$f'(x) = \cos x (0) - \sin x (1) = -\sin x$$ Thus, the derivative of $\cos x$ is $-\sin x$. ### Example: Differentiating $\tan x$ from First Principles Identify $f(x)$: $f(x) = \tan x$ $$f'(x) = \lim_{h\to0} \frac{\tan(x+h) - \tan x}{h}$$ Expand $\tan(x+h)$: $$\tan(A \pm B) = \frac{\tan A \pm \tan B}{1 \mp \tan A \tan B}$$ Substitute $A=x$ and $B=h$: $$\tan(x+h) = \frac{\tan x + \tan h}{1 - \tan x \tan h}$$ $$f'(x) = \lim_{h\to0} \frac{\frac{\tan x + \tan h}{1 - \tan x \tan h} - \tan x}{h}$$ Simplify the numerator: $$f'(x) = \lim_{h\to0} \frac{\frac{\tan x + \tan h - \tan x(1 - \tan x \tan h)}{1 - \tan x \tan h}}{h}$$ $$f'(x) = \lim_{h\to0} \frac{\tan x + \tan h - \tan x + \tan^2 x \tan h}{h(1 - \tan x \tan h)}$$ $$f'(x) = \lim_{h\to0} \frac{\tan h + \tan^2 x \tan h}{h(1 - \tan x \tan h)}$$ $$f'(x) = \lim_{h\to0} \frac{\tan h (1 + \tan^2 x)}{h(1 - \tan x \tan h)}$$ Using the small angle approximation for $h \to 0$: $$\tan \theta \approx \theta$$ Therefore, as $h \to 0$: $$\lim_{h\to0} \frac{\tan h}{h} = 1$$ And $1 + \tan^2 x = \sec^2 x$. Substituting these limits back into the expression for $f'(x)$: $$f'(x) = \lim_{h\to0} \left( \frac{\tan h}{h} \times \frac{1 + \tan^2 x}{1 - \tan x \tan h} \right)$$ Evaluate as $h \to 0$: $$f'(x) = 1 \times \frac{1 + \tan^2 x}{1 - \tan x (0)}$$ $$f'(x) = \frac{1 + \tan^2 x}{1} = \sec^2 x$$ Thus, the derivative of $\tan x$ is $\sec^2 x$. ### Differentiation Rules Here are common differentiation rules. - $\frac{d}{dx}(x^n) = nx^{n-1}$ - $\frac{d}{dx}(e^x) = e^x$ - $\frac{d}{dx}(a^x) = a^x \ln a$ (for $a > 0$) - $\frac{d}{dx}(\ln x) = \frac{1}{x}$ - $\frac{d}{dx}(\sin x) = \cos x$ - $\frac{d}{dx}(\cos x) = -\sin x$ - $\frac{d}{dx}(\tan x) = \sec^2 x$ - $\frac{d}{dx}(\cot x) = -\csc^2 x$ - $\frac{d}{dx}(\sec x) = \sec x \tan x$ - $\frac{d}{dx}(\csc x) = -\csc x \cot x$ #### Rules with Constant $k$ - $\frac{d}{dx}(e^{kx}) = ke^{kx}$ - $\frac{d}{dx}(a^{kx}) = k(\ln a)a^{kx}$ - $\frac{d}{dx}(\sin(kx)) = k\cos(kx)$ - $\frac{d}{dx}(\cos(kx)) = -k\sin(kx)$ - $\frac{d}{dx}(\tan(kx)) = k\sec^2(kx)$ - $\frac{d}{dx}(\ln(kx)) = \frac{1}{x}$ ### Proofs to Learn #### Proof: Derivative of $a^x$ $$ \begin{aligned} \text{Let } y &= a^x \\ a &= e^{\ln a} \\ a^x &= (e^{\ln a})^x \\ a^x &= e^{x \ln a} \\ y &= e^{x \ln a} \\ \frac{dy}{dx} &= (\ln a) e^{x \ln a} \\ \frac{dy}{dx} &= a^x \ln a \end{aligned} $$ #### Proof: Derivative of $\ln(kx)$ $$ \begin{aligned} \text{Let } y &= \ln(kx) \\ y &= \ln k + \ln x \\ \frac{dy}{dx} &= \frac{d}{dx}(\ln k) + \frac{d}{dx}(\ln x) \\ \frac{dy}{dx} &= 0 + \frac{1}{x} \\ \frac{dy}{dx} &= \frac{1}{x} \end{aligned} $$