2.4: Partial Derivatives
So far, we have focused on functions which take a single input. Functions can also take multiple inputs; for instance, a function \(f(x,y)\) maps two input numbers, \(x\) and \(y\) , and outputs a number. In general, the inputs are allowed to vary independently of one another. The partial derivative of such a function is its derivative with respect to one of its inputs, keeping the others fixed. For example,
\[f(x,y) = \sin(2x - 3 y^2)\]
has partial derivatives
\[\begin{align} \frac{\partial f}{\partial x} &= 2\cos(2x-3y^2), \\[4pt] \frac{\partial f}{\partial y} &= - 6\cos(2x-3y^2).\end{align}\]
Change of variables
We saw in Section 2.1 that single-variable functions obey a derivative composition rule,
\[\frac{d}{dx}\, f\big(g(x)\big) = g'(x) \, f'\big(g(x)\big).\] This composition rule has a important generalization for partial derivatives, which is related to the physical concept of a change of coordinates . Suppose a function \(f(x,y)\) takes two inputs \(x\) and \(y\) , and we wish to express them using a different coordinate system denoted by \(u\) and \(v\) . In general, each coordinate in the old system depends on both coordinates in the new system:
\[x = x(u,v), \quad y = y(u,v).\]
Expressed in the new coordinates, the function is
\[F(u,v) \equiv f\big(x(u,v), y(u,v)\big).\] It can be shown that the transformed function’s partial derivatives obey the composition rule
\[\begin{align} \frac{\partial F}{\partial u} &= \frac{\partial f}{\partial x} \frac{\partial x}{\partial u} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial u}\\[4pt] \frac{\partial F}{\partial v} &= \frac{\partial f}{\partial x} \frac{\partial x}{\partial v} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial v}.\end{align}\]
On the right-hand side of these equations, the partial derivatives are to be expressed in terms of the new coordinates \((u,v)\) . For example,
\[\frac{\partial f}{\partial x} = \left.\frac{\partial f}{\partial x}\right|_{x = x(u,v), \;y= y(u,v)}\]
The generalization of this rule to more than two inputs is straightforward. For a function \(f(x_1, \dots, x_N)\) , a change of coordinates \(x_i = x_i(u_1, \dots, u_N)\) involves the composition
\[F(u_1, \dots, u_N) = f\big(x_1(u_1,\dots,u_N\big), \dots), \quad \frac{\partial F}{\partial u_i} = \sum_{j=1}^N \frac{\partial x_j}{\partial u_i} \frac{\partial f}{\partial x_j}.\]
Example \(\PageIndex{1}\)
In two dimensions, Cartesian and polar coordinates are related by
\[x = r\cos\theta, \quad y = r\sin\theta.\] Given a function \(f(x,y)\) , we can re-write it in polar coordinates as \(F(r,\theta)\) . The partial derivatives are related by
\[\begin{align} \frac{\partial F}{\partial r} &= \frac{\partial f}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial r} = \frac{\partial f}{\partial x} \cos\theta + \frac{\partial f}{\partial y} \sin\theta. \\[4pt] \frac{\partial F}{\partial \theta} &= \frac{\partial f}{\partial x} \frac{\partial x}{\partial \theta} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial \theta} = -\frac{\partial f}{\partial x} r\,\sin\theta + \frac{\partial f}{\partial y} r\cos\theta. \end{align}\]
Partial differential equations
A partial differential equation is a differential equation involving multiple partial derivatives (as opposed to an ordinary differential equation, which involves derivatives with respect to a single variable). An example of a partial differential equation encountered in physics is Laplace’s equation,
\[\frac{\partial^2 \Phi}{\partial x^2} + \frac{\partial^2 \Phi}{\partial y^2} + \frac{\partial^2 \Phi}{\partial z^2}= 0,\] which describes the electrostatic potential \(\Phi(x,y,z)\) at position \((x,y,z)\) , in the absence of any electric charges.
Partial differential equations are considerably harder to solve than ordinary differential equations. In particular, their boundary conditions are more complicated to specify: whereas each boundary condition for an ordinary differential equation consists of a single number (e.g., the value of \(f(x)\) at some point \(x = x_0\) ), each boundary condition for a partial differential equation consists of a function (e.g., the values of \(\Phi(x,y,z)\) along some curve \(g(x,y,z) = 0\) ).