### Minimising functions

We can find local **stationary points** of a function, $f(x)$, of an independent variable, $x$, by calculatiing the derivative of the function and then setting it to zero. That is, $$\frac{\mathrm{d}f}{\mathrm{d}x} = 0$$

In order to find out whether we have a maximum point, a minimum point, or a point of inflection, we have to find the second derivative and note that $$\frac{\mathrm{d}^2f }{\mathrm{d} x^2} \begin{cases}> 0 \Rightarrow & \text{minimum}\\ < 0 \Rightarrow & \text{maximum}\\ = 0 \Rightarrow & \text{inflection}\end{cases}$$

For functions of several variables, $F = F(x_1, \dots, x_N)$, we calculate the partial derivatives and set them all to zero, $$\frac{\partial F}{\partial x_i} = 0 \quad \forall i \in \{1, \dots, N\}$$

**Example.** Figure 2.2 shows the contours of the function $$F(x, y) = x^2 + xy + y^2 - 3x - 2y$$ The derivatives are $$\begin{matrix}\frac{\partial F}{\partial x} = 2x + y - 3\\ \frac{\partial F}{\partial y} = 2y + x - 2\end{matrix}$$ and setting both to zero leads to the two equations (dashed lines in the figure) $$\left. \begin{matrix}y = -2x + 3\\ y = -\tfrac{1}{2}x + 1\end{matrix} \right\} \Rightarrow P_x = \tfrac{4}{3}, P_y = \tfrac{1}{3}$$ hence $P = (P_x, P_y)$ is the only stationary point of $F$.

Nb. We would need to look at the second-order derivatives to discover which type of stationary point $P$ is.

### Minimising functionals

Newton's formulation is a local law.

Given a position and velocity of a particle, the differential equations describe where the particle will be in the next instant in time, and indirectly, what the new velocity will be.

We can also consider motion on a global scale - calculating quantities that depend on whole trajectories, rather than specific locations on the trajectory.

In this case, we are given a initial position, and a final position after a specified length of time and we want to find the unique trajectory that minimises a certain quantities.

Nb. Specifying the position at two different times is equivalent to specifying the position and the momentum at a single time. The information content is the same.

That implies that we will need to to be able to minimise **functionals** (functions of functions), and in particular, integrals of functions over time.

To do this, we use the **Calculus of variations**, which is a very general method of minimising functionals. We will apply it in conjunction with the **Principle of least action** (action to be defined later), but it also applies to other integrated quantities. For example, it can be used to prove that the shortest distance between two points is a straight line, that the path that light takes between two points is the one that minimises the time taken (the **Principle of least time**).