Mastering Mathematics Smartly
by Wee Wen Shih

A unique self-help website that provides comprehensive coverage of mathematics at A-level & beyond, written in a student-friendly style.

Section 1

Many real-life applications require functions with more than one variable. For instance, the kinetic energy of a moving body, which is given by E = \frac{1}{2}mv^2, depends on m (i.e. the mass of the body) and v (i.e. the velocity of the body). If we keep v fixed and allow m to vary, we can measure the rate of change of E with respect to m, and we call it the partial derivative of E with respect to m (written as \frac{\partial E}{\partial m}).

To find this partial derivative, we take v to be a constant variable and differentiate E with respect to m, so that we obtain \frac{\partial E}{\partial m} = \frac{1}{2}v^2.
To find \frac{\partial E}{\partial v} (i.e. the rate of change of E with respect to v), we take m to be a constant variable and differentiate E with respect to v:
\frac{\partial E}{\partial v} = \frac{1}{2}m(2v) = mv.
 
It is helpful to note that we are able to employ the usual techniques of ordinary differentiation (i.e. product, quotient and chain rules) in carrying out partial differentiation.
 
Worked example 1: Given that z = w - y\:\text{cos}\:(wx), find \frac{\partial z}{\partial w}, \frac{\partial z}{\partial x} and \frac{\partial z}{\partial y}.
Keep x, y constant and differentiate z with respect to w, we obtain \frac{\partial z}{\partial w} = 1 - y\{-x\:\text{sin}\:(wx)\}
\Rightarrow \frac{\partial z}{\partial w} = 1 + xy\:\text{sin}\:(wx).
Keep wy constant and differentiate z with respect to x, we obtain \frac{\partial z}{\partial x} = -y\{-w\:\text{sin}\:(wx)\}
\Rightarrow \frac{\partial z}{\partial x} = wy\:\text{sin}\:(wx).
Keep w, x constant and differentiate z with respect to y, we obtain \frac{\partial z}{\partial y} = -\text{cos}\:(wx).
 
We look at the next example where we apply implicit differentiation.
Worked example 2: Given that xz = \text{ln}\:(y + z), find \frac{\partial z}{\partial x} and \frac{\partial z}{\partial y}.
Keep y constant and differentiate both sides implicitly with respect to x (using the product and chain rules), we obtain
z + x\frac{\partial z}{\partial x} = \frac{1}{y + z}\frac{\partial z}{\partial x}
\Rightarrow \frac{\partial z}{\partial x} = \frac{z(y+z)}{1-x(y+z)}, after simplifying.
Keep x constant and differentiate both sides implicitly with respect to y, we obtain
x\frac{\partial z}{\partial y} = \frac{1}{y+z}\left(1 + \frac{\partial z}{\partial y}\right)
\Rightarrow \frac{\partial z}{\partial y} = \frac{1}{x(y+z)-1}, after simplifying.
 
We can find higher order derivatives of functions of more than one variable with ease, using the same way we do in ordinary differentiation.
Worked example 3: Find \frac{\partial^2 z}{\partial w^2}, \frac{\partial^2 z}{\partial x^2} and \frac{\partial^2 z}{\partial y^2} if z = w - y\:\text{cos}\:(wx).
To find \frac{\partial^2 z}{\partial w^2}, we differentiate \frac{\partial z}{\partial w} (see example 1) while keeping x, y constant: \frac{\partial^2 z}{\partial w^2} = x^2y\:\text{cos}\:(wx).
To find \frac{\partial^2 z}{\partial x^2}, we differentiate \frac{\partial z}{\partial x} (see example 1) while keeping w, y constant: \frac{\partial^2 z}{\partial x^2} = w^2y\:\text{cos}\:(wx).
To find \frac{\partial^2 z}{\partial y^2}, we differentiate \frac{\partial z}{\partial y} (see example 1) while keeping w, x constant: \frac{\partial^2 z}{\partial y^2} = 0.
 
