Part 1 - partial derivatives

As I mentioned in the introduction, I assume that the reader knows what a derivative of a function is. It is a good foundation, but to get our hands wet in relativity, we need to expand that concept a bit. Let's then get to know the partial derivative. What is it?

Let's remember the ordinary derivatives first. We denote a derivative of a function f(x) as f'(x) or \frac{df}{dx}. It means, basically, how fast the value of the function changes while we change the argument x. For example, when f(x) = x^2, then \frac{df}{dx} = 2x.

But what if the function depends on more than one variable? Like if we have a function f(x,y) = x^2 + y^2 that assigns to each point of the plane the square of its distance from the origin. How do we even define the derivative of such a function?

This problem is what partial derivatives solve. A partial derivative can be calculated with respect to any of the variables, so in this case we have two possibilities: \frac{\partial f}{\partial x} and \frac{\partial f}{\partial y} (for the sake of simplicity those are sometimes denoted as f_{,x} and f_{,y} or \partial_x f and \partial_y f). To calculate a partial derivative one assumes that only the variable with respect to which we differentiate is a variable, the rest is treated as constants.

To present what this means we will use a linear function f(x) = ax, where a is some constant. The derivative of this function is f'(x) = a. If a was a variable from the beginning - this would be precisely the partial derivative with respect to x! Taking a function f(a,x) = ax and treating a as a constant, we get exactly the described situation. Thus, \frac{\partial f(a,x)}{\partial x} = a. If we changed the symbols a bit and wrote y instead of a, we would get:
f(x, y) = xy
\frac{\partial f}{\partial x} = y

On the other hand, we can treat x as a constant, and y as a variable and calculate \frac{\partial f}{\partial y} - it is exactly analogous and in this case we get x.

Let's go back to our initial function, the square of the distance. To calculate \partial_x f we assume y to be constant - which means that the whole y^2 part is constant and will vanish upon differentiation. So we only have to calculate the derivative of x^2, which gives us \partial_x f = 2x. Voila.

What about the derivative with respect to y? It's the same, but now it is x^2 that is constant and we get \partial_y f = 2y.

As is the case with ordinary derivatives, also with partial derivatives it is possible to have higher-order derivatives (second derivative, third derivative etc.). They are calculated exactly the same way as the ordinary ones - by differentiating the function, then again differentiating the result etc. The only difference is that in the case of partial derivatives there are more possible higher-order derivatives. The reason is simple - each time we can choose one of the many variables.

Let's say then that we have a function of n variables: f(x_1, x_2, ..., x_n). We have n possible first derivatives: \frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, ... , \frac{\partial f}{\partial x_n}.

The number of second derivatives is then n^2: \frac{\partial^2 f}{\partial x_1^2}, \frac{\partial^2 f}{\partial x_1 \partial x_2}, ..., \frac{\partial^2 f}{\partial x_1 \partial x_n}, \frac{\partial^2 f}{\partial x_2 \partial x_1}, \frac{\partial^2 f}{\partial x_2^2}, ..., \frac{\partial^2 f}{\partial x_n^2}.

The number of third derivatives would be n^3, etc.

It is not the whole truth, though. Not all the derivatives differ. Actually, differentiating with respect to different variables is commutative, that is, it doesn't matter if we first differentiate with respect to x_i and then x_j, or the opposite: \frac{\partial^2 f}{\partial x_i \partial x_j} = \frac{\partial^2 f}{\partial x_j \partial x_i}.

One more thing worth mentioning is that often expressions like \frac{\partial}{\partial x} or \partial_x are treated as separate objects - differential operators. A differential operator is then just something that applied to a function will differentiate it. Differential operators can also be "multiplied", yielding higher-order operators: \frac{\partial}{\partial x} \frac{\partial}{\partial y} = \frac{\partial^2}{\partial x \partial y} (now you can see why the higher-order derivatives are written as they are - why only the derivative symbol has a "power" in the "numerator", and the whole expression like \partial x in the "denominator"). Some other objects can also be created, but I will explain that in the next part.

I recommend calculating some partial derivatives for yourself in order to acquire some familiarity with them. Example functions:

  • f(x, y) = x \sin y
  • g(u,v) = u\left(1 - \frac{2}{v}\right)

The task - calculate all their first and second derivatives. I will check the solutions for the readers who would like that ;)