### Slopes in one dimension

A function $y(x)$ in one dimension (i.e. one that has only one independent variable, in this case $x$) is usually plotted with the independent variable $x$ along the abscissa and the value $y(x)$ along the ordinate. In this representation, the differential $\frac{{\rm d}y}{{\rm d}x}$ is the function which represents the slope of the tangent to $y(x)$ as $x$ varies.

Note that it isn't the tangent itself but the value of its slope as a function of $x$.

### Slopes in two dimensions

Image produced from the Ordnance Survey Get-a-map service. Image reproduced with kind permission of Ordnance Survey and Ordnance Survey of Northern Ireland.

A two-dimensional function $z(x,y)$ can be plotted by representing the function values by colour shadings or as contour lines, with the two independent variables $x$ and $y$ on the two axes. An ordnance survey map is a plot of the height above sea level as a function of the independent variables easting and northing of the National Grid.

To reach a mountain summit, you can either walk up the ridges (red lines) or climb the cliffs at the back of the valleys (blue lines).

From the summit of Snowdon, neither the slope $\frac{\partial z}{\partial x}$ (east-west) nor the slope $\frac{\partial z}{\partial y}$ (north-south) follows the steepest gradient downhill. The steepest gradient from the summit is more towards north-northeast into Cwm Glaslyn.

The gradient is the steepest slope at any given point, not just at the summit. Since we need to know how steep it is as well as which direction it faces, it is a vector property.

### The del operator

We define a vector operator $\vec{\nabla}:=\vec{e_x}\frac{\partial}{\partial x}+\vec{e_y}\frac{\partial}{\partial y}$. This is the del operator (or Nabla operator) in two dimensions. Just add more corresponding terms for more dimensions if needed.

The del operator can be applied to

• a scalar function:

 $\vec{\nabla}z(x,y)$ $=$ $\vec{e_x}\frac{\partial z}{\partial x}+\vec{e_y}\frac{\partial z}{\partial y}$ This generates separate values for the two differentials at each point in $x,y$ space: $=$ $\vec{e_x}u_x+\vec{e_y}u_y$, which can be written as a vector: $=$ $\vec{u}(x,y)$.

This vector function has an $x$ and a $y$ component at each point in $(x,y)$ space.
The resulting vector function is called the gradient of the original scalar function. Thus the electric field is the gradient of the electric potential.

• a vector function:

 $\vec{\nabla}\vec{u}(x,y)$ $=$ $\vec{e_x}\frac{\partial\vec{u}}{\partial x}+\vec{e_y}\frac{\partial\vec{u}}{\partial y}$ The differentials apply separately to each component: $=$ $\vec{e_x}\frac{\partial}{\partial x}(\vec{e_x}u_x+\vec{e_y}u_y)+\vec{e_y}\frac{\partial}{\partial y}(\vec{e_x}u_x+\vec{e_y}u_y)$. The unit vectors are orthogonal: $=$ $\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}$, resulting in a scalar function: $=$ $f(x,y)$.

This scalar function $f(x,y)$ is known as the divergence of the original vector function.

Hence, the del operator turns scalar functions into vector functions and vector functions into scalar functions. If it is applied twice to a scalar function, the end result is another scalar function: $$\nabla^2z(x,y)=\vec{\nabla}(\vec{\nabla}z(x,y))=f(x,y)$$ This is the 2nd derivative of $z(x,y)$ along the steepest slope.

### Divergence and curl

The divergence, $\vec{\nabla}\cdot\vec{u}(x,y)$, is the operator equivalent of a scalar product of two vectors. The vector product analogue, $\vec{\nabla}\times\vec{u}(x,y)$, exists also. It is called curl as it is needed to calculate curvatures of functions.

### The del operator in polar coordinates

In Cartesian coordinates, the del operator takes the same form when applied to scalar and vector functions. This is not the case in polar (spherical or cylindrical) coordinates.

After this reminder of how the del operator works, we can solve Laplace's equation and the other 2nd order PDEs we were concerned with.