Part IV · Calculus Chapter 32 of 60
Functions of several variables
The height on a mountainside depends on two coordinates at once. Let’s take a map, a magnifier and a compass and find out which way such a function grows fastest, where its peaks and passes are, and why the area under the Gaussian bell is the square root of π.
Builds on: 31 · Differential equations
You will learn
- read a function of two variables from a map of level curves, and find partial derivatives, the gradient and the tangent plane
- understand why the gradient points in the direction of steepest ascent and is perpendicular to level curves
- find and tell apart peaks, hollows and saddles, and solve constrained extremum problems by Lagrange’s method
- compute double integrals, including in polar coordinates, and derive the Gaussian integral
The last chapter left us on a mountainside with a simple question: which way should you go to climb as fast as possible? All our tools, the derivative, the integral, differential equations, are designed for functions of one number. But the height on a slope depends on two: how far you’ve walked east and how far north. A step east may lead up, a step north down, and about a step north-east you can’t say anything until you’ve done the sums.
There are more such functions around us than functions of one variable. The temperature in a room depends on three coordinates and on time. The price of a plane ticket depends on the departure date, the return date and the number of seats already sold. The error of a neural network depends on millions of parameters at once. We’ll set off on an expedition across terrain with just two coordinates: that’s enough to see everything important, and the formulas then carry over to any number of variables almost unchanged. We’ll take a map, a magnifier and a compass. By the end of the trip they’ll have found us peaks and passes, the highest point of a trail, the way down in fog, and even the area under a curve that has no antiderivative.
A map instead of a mountain
Choose an origin on the terrain, point the $x$-axis east and the $y$-axis north. Each point $(x, y)$ has a height $z = f(x, y)$.
A function of several variables is a rule that assigns to each point $(x_1, \dots, x_n)$ of some region a single number $f(x_1, \dots, x_n)$. The graph of a function of two variables is the surface $z = f(x, y)$: above each point of the plane, at height $f(x, y)$.
It’s hard to draw a surface on paper so that anything can be measured from the drawing. Map-makers found a way out long ago: on a topographic map they draw contour lines, lines along which the height is the same, for example 100, 200 and 300 metres above sea level.
A level curve of a function $f(x, y)$ is the set of points of the plane where $f(x, y) = c$ for a given number $c$. For a function of three variables we get level surfaces instead of curves.
We’ve already met level curves in chapter 11: the profit $300x + 400y$ there was a linear function, and its level curves were parallel lines. On a real mountain they bend. Let’s start with a simple hill, $f(x, y) = 6 - x^2 - 2y^2$: distances in kilometres, height in hundreds of metres. Its level curves $x^2 + 2y^2 = 6 - c$ are nested ellipses, stretched from west to east. Where the contours crowd together, the slope is steep; where they spread apart, it’s gentle. At the same distance from the summit, the slope to the north is twice as steep here as to the east.
The water level is a handy way to see all the level curves one after another. Lowering the water over an archipelago, you’ll notice a pattern: the number of islands doesn’t change just anywhere. A new island appears when a summit comes out of the water, and two islands merge into one when the water drops below the pass between them. Summits and passes are special points of the map, and we’ll come back to them.
Can two level curves of the same function, $f = 1$ and $f = 2$, cross?
At a crossing point the function would equal both $1$ and $2$ at once, but a function has one value at each point. Contours of different heights on a map never touch or cross.
Slices
The simplest way to measure steepness is to walk due east. Then $y$ doesn’t change, and the height becomes a function of $x$ alone. We’ve cut the mountain with the vertical plane $y = b$ and are looking at the profile of the cut, an ordinary graph of a function of one variable. We’ve known how to find its slope since chapter 26.
The partial derivative of a function $f(x, y)$ with respect to $x$ at the point $(a, b)$ is the derivative of the function of one variable $x \mapsto f(x, b)$ at the point $a$. It’s written $\frac{\partial f}{\partial x}(a, b)$ or $f_x(a, b)$. The partial derivative with respect to $y$ is the derivative of the function $y \mapsto f(a, y)$ at the point $b$.
Partial derivatives are easy to compute: treat all the variables but one as numbers and differentiate by the old rules. Their meaning is quite practical. The volume of a tin can, $V(r, h) = \pi r^2 h$, depends on the radius and the height, and $\frac{\partial V}{\partial r} = 2\pi rh$, $\frac{\partial V}{\partial h} = \pi r^2$. For a can with $r = 3$ cm and $h = 10$ cm these are $60\pi \approx 188$ and $9\pi \approx 28$ cubic centimetres per centimetre. Add a millimetre to the radius and the volume grows by about $19$ cm³, while a millimetre on the height gives less than $3$ cm³: the radius is almost seven times more “expensive”.
Find $\frac{\partial f}{\partial y}$ for $f(x, y) = x^3y^2 - 4xy + y$.
Treat $x$ as a number. Then $x^3y^2$ is $x^3$ times $y^2$, and its derivative with respect to $y$ is $2x^3y$; the derivative of $-4xy$ is $-4x$; of $y$, one. Altogether $\frac{\partial f}{\partial y} = 2x^3y - 4x + 1$.
The magnifier
Under the microscope of chapter 26 a smooth graph became a straight line. With a surface it’s the same: the higher the magnification, the more the piece of mountain around a point looks like a plane. This plane passes through the tangents to both slices, and a plane is determined uniquely by two intersecting lines.
The formula for the plane makes sense whenever both partial derivatives exist. But the “fan” shows that the plane may then mean nothing. We need a requirement that speaks about all directions at once.
A function $f(x, y)$ is differentiable at the point $(a, b)$ if there are numbers $A$ and $B$ such that
$$f(a + h, b + k) = f(a, b) + Ah + Bk + \varepsilon(h, k)\sqrt{h^2 + k^2},\qquad \varepsilon(h, k) \to 0 \text{ as } (h, k) \to (0, 0).$$
In other words, the error of the linear approximation is small even compared with the length of the shift. Then the plane $z = f(a, b) + A(x - a) + B(y - b)$ is called the tangent plane.
If a function is differentiable, the numbers $A$ and $B$ have to be the partial derivatives: put $k = 0$, divide by $h$ and let $h$ tend to zero, and you get $A = f_x(a, b)$; likewise $B = f_y(a, b)$. The “fan” isn’t differentiable at zero: along the diagonal the error of the plane $z = 0$ is $\frac12$ and doesn’t get smaller. The cone $\sqrt{x^2 + y^2}$ doesn’t even have partial derivatives at its tip: the slopes to the left and right are $-1$ and $1$. How can you tell a function is differentiable without checking every direction? Continuity of the partial derivatives is enough.
If the partial derivatives $f_x$ and $f_y$ exist in a neighbourhood of the point $A = (a, b)$ and are continuous at the point $A$ itself, then the function $f$ is differentiable at $A$.
The idea: go from point to point not directly but by a staircase, one coordinate at a time. On each step the theorem for functions of one variable works.
Polynomials, exponentials, sines and their combinations have continuous partial derivatives wherever they’re defined, so they have a tangent plane at every point. The “fan” and the cone are exceptions put together on purpose.
The compass
A hiker on a slope doesn’t have to walk only east or north. Suppose they walk in the direction of the unit vector $\mathbf u = (\cos\varphi, \sin\varphi)$; vectors, as in the university chapters that follow, are written in bold. How fast does the height change?
The directional derivative along $\mathbf u$ at the point $P$ is the limit $D_{\mathbf u}f(P) = \lim\limits_{t \to 0}\frac{f(P + t\mathbf u) - f(P)}{t}$. Partial derivatives are special cases of it: $f_x = D_{\mathbf u}f$ for $\mathbf u = (1, 0)$, and $f_y$ for $\mathbf u = (0, 1)$.
We won’t have to compute it from the definition for each direction. Everything is settled by a rule that links the change of a function to motion along any curve.
Let $f$ be differentiable at the point $P$, and let a point move along the curve $\gamma(t) = (x(t), y(t))$, with $\gamma(0) = P$ and the functions $x(t)$, $y(t)$ differentiable at $t = 0$. Then the height $f(\gamma(t))$ changes at the rate
$$\frac{d}{dt}f(\gamma(t))\Big|_{t=0} = f_x(P)\,x'(0) + f_y(P)\,y'(0).$$
Write the shift of the point as $h(t) = x(t) - x(0)$ and $k(t) = y(t) - y(0)$. By the definition of differentiability $f(\gamma(t)) - f(P) = f_xh + f_yk + \varepsilon\sqrt{h^2 + k^2}$, where $\varepsilon \to 0$ as the shift tends to zero. Divide by $t$. The ratios $\frac{h}{t}$ and $\frac{k}{t}$ tend to $x'(0)$ and $y'(0)$ by the definition of the derivative. The absolute value of $\frac{\sqrt{h^2 + k^2}}{t}$ tends to $\sqrt{x'(0)^2 + y'(0)^2}$, that is, it stays bounded, while the shift itself tends to zero, because functions differentiable at a point are continuous there. So the last term divided by $t$ tends to zero, and what’s left is $f_xx'(0) + f_yy'(0)$. If the shift is zero for some $t$, that term is simply zero.
For the line $\gamma(t) = P + t\mathbf u$ the velocity is $\mathbf u = (\cos\varphi, \sin\varphi)$, so $D_{\mathbf u}f = f_x\cos\varphi + f_y\sin\varphi$. On the right is the dot product from chapter 22, of the vector $\mathbf u$ and the vector of the two partial derivatives. That vector deserves a name.
The gradient of a function $f$ at a point is the vector of its partial derivatives: $\nabla f = (f_x, f_y)$. The symbol $\nabla$ is read “nabla” or “del”.
Let $f$ be differentiable at the point $P$ and $\nabla f(P) \ne \mathbf 0$. Then among all unit directions $\mathbf u$ the largest derivative, $D_{\mathbf u}f = |\nabla f|$, is only along the gradient, the smallest, $-|\nabla f|$, only against it, and it’s zero for exactly two directions, perpendicular to the gradient. If a level curve passes through $P$, a curve $\gamma(t)$ with $\gamma(0) = P$ and non-zero velocity $\gamma'(0)$, then $\nabla f(P)$ is perpendicular to its tangent.
The idea: the dot product with a unit vector is a projection, and a projection is no longer than the vector itself.
The gradient is a compass needle that points up the steepest climb. Its length is the steepness of that climb, and the contour line runs perpendicular to it.
The path of steepest ascent always runs along the gradient and so crosses the contours at right angles. On our hill, from the point $(1, 1)$ it doesn’t lead straight to the summit. The condition “the velocity points along $\nabla f = (-2x, -4y)$” gives the equation $\frac{dy}{dx} = \frac{2y}{x}$, and its solution by the methods of the last chapter is the parabola $y = x^2$. Streams flow the same way, only against the gradient. That’s why rivers on maps cross the contours at right angles.
A hiker stands on the slope of the elliptical hill $f = 6 - x^2 - 2y^2$ at the point $(1, 1)$. Where does the gradient point?
The gradient is always perpendicular to the level curve. It points at the summit only when the contours are circles around it.
The quadratic forms from chapter 38 give an instructive example. For $Q(x, y) = ax^2 + 2bxy + cy^2 = \langle \mathbf x, S\mathbf x\rangle$ with the symmetric matrix $S = \left(\begin{smallmatrix} a & b \\ b & c \end{smallmatrix}\right)$ the gradient is $(2ax + 2by, 2bx + 2cy) = 2S\mathbf x$. So the ends of the axes of the ellipse $Q = \text{const}$, the points where the normal $2S\mathbf x$ runs along the radius, lie on the eigenvectors of $S$.
Find the gradient of the function $5x^2 + 4xy + 2y^2$ at the point $(1, 1)$.
$f_x = 10x + 4y$, $f_y = 4x + 4y$; at the point $(1, 1)$ we get $\nabla f = (14, 8)$. Check with the matrix: $S = \left(\begin{smallmatrix} 5 & 2 \\ 2 & 2 \end{smallmatrix}\right)$, $S\mathbf x = (7, 4)$, and $2S\mathbf x = (14, 8)$.
Peaks and passes
At a summit the compass is lost: there’s nowhere higher to go. This can be stated precisely.
If a function $f$ is differentiable at an interior point $P$ of its domain and has a local maximum or minimum there, then $\nabla f(P) = \mathbf 0$.
Let $P = (a, b)$ be a local maximum; for a minimum the argument is the same. Then the function of one variable $x \mapsto f(x, b)$ also has a maximum at the point $a$: its values are some of the values of $f$ near $P$. By Fermat’s theorem (chapter 27) its derivative at $a$ is zero, and that’s exactly $f_x(a, b)$. Likewise $f_y(a, b) = 0$.
Points where $\nabla f = \mathbf 0$ are called stationary points: the tangent plane there is horizontal.
The converse is false, and mountains know this well. Take $f(x, y) = x^3 - 3x - y^2$. The equations $f_x = 3x^2 - 3 = 0$ and $f_y = -2y = 0$ give two stationary points: $(-1, 0)$ and $(1, 0)$. At the first $f = 2$, and it’s a summit. At the second $f = -2$, but it’s neither a summit nor a pit: along the $x$-axis the point $x = 1$ is the bottom of a hollow (the function $x^3 - 3x$ has a minimum there), while across it, in the direction of the $y$-axis, it’s a ridge ($-2 - y^2$ has a maximum). Mountain roads are laid through exactly such points.
A saddle point (a saddle, or on a map a pass) is a stationary point in every neighbourhood of which the function takes values both larger and smaller than at the point itself.
To tell summits, pits and saddles apart, we need the next term of the approximation after the plane: the second derivatives. Write $f_{xx} = \frac{\partial^2 f}{\partial x^2}$, $f_{yy}$ and the mixed $f_{xy} = \frac{\partial}{\partial y}\frac{\partial f}{\partial x}$. Near a stationary point $P$ the surface looks like the graph of the quadratic form $\frac12(Ah^2 + 2Bhk + Ck^2)$ with coefficients $A = f_{xx}(P)$, $B = f_{xy}(P)$, $C = f_{yy}(P)$, and a single number decides everything.
Let the second partial derivatives of $f$ be continuous near a stationary point $P$, and let $A = f_{xx}(P)$, $B = f_{xy}(P)$, $C = f_{yy}(P)$, $\Delta = AC - B^2$. If $\Delta > 0$ and $A > 0$, then $P$ is a point of strict local minimum; if $\Delta > 0$ and $A < 0$, of maximum; if $\Delta < 0$, it’s a saddle point. At $\Delta = 0$ the test says nothing.
The idea: reduce everything to a function of one variable along a segment, and find the sign of the quadratic form by completing the square, as in chapter 10.
The case $\Delta = 0$ really is hopeless for the test: for $x^4 + y^4$, for $x^4 - y^4$ and for the “monkey saddle” $x^3 - 3xy^2$ all the second derivatives at zero vanish, yet the behaviour differs: a minimum, an ordinary saddle, and a saddle with three hollows, for two legs and a tail. You can look at it in the chapter’s first widget.
Why mixed derivatives don’t depend on the order
If the mixed derivatives $f_{xy}$ and $f_{yx}$ exist near the point $(a, b)$ and are continuous at it, then $f_{xy}(a, b) = f_{yx}(a, b)$.
Let’s compute one quantity in two ways. Let $D = f(a + h, b + k) - f(a + h, b) - f(a, b + k) + f(a, b)$ be the sum of the heights at the corners of a rectangle, with a plus at two opposite corners and a minus at the other two. Put $u(x) = f(x, b + k) - f(x, b)$; then $D = u(a + h) - u(a)$. By Lagrange’s theorem $D = u'(\xi)h = \big(f_x(\xi, b + k) - f_x(\xi, b)\big)h$ for some $\xi$ between $a$ and $a + h$. The difference in brackets is the increment of the function $y \mapsto f_x(\xi, y)$, and by the same theorem it equals $f_{xy}(\xi, \eta)k$. So $D = f_{xy}(\xi, \eta)hk$ for some point $(\xi, \eta)$ of the rectangle. If we start from the function $v(y) = f(a + h, y) - f(a, y)$, then $D = v(b + k) - v(b)$, and in the same way we get $D = f_{yx}(\xi', \eta')hk$. So $f_{xy}(\xi, \eta) = f_{yx}(\xi', \eta')$. As $h, k \to 0$ both points tend to $(a, b)$, and by continuity $f_{xy}(a, b) = f_{yx}(a, b)$.
Euler and Clairaut were already using the equation in the eighteenth century, and a rigorous proof for continuous derivatives was published by Hermann Schwarz in 1873. Without continuity the theorem is false: for the function $\frac{xy(x^2 - y^2)}{x^2 + y^2}$, $f(0, 0) = 0$, at zero $f_{xy} = -1$ while $f_{yx} = 1$.
Find the stationary point of the function $f(x, y) = x^2 + xy + y^2 - 3x$. Is it a summit, a pit or a saddle?
$f_x = 2x + y - 3 = 0$, $f_y = x + 2y = 0$. From the second equation $x = -2y$; substitute into the first: $-3y = 3$, $y = -1$, $x = 2$. The second derivatives: $A = 2$, $B = 1$, $C = 2$, $\Delta = 4 - 1 = 3 > 0$ and $A > 0$, so it’s a minimum, $f(2, -1) = 4 - 2 + 1 - 6 = -3$.
The trail
The expedition won’t make it to the summit: the route follows a trail that skirts round the mountain. Which point of the trail is the highest? This is a problem about a constrained extremum: the maximum of $f(x, y)$ is sought not over the whole map but only among points satisfying the condition $g(x, y) = c$, the equation of the trail.
Look at the map. Where the trail crosses a contour, a step one way leads higher and the other way lower, so such a point can’t be the highest. The highest point of the trail is where the trail doesn’t cross a contour but touches it. Touching curves share a tangent, and gradients are perpendicular to their level curves. So at that point the gradients of $f$ and $g$ lie on one line.
The number $\lambda$ in these equations is called the Lagrange multiplier. It has a meaning: it shows how fast the maximum found changes if the level $c$ in the constraint is shifted.
Let $f$ and $g$ be differentiable at a point $P$ lying on the curve $g = c$, with $\nabla g(P) \ne \mathbf 0$, and let the curve near $P$ be given by a differentiable parametrisation $\gamma(t)$ with $\gamma(0) = P$ and $\gamma'(0) \ne \mathbf 0$. If among the points of the curve the function $f$ has a local maximum or minimum at $P$, then $\nabla f(P) = \lambda\nabla g(P)$ for some number $\lambda$.
The idea: split $\nabla f$ into a part along the curve and a part across it. The part along the curve has to vanish.
We solved the tin can problem in chapter 27: we expressed the height through the radius and looked for the minimum of a function of one variable. Lagrange multipliers manage without that substitution. The surface area is $S = 2\pi r^2 + 2\pi rh$, and the volume $V = \pi r^2h$ is given. The equations $\nabla S = \lambda\nabla V$ in the coordinates $r$ and $h$:
$$4\pi r + 2\pi h = \lambda \cdot 2\pi rh, \qquad 2\pi r = \lambda\pi r^2.$$
From the second, $\lambda = \frac2r$; substitute into the first: $4\pi r + 2\pi h = 4\pi h$, that is, $h = 2r$. The height equals the diameter, whatever the volume. For a one-litre can $r = \sqrt[3]{500/\pi} \approx 5.42$ cm, $h \approx 10.84$ cm, and it takes about $554$ cm² of tinplate.
Descent in fog
While it’s light, summits and pits can be found on the map by solving the equation $\nabla f = \mathbf 0$. But such equations often can’t be solved explicitly, and there can be millions of variables. Then you do what a hiker does in fog: look at the slope underfoot and step where it drops away most steeply, that is, against the gradient.
Gradient descent is the search for a minimum by successive steps against the gradient using this formula.
The method was proposed by Cauchy in 1847 for solving systems of equations. Today, with various improvements, it’s used to train neural networks: the height is the model’s error, and the coordinates are its parameters. What this looks like in practice is shown in the chapter Walking downhill of the Sprout course, where a small language model learns by gradient descent.
The ravine shows descent’s main trouble. Across the ravine the slopes are steep, and a step suited to them is too small for the gentle floor: the hiker trudges along the ravine for a long time. Make the step longer and the hiker starts jumping from slope to slope; a bit more and the descent blows up. Where the boundary lies can be said precisely.
For the function $f(x, y) = \frac12(ax^2 + by^2)$ with $a, b > 0$, gradient descent with step $\eta > 0$ reaches the minimum $(0, 0)$ from every starting point if and only if $\eta < \frac{2}{\max(a, b)}$.
The idea: in such a ravine the coordinates don’t interfere with each other, and each one turns into a geometric progression.
And the speed is set by the gentlest. With the best step, $\eta = \frac{2}{a + b}$, both coordinates shrink by a factor of at least $\frac{\kappa - 1}{\kappa + 1}$ per step, where $\kappa = \frac{\max(a, b)}{\min(a, b)}$ is the condition number. At $\kappa = 100$ that’s $0.98$: to cut the error a millionfold takes about $690$ steps. Near a non-degenerate minimum a smooth function looks like a quadratic form, and the numbers $a$ and $b$ are the eigenvalues of its Hessian, so close to the bottom the conclusion holds for real mountains too. That’s why plain descent is hardly ever used to train neural networks: momentum is added, and the step is adjusted for each coordinate.
How much earth is in the mountain
The expedition’s geologist needs the volume of the mountain: how much earth lies over a patch of the map. We assembled the area under the graph of a function of one variable from narrow rectangles (chapter 28). Here we’ll assemble volume from columns. Divide a rectangle $R$ on the map into cells, stand a column over each with height $f$ at some point of the cell, and add up the volumes.
The double integral $\iint_R f\,dA$ is the limit of the sums $\sum f(x_i, y_j)\,\Delta x\,\Delta y$ as the cells get ever smaller. For $f \ge 0$ it’s the volume of the solid under the surface $z = f(x, y)$ over $R$. For a continuous function on a rectangle this limit exists; the proof is the same as for one variable and will come in chapter 53. The integral over a region $D$ of another shape is the integral over a rectangle of the function equal to $f$ on $D$ and zero outside $D$.
There’s no need to compute such limits directly: a double integral reduces to two ordinary ones. Cut the mountain with the planes $x = \text{const}$, find the area of each cross-section and add up the cross-sections: this is Cavalieri’s principle from chapter 20, turned into a theorem.
If $f$ is continuous on the rectangle $R = [a, b] \times [c, d]$, then
$$\iint_R f\,dA = \int_a^b\left(\int_c^d f(x, y)\,dy\right)dx = \int_c^d\left(\int_a^b f(x, y)\,dx\right)dy.$$
The idea: add up the same columns in a different order, first within strips, then the strips with each other.
Example
How much earth is there in our hill $f = 6 - x^2 - 2y^2$ over the square kilometre $[0, 1] \times [0, 1]$? The inner integral: $\int_0^1(6 - x^2 - 2y^2)\,dy = 6 - x^2 - \frac23$. The outer one: $\int_0^1\left(\frac{16}{3} - x^2\right)dx = \frac{16}{3} - \frac13 = 5$. The height was measured in hundreds of metres, so this is $500 \text{ m} \cdot 10^6 \text{ m}^2 = 5 \cdot 10^8$ cubic metres.
Compute $\iint_R (x + y^2)\,dA$ over the rectangle $R = [0, 2] \times [0, 1]$.
The inner integral, with respect to $y$: $\int_0^1(x + y^2)\,dy = x + \frac13$. The outer one: $\int_0^2\left(x + \frac13\right)dx = 2 + \frac23 = \frac83$.
Round mountains are easier to cut not into cells but into rings and sectors.
The polar coordinates of a point are its distance $r$ from the origin and the angle $\varphi$ between the ray from the origin to the point and the $x$-axis: $x = r\cos\varphi$, $y = r\sin\varphi$. For a complex number these are its modulus and argument from chapter 15.
A little piece of a ring between the radii $r$ and $r + \Delta r$ and the angles $\varphi$ and $\varphi + \Delta\varphi$ has area exactly $\frac{\Delta\varphi}{2}\big((r + \Delta r)^2 - r^2\big) = \left(r + \frac{\Delta r}{2}\right)\Delta r\,\Delta\varphi$. It’s almost a rectangle with sides $\Delta r$ and $r\,\Delta\varphi$, and the further from the centre, the wider it is. Hence the factor $r$ in the formula.
The bell
The curve $y = e^{-x^2}$ is the famous bell from which the normal distribution grows (chapter 48). The area under it is finite, but you won’t find an antiderivative: in the 1830s Liouville proved that it can’t be written in terms of elementary functions, and the integral solver honestly gives up on it. And yet the area is known exactly.
$$\int_{-\infty}^{+\infty} e^{-x^2}\,dx = \sqrt{\pi}.$$
The trick is to move to the plane: the square of the integral is the volume under the round bell $e^{-(x^2 + y^2)}$, and round solids are conveniently cut into rings.
The substitution $x = \frac{t}{\sqrt2}$ turns this formula into $\int_{-\infty}^{+\infty}e^{-t^2/2}\,dt = \sqrt{2\pi}$. Hence the factor $\frac{1}{\sqrt{2\pi}}$ in the formula for the normal distribution: with it the whole area under the bell equals one, as the sum of all probabilities should.
Rest stop
Before heading down into the valley, let’s check the kit. The trainer has three levels: partial derivatives; the gradient, the directional derivative and the tangent plane; stationary points and their type.
Where next
The expedition is on its way back, and at the rest stop someone gets out a violin. Sound is air pressure changing over time: a function of just one variable, but what a complicated one. A violin and a flute playing the same note A at 440 hertz draw completely different curves, and the ear tells them apart unerringly. The ear breaks sound down into pure tones, sine waves of different frequencies. Can any periodic signal be broken down like that? And how can you tell from a curve which sine waves it’s made of and how loud each one sounds? The answer comes from Fourier series.