# Multivariate differentiation of scalar fields

## Partial differentiation of scalar fields

### Scalar fields

A scalar field is a function on an underlying input which produces a real output.

Inputs are not limited to real numbers. In this section we consider functions on vector spaces.

### Del

\(\nabla =(\sum_{i=1}^n e_i\dfrac{\delta }{\delta x_i})\)

Where \(e\) are the basis vectors.

This on its own means nothing. It is similar to the partial differentiation function.

### Gradient

In a scalar field we can calculate the partial derivative at any point with respect to one input.

We may wish to consider these collectively. To do that we use the gradient operator.

We previously introduced the Del operator where:

\(\nabla =(\sum_{i=1}^n e_i\dfrac{\delta }{\delta x_i})\)

Where \(e\) are the basis vectors.

This on its own means nothing. It is similar to the partial differentiation function.

We now multiply Del by the function. This gives us:

\(\nabla f=(\sum_{i=1}^n e_i\dfrac{\delta f}{\delta x_i})\). This gives us a vector in the underlying vector space.

This is the gradient.

## Directional derivative of scalar fields

### Directional derivative

We have a function, \(f(\mathbf x)\).

Given a vector \(v\), we can identify by how much this scalar function changes as you move in that direction.

\(\nabla_v f(x):=\lim_{\delta \rightarrow 0}\dfrac{f(\mathbf x+\delta \mathbf v)-f(\mathbf x) }{\delta }\)

The directional derivative is the same dimension as underlying field.

#### Other

Differentiation of scalar field, \(d f\), can be defined as a vector field where grad is 0. can differ with orientation, scale

## Total differentiation of scalar fields

### Total differentiation

Consider a multivariate function.

\(f(x)\).

We can define:

\(\Delta f(x, \Delta x):=f(x+\Delta x)-f(x)\)

\(\Delta f(x, \Delta x)=\sum_{i=1}^nf(x+\Delta x_i+\sum_{j=0}^{i-1}\Delta x_j)-f(x+\sum_{j=0}^{i-1}\Delta x_j)\)

\(\Delta f(x, \Delta x)=\sum_{i=1}^n\Delta x_i \dfrac{f(x+\Delta x_i+\sum_{j=0}^{i-1}\Delta x_j)-f(x+\sum_{j=0}^{i-1}\Delta x_j)}{\Delta x_i}\)

\(\dfrac{\Delta f}{\Delta x_k}=\sum_{i=1}^n\dfrac{\Delta x_i}{\Delta x_k} \dfrac{f(x+\Delta x_i+\sum_{j=0}^{i-1}\Delta x_j)-f(x+\sum_{j=0}^{i-1}\Delta x_j)}{\Delta x_i}\)

\(\lim_{\Delta x_k \rightarrow 0}\dfrac{\Delta f}{\Delta x_k}=\sum_{i=1}^n\lim_{\Delta x_k \rightarrow 0}\dfrac{\Delta x_i}{\Delta x_k} \dfrac{f(x+\Delta x_i+\sum_{j=0}^{i-1}\Delta x_j)-f(x+\sum_{j=0}^{i-1}\Delta x_j)}{\Delta x_i}\)

\(\dfrac{df}{dx_k}=\sum_{i=1}^n\dfrac{dx_i}{dx_k} \dfrac{\delta f}{\delta x_i}\)

### Total differentiation of a univariate function

For a univariate function total differentiation is the same as partial differentiation.

\(\dfrac{df}{dx}=\dfrac{dx}{dx} \dfrac{\delta f}{\delta x}\)

\(\dfrac{df}{dx}=\dfrac{\delta f}{\delta x}\)