# Math Foundations

Since graduate students in our department come from a wide range of backgrounds (chemistry, physics, meteorology, computer science, etc.) we all also have wide variability in how much math we have learned (or remember!) Beyond your basic integrals and derivatives, the math for most of what we do depends on basic vector calculus, and some (relatively) simple partial differential equations. For those of you who have not seen this stuff in a long time (or ever) the below topics should help to jog your memory and/or point out what you need to brush up on before classes start. While the below material is by no means comprehensive, it should point you in the right direction of what you need to refresh, as it is what we use most often in our first year classes. Links to Khan Academy videos have been given when possible if you need to learn more about any given topic.

## Contents

## Vector Calculus

### Scalars / Vectors

In equations, we deal with both scalar fields (a single number over a 2 or 3 dimensional area, such as temperature measurement) and vector fields, such as wind measurements. Scalars and vectors will often (though not always) be identified when written in equations by writing vectors either in bold, or with an arrow over it (**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold V**
or **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \vec V **
)
The components of vectors will often be seen in two different ways, though the second way will be used for the rest of this primer:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold V = (u,v,w) \\ \bold V = v_x \hat{\bold{i}} + v_y \hat{\bold{j}} + v_z\hat{\bold{k}} **

Where **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold{\hat{i}}, \bold{\hat{j}}, \bold{\hat{k}}**
are unit vectors pointing east, north, and up, respectively. Or, **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): u, v, w**
are the velocities going east, north, and up, respectively.

### Partial Differentials

### Gradients

https://www.khanacademy.org/math/calculus/partial_derivatives_topic/gradient/v/gradient-1

The gradient of a scalar field is a vector field that points in the direction of the greatest rate of increase of the scalar field, and whose magnitude is the rate of increase. The gradient of a scalar field (let’s say that of temperature) is denoted by the following symbology

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla T**

Whenever you see the del operator (**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla**
) you can think of it as being equivalent to:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla = \bold{\hat{i}} \frac{\partial}{\partial x}+\bold{\hat{j}} \frac{\partial}{\partial y}+\bold{\hat{k}} \frac{\partial}{\partial z}**

so

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla T = \bold{\hat{i}} \frac{\partial T}{\partial x}+\bold{\hat{j}} \frac{\partial T}{\partial y}+\bold{\hat{k}} \frac{\partial T}{\partial z}**

### Dot Product

The dot product takes two vectors and produces a scalar value. Essentially, you can think of the dot product as telling you how parallel two vectors are. If the two vectors are perpendicular, the resulting dot product will be 0. If the two vectors point in the same direction, the resulting dot product will be the product of the magnitude of the two vectors. The dot product is denoted by the dot symbol and is found either by adding the products of each term in the two vectors:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold A \cdot \bold B = a_x b_x + a_y b_y + a_z b_z**

Or, equivalently, by multiplying the magnitudes of the two vectors by the cosine of the angle between them:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold A \cdot \bold B = |\bold A| |\bold B| \cos \theta**

For example, quite often in atmospheric science we will see things like the following, known as an advection term; i.e. the closer that the wind vector (**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold V **
) is parallel to the temperature gradient (**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla T**
), then the stronger the rate of temperature change is where you are due to the wind blowing air of different temperature around.

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): -\bold V \cdot \nabla T**

### Cross Product

Somewhat similar to the dot product, though this time the cross product of two vectors produces another vector which is orthogonal to the two. It is proportional to how perpendicular the two vectors are (the opposite of the dot product). If the two vectors are at a 90 degree angle (say, **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold A**
is pointing to the east, and **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold B**
is pointing north), the result will be a vector pointing up. If vectors **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold A**
and **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold B**
are parallel, the result of the cross product is the zero vector. The cross product is given by:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold A \times \bold B = |\bold A| |\bold B| \sin\theta**

or by the determinant of a matrix

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold A \times \bold B = \begin{vmatrix} \bold{\hat{i}} & \bold{\hat{j}} & \bold{\hat{k}} \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{vmatrix}**

