# General Mechanics/Partial Derivatives

We will now take a break from physics, and discuss the topics of partial derivatives. Further information about this topic can be found at the Partial Differential Section in the Calculus book.

## Partial Derivatives

In one dimension, the slope of a function, f(x), is described by a single number, df/dx.

In higher dimensions, the slope depends on the direction. For example, if f=x+2y, moving one unit x-ward increases f by 1 so the slope in the x direction is 1, but moving one unit y-ward increases f by 2 so the slope in the y direction is 2.

It turns out that we can describe the slope in n dimensions with just n numbers, the partial derivatives of f.

To calculate them, we differentiate with respect to one coordinate, while holding all the others constant. They are written using a ∂ rather than d. E.g.

${\displaystyle f(x+dx,y,z)=f(x,y,z)+{\frac {\partial f}{\partial x}}dx\quad (1)}$

Notice this is almost the same as the definition of the ordinary derivative.

If we move a small distance in each direction, we can combine three equations like 1 to get

${\displaystyle df={\frac {\partial f}{\partial x}}dx+{\frac {\partial f}{\partial y}}dy+{\frac {\partial f}{\partial z}}dz}$

The change in f after a small displacement is the dot product of the displacement and a special vector

${\displaystyle \left({\frac {\partial f}{\partial x}},{\frac {\partial f}{\partial y}},{\frac {\partial f}{\partial z}}\right)\cdot \left(dx,dy,dz\right)=\operatorname {grad} f=\nabla f}$

This vector is called the gradient of f. It points up the direction of steepest slope. We will be using this vector quite frequently.

### Partial Derivatives #2

Another way to approach differentiation of multiple-variable functions can be found in Feynman Lectures on Physics vol. 2. It's like this:

The differentiation operator is defined like this: ${\displaystyle df=f(x+\Delta x,y+\Delta y,z+\Delta z)-f(x,y,z)\,\!}$ in the limit of ${\displaystyle \Delta x,\Delta y,\Delta z\to 0}$. Adding & subtracting some terms, we get

${\displaystyle df=(f(x+\Delta x,y+\Delta y,z+\Delta z)-f(x,y+\Delta y,z+\Delta z))+(f(x,y+\Delta y,z+\Delta z)-f(x,y,z+\Delta z))+(f(x,y,z+\Delta z)-f(x,y,z))\,\!}$

and this can also be written as

${\displaystyle df={\frac {\partial f}{\partial x}}dx+{\frac {\partial f}{\partial y}}dy+{\frac {\partial f}{\partial z}}dz}$

### Alternate Notations

For simplicity, we will often use various standard abbreviations, so we can write most of the formulae on one line. This can make it easier to see the important details.

We can abbreviate partial differentials with a subscript, e.g.,

${\displaystyle D_{x}h(x,y)={\frac {\partial h}{\partial x}}\quad D_{x}D_{y}h=D_{y}D_{x}h}$

or

${\displaystyle \partial _{x}h={\frac {\partial h}{\partial x}}}$

Mostly, to make the formulae even more compact, we will put the subscript on the function itself.

${\displaystyle D_{x}h=h_{x}\quad h_{xy}=h_{yx}}$