Differentiation
Imagine you are Galileo's assistant. You have gone to the leaning tower of Pisa to test whether objects with different masses fall at different speeds. As you release an object you start a timer so that at $t = 0$ the downward velocity is also zero.
You know from Newton's equations that $s=ut+\dfrac{1}{2}at^2$. We know $u=0$ and that $a$ is the acceleration due to gravity, so we can write $s=\dfrac{1}{2}gt^2$. Note: we are measuring downwards from the release point.
Newton's first equation of motion states $v=u+at$, so we can write $v=gt$. The acceleration due to gravity $g$ is constant over these distances, so the velocity is proportional to the time. Time $t$ is the independent variable and distance $s$ is the dependent variable.
$s=\dfrac{1}{2}gt^2$
$v=gt$
To convert $s=\dfrac{1}{2}gt^2$ into $gt$ we multiply the expression by the exponent of $t$ and then reduce the exponent by $1$. This gives the rate of change of distance with respect to time — the velocity. Repeating the process gives the rate of change of velocity — the acceleration.
This process is called differentiation. In general, differentiation gives us the rate of change of one variable with respect to another.
Rules of Differentiation
Polynomials
If $y=ax^n + bx^{n-1} + cx^{n-2} \ldots$ then $\dfrac{dy}{dx} = nax^{n-1} + (n-1)bx^{n-2} + (n-2)cx^{n-3} \ldots$
Example 1: Given $y=2x^3 + 4x^2 + 3x + 5$ find $dy/dx$.
| $y$ | $=$ | $2x^3 + 4x^2 + 3x + 5$ |
| $\dfrac{dy}{dx}$ | $=$ | $3 \times 2x^2 + 2 \times 4x + 3 + 0$ |
| $=$ | $6x^2 + 8x + 3$ |
Chain Rule
If $y=y(u)$ and $u=u(x)$ then $\dfrac{dy}{dx} = \dfrac{dy}{du} \dfrac{du}{dx}$.
Example 2: Given $y=(2x^3+4x^2)^4$ find $dy/dx$.
Let $u=2x^3+4x^2$, so $y=u^4$.
Then $\dfrac{dy}{du}=4u^3$ and $\dfrac{du}{dx}=6x^2+8x$, so
| $\dfrac{dy}{du}\dfrac{du}{dx}$ | $=$ | $4u^3 (6x^2 + 8x)$ |
| $=$ | $4(2x^3+4x^2)^3 (6x^2 + 8x)$ |
Sanity check: the highest-order term of the question is $16x^{12}$, which differentiates to $192x^{11}$. The highest-order term of our answer is $4 \times 8x^9 \times 6x^2 = 192x^{11}$ — so we can be confident it is correct.
Example 3: Differentiate $y=\sin(3x)$.
Let $u=3x$, so $\dfrac{du}{dx}=3$ and $y=\sin(u)$, giving $\dfrac{dy}{du}=\cos(u)$.
So $\dfrac{dy}{dx}=\dfrac{dy}{du} \dfrac{du}{dx} = \cos(u) \times 3 = 3\cos(3x)$.
More generally $\dfrac{d}{dx}\sin(ax) = a\cos(ax)$, $\dfrac{d}{dx}\cos(ax) = -a\sin(ax)$ and $\dfrac{d}{dx}\tan(ax) = a\sec^2(ax)$.
Product Rule
If $u=u(x)$ and $v=v(x)$ then $\dfrac{d}{dx}(uv) = u \dfrac{dv}{dx} + v \dfrac{du}{dx}$.
Example 4: Differentiate $y=3x^3 e^x$.
Let $u=3x^3$ and $v=e^x$, so $\dfrac{du}{dx}=9x^2$ and $\dfrac{dv}{dx}=e^x$.
| $\dfrac{dy}{dx}$ | $=$ | $u\dfrac{dv}{dx} + v \dfrac{du}{dx}$ |
| $=$ | $3x^3 e^x + 9x^2 e^x$ | |
| $=$ | $3x^2 e^x(x + 3)$ |
Example 5: Differentiate $y=3x^2 \cos(4x)$.
Let $u=3x^2$ and $v=\cos(4x)$, so $\dfrac{du}{dx}=6x$ and $\dfrac{dv}{dx}=-4\sin(4x)$.
| $\dfrac{dy}{dx}$ | $=$ | $3x^2(-4\sin(4x)) + \cos(4x)\,6x$ |
| $=$ | $3x(2\cos(4x)-4x\sin(4x))$ |
Quotient Rule
If $u=u(x)$ and $v=v(x)$ then $\dfrac{d}{dx}\left(\dfrac{u}{v}\right) = \dfrac{v \dfrac{du}{dx} - u \dfrac{dv}{dx}}{v^2}$.
Example 6: Differentiate $y = \tan(x)$.
Let $u=\sin(x)$ and $v=\cos(x)$, so $\dfrac{du}{dx}=\cos(x)$ and $\dfrac{dv}{dx}=-\sin(x)$.
| $\dfrac{d}{dx}\left(\dfrac{u}{v}\right)$ | $=$ | $\dfrac{\cos(x)\cos(x) - \sin(x)(-\sin(x))}{\cos^2(x)}$ |
| $=$ | $\dfrac{\cos^2(x) + \sin^2(x)}{\cos^2(x)}$ |
Remember $\sin^2(x) + \cos^2(x) = 1$, so this is $\dfrac{1}{\cos^2(x)} = \sec^2(x)$.
Example 7: Given $y = \dfrac{4-3x}{2x-3}$ find $dy/dx$.
Let $u=4-3x$ and $v=2x-3$, so $\dfrac{du}{dx}=-3$ and $\dfrac{dv}{dx}=2$.
| $\dfrac{d}{dx}\left(\dfrac{u}{v}\right)$ | $=$ | $\dfrac{(2x-3)(-3) - (4-3x)2}{(2x-3)^2}$ |
| $=$ | $\dfrac{-6x + 9 - 8 + 6x}{(2x-3)^2} = \dfrac{1}{(2x-3)^2}$ |
Using Differentiation
Imagine a cylindrical container 5 metres in diameter and 10 metres tall. If liquid pours in at 1000 litres per second, what is the rate of change of depth? The volume is $V = \pi r^2 y$ where $y$ is the depth.
| $V$ | $=$ | $\pi r^2 y$ |
| $\dfrac{dV}{dt}$ | $=$ | $\pi r^2 \dfrac{dy}{dt}$ |
| $\dfrac{dy}{dt}$ | $=$ | $\dfrac{1}{\pi r^2} \dfrac{dV}{dt} = \dfrac{1}{\pi r^2} = 0.051$ m/s (51 mm/s) |
The radius of a cylinder is constant. With a conical funnel the radius of the surface varies with depth, so we replace $r$ with $x$ where $x=f(y)$. Using a cone of maximum diameter 5 m and height 10 m, with liquid at 1000 litres per second, the rate of change of depth at a depth of 2 m is:
| $V$ | $=$ | $\dfrac{\pi x^2 y}{3}$ |
| using $x/y = r/h$, $V$ | $=$ | $\dfrac{\pi r^2 y^3}{3h^2}$ |
| $\dfrac{dV}{dt}$ | $=$ | $\dfrac{\pi r^2 y^2}{h^2} \dfrac{dy}{dt}$ |
| $\dfrac{dy}{dt}$ | $=$ | $\dfrac{h^2}{\pi r^2 y^2} \dfrac{dV}{dt} = \dfrac{10^2}{\pi \times 2.5^2 \times 2^2} = 1.27$ m/s |
Table of Common Standard Differentials
| $y=f(x)$ | $dy/dx = f'(x)$ |
|---|---|
| $x^n$ | $nx^{n-1}$ |
| $\sin(ax)$ | $a\cos(ax)$ |
| $\cos(ax)$ | $-a\sin(ax)$ |
| $\tan(ax)$ | $a\sec^2(ax)$ |
| $e^{ax}$ | $ae^{ax}$ |
| $\ln(ax)$ | $1/x$ |