#### Right Hand Rule

An easy way to remember which way the resulting vector of the cross product points is given by the right hand rule (and yes, I’ve seen quite a few people quietly doing this in the middle of class lectures)

### Divergence

https://www.khanacademy.org/math/calculus/partial_derivatives_topic/divergence

The divergence operator, given by **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla \cdot \bold V**
, produces a scalar field from a vector field, and indicates if at a given point the vector field is source or sink. If the value is positive you have divergence, negative you have convergence.

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla \cdot \bold V = \frac{\partial v_x}{\partial x} + \frac{\partial v_y}{\partial y} + \frac{\partial v_z}{\partial z}**

### Curl

https://www.khanacademy.org/math/calculus/partial_derivatives_topic/curl

The curl operator, **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla \times \bold V**
, produces a vector that indicates how much a vector field is spinning. Using the above mentioned notation for cross product and gradient operators:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla \times \bold V = \begin{vmatrix} \bold{\hat{i}} & \bold{\hat{j}} & \bold{\hat{k}} \\ \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\ v_x & v_y & v_z \end{vmatrix}**

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla \times \bold V = \left ( \frac{\partial v_z}{\partial y}-\frac{\partial v_y}{\partial z}\right )\bold{\hat{i}} - \left ( \frac{\partial v_z}{\partial x}-\frac{\partial v_x}{\partial z}\right )\bold{\hat{j}} + \left ( \frac{\partial v_y}{\partial x}-\frac{\partial v_x}{\partial y}\right )\bold{\hat{k}} **

Normally, instead of dealing with that whole mess, for most things we talk about in the atmosphere we are only concerned with how much something is spinning on the horizontal plane (think of a hurricane), and so we only care about magnitude of the component of the curl pointing up, as given by:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \bold{\hat{k}}\cdot\left ( \nabla \times \bold V \right ) = \frac{\partial v_y}{\partial x} - \frac{\partial v_x}{\partial y}**

### Laplace Operator

http://en.wikipedia.org/wiki/Laplacian

The Laplace operator, denoted by one of the following symbols (though the last one is more common)

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \Delta, \nabla \cdot \nabla, \nabla^2**

can be viewed conceptually as such: It is a scalar value that, for a given point, indicates the rate at which the average value inside a tiny sphere centered at that point changes as the sphere gets larger. It is found as follows:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \nabla^2 T = \frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} + \frac{\partial^2 T}{\partial z^2}**

For example, physicists or chemists might be familiar with this as it is used in describing diffusion; if for a given point the Lapalcian of a scalar field (say that of temperature) is a positive value, that means its neighbors are on average warmer than it, so it will be getting warmer.

## Ordinary Differential Equations (ODE)

https://www.khanacademy.org/math/differential-equations/first-order-differential-equations

https://www.khanacademy.org/math/differential-equations/second-order-differential-equations

Although second semester in *Dynamics of the Ocean and Atmosphere II* you will delve more deeply into partial and ordinary differential equations, for your first semester in dynamics pretty much the only differential equations you need to know about are 1) exponential growth / decay differential equations and 2) differential equations for harmonic motion

### Harmonic Motion

**ODE**: **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \frac{\partial^2}{\partial t^2}x+a^2 x=0 \\**

**Solution**: **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): x= c_1 \cos at + c_2\sin at \\**

**Period**: **Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \frac{2\pi}{a}**

### Misc

A bit of weird notation that you might not have seen elsewhere is:

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \partial \ln P \equiv \frac{\partial P}{P}**

which is just done for purposes of more compact notation

**Failed to parse (Missing <code>texvc</code> executable. Please see math/README to configure.): \int{\frac{1}{P}\frac{\partial P}{\partial z} dz}= \int{\frac{\partial \ln P}{\partial z}dz}=\ln\left ( P_{z_1}-P_{z_0} \right )**