We may have mixed second order derivatives if we differentiate \frac{\partial z}{\partial w} with respect to x (keeping w, y constant) or to y (keeping w, x constant). Similarly we may differentiate:
\frac{\partial z}{\partial x} with respect to w or to y and \frac{\partial z}{\partial y} with respect to w or to x.
Worked example 4: Find \frac{\partial^2 z}{\partial x \partial w} and \frac{\partial^2 z}{\partial y \partial w} if z = w - y\:\text{cos}\:(wx).
\frac{\partial^2 z}{\partial x \partial w} = \frac{\partial}{\partial x}[1 + xy\:\text{sin}\:(wx)]
            
             = wxy\:\text{cos}\:(wx) + y\:\text{sin}(wx).
\frac{\partial^2 z}{\partial y \partial w} = \frac{\partial}{\partial y}[1 + xy\:\text{sin}(wx)]
            
            = x\:\text{sin}(wx).
 
It is interesting to observe that the order of differentiation does not matter when we find mixed derivatives. For instance, we can verify easily that\frac{\partial^2 z}{\partial y \partial w} = \frac{\partial^2 z}{\partial w \partial y} with the above example (try it!).

Section 2

Let z = \text{f}(x, y). Corresponding to small changes in x and y (i.e. \Delta x and \Delta y), the change in z (i.e. \Delta z) is defined by:
\Delta z = \text{f}(x + \Delta x, y + \Delta y) - \text{f}(x, y) ----- (1).

The total differential \text{d}z is defined by:
 \text{d}z = \frac{\partial \text{f}}{\partial x}\Delta x + \frac{\partial \text{f}}{\partial y}\Delta y.
Let \Delta x = \text{d}x and \Delta y = \text{d}y, we arrive at \text{d}z = \frac{\partial \text{f}}{\partial x}\text{d}x + \frac{\partial \text{f}}{\partial y}\text{d}y ----- (2).

Worked example 5: Let \text{f}(x, y) = x^3 - y^3. Find \text{d}z. If x changes from 2 to 2.01 and y changes from 1 to 0.96, compare the values of \Delta z and \text{d}z.
By result (2), \text{d}z = 3x^2\text{d}x - 3y^2\text{d}y.
Given: x = 2, y = 1, \text{d}x = 0.01, \text{d}y = -0.04.
So \text{d}z = 12(0.01) - 3(-0.04) = 0.24.

By result (1), \Delta z = \text{f}(2.01, 0.96) - \text{f}(2, 1) = 0.235865.
Thus we observe that \text{d}z makes a rather good approximation to \Delta z.

We now look at the chain rule. There are two main results:
(a) Let z = \text{f}(x, y) where x = \text{g}(t) and y = \text{h}(t) and assuming that all functions f, g and h are differentiable, then \frac{\text{d}z}{\text{d}t} = \frac{\partial f}{\partial x}\frac{\text{d}x}{\text{d}t} + \frac{\partial f}{\partial y}\frac{\text{d}y}{\text{d}t}.

(b) Let z = \text{f}(x, y) where x = \text{g}(s, t) and y = \text{h}(s, t) and assuming that all functions f, g and h are differentiable, then:
\frac{\partial z}{\partial s} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial s} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial s} and \frac{\partial z}{\partial t} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial t}.

Worked example 6: Given that z = x(y - 1) where x = \text{tan}\:t and y = \text{cot}\:t, find \frac{\text{d}z}{\text{d}t}.
By result (a), \frac{\text{d}z}{\text{d}t} = (y - 1)\text{sec}^2\:t + x(-\text{cosec}^2\:t)
                         = (y - 1)\text{sec}^2\:t - x\text{cosec}^2\:t.

Worked example 7: Given that z = \text{tan}^{-1}(2x + y) where x = s^2t and y = s\:\text{ln}t, find \frac{\partial z}{\partial s} and \frac{\partial z}{\partial t}.
By result (b), \frac{\partial z}{\partial s} = \frac{2}{1 + (2x + y)^2} \times 2st + \frac{1}{1 + (2x + y)^2} \times \text{ln}t

                         = \frac{4st + \text{ln}t}{1 + (2x + y)^2}.
We leave it as an exercise for you to find \frac{\partial z}{\partial t}. Essentially, you need to differentiate z with respect to x, z with respect to y, x with respect to t and y with respect to t.

Section 3

We begin by looking at two examples (stationary values and tangent planes) from another page I have written previously.