and it is now a matter of (tedious) calculus to arrive at the right result.
This is the task of exercises 3 and 4, which finally compute the Laplacian
in polar coordinates.
!!! warning Inverse function theorem
In this calculation one might be tempted to use the inverse
function theorem to compute derivatives like
$\frac{\partial \varphi}{\partial x}$ from the much simpler
$\frac{\partial x}{\partial \varphi}$. Note though that here we
are dealing with functions depending on several variables, so the
*Jacobian* has to be used (see [Wikipedia](https://en.wikipedia.org/wiki/Inverse_function_theorem)). A direct calculation is in this particular case more easy.
Note that this procedure also carries over to other coordinate systems,
although the calculations can become quite tedious. In these cases,
it's usually best to look up the correct form.
# Cylindrical coordinates
Three dimensional systems may have axial symmetry. An example is an
electrically charged wire of which we would like to calculate the
electric field, or a current-carrying wire for which we would like to
calculate the magnetic field. For such problems the most convenient
coordinates are *cylindrical coordinates*. For convenience, we choose
the symmetry-axis as the $z$-axis. Note that this can be done as we can
choose the coordinate system ourselves - this is not imposed by the
problem.
Cylindrical coordinates are defined straightforwardly: we use polar
coordinates $r$ and $\varphi$ in the $xy$ plane, and the distance $z$
along the symmetry-axis as the third coordinate. If the axis system is
chosen in physical space, we have two coordinates which have the
dimension of a distance: $r$ and $z$. The other coordinate,
$\varphi$, is of course dimensionless.
What is the distance travelled along a path when we express this in
cylindrical coordinates? Let’s consider an example (Figure).

We want to find the length of the (small) red segment $d s$. By
inspecting the figure, we see that the horizontal (i.e. parallel to the
$xy$-plane) segment $d l$ is perpendicular to the vertical segment
$dz$. Using for $d l$ the length we obtained before for a line
segment in the $xy$ plane, expressed in polar coordinates, we
immediately find:
$$d s^2 = d l^2 + d z^2 = d r^2 + r^2 d \varphi^2 + d z^2.$$
The volume element is consequently given as
$$dV = r dr d\varphi dz.$$
# Spherical coordinates
For problems with spherical symmetry, we use *spherical coordinates*.
These work as follows. For a point $\bf r$ in 3D space, we can specify
the position of that point by specifying its (1) distance to the origin
and (2) the direction of the line connecting the origin to our point.
The specification of this direction can be identified with a point on a
sphere which is centered at the origin:

The position of a point on the sphere is specified using the two angles
$\theta$ and $\phi$ indicated in the figure.
!!! warning
Note that in mathematics, often the angles are labelled the other way
round: there, $\phi$ is used for the angle between a line running from
the origin o the point of interest and the $z$-axis, and $\theta$ for
the angle of the projection of that line with the $x$-axis. The
convention used here is custom in physics.
The relation between Cartesian and coordinates is defined by
$$x = r \cos \varphi \sin \vartheta$$
$$y = r \sin\varphi \sin \vartheta$$ $$z = r \cos\vartheta$$ The inverse
transformation is easy to find: $$r = \sqrt{x^2+y^2+z^2}$$
$$\theta = \arccos(z/\sqrt{x^2+y^2+z^2})$$
$$\phi = \begin{cases} \arctan(y/x) &{\rm for ~} x>0; \\
\pi + \arctan(y/x) & {\rm for ~} x<0{\rm~and~}y>0;\\
-\pi + \arctan(y/x) &{\rm ~ for ~} x<0 {\rm ~ and ~} y<0.
\end{cases}$$ These relations can be derived from the following figure:

The distance related to a change in the spherical coordinates is
calculated using Pythagoras’ theorem. The length $ds$ of a short segment
on the sphere with radius $r$ corresponding to changes in the polar