8—Multivariable Calculus 194
Notice that the units work out right too.
In spherical coordinates the procedure is identical. All that you have to do is to identify whatd~r
is.
d~r=rdrˆ +θrdθˆ +φrˆ sinθdφ
Again with this case you have to look at the distance moved when the coordinates changes by a small
amount. Just as with cylindrical coordinates this determines the gradient in spherical coordinates.
gradf=rˆ
∂f
∂r
+θˆ
1
r
∂f
∂θ
+φˆ
1
rsinθ
∂f
∂φ
=∇f (8.28)
The equations (8.15), (8.27), and (8.28) define the gradient (and correspondingly∇) in three
coordinate systems.
8.11 Maxima, Minima, Saddles
With one variable you can look for a maximum or a minimum by taking a derivative and setting it to
zero. For several variables you do it several times so that you will get as many equations as you have
unknown coordinates.
Put this in the language of gradients: ∇f= 0. The derivative offvanishes in every direction
as you move from such a point. As examples,
f(x,y) =x^2 +y^2 , or =−x^2 −y^2 , or =x^2 −y^2
For all three of these the gradient is zero at(x,y) = (0,0); the first has a minimum there, the second
a maximum, and the third neither — it is a “saddle point.” Draw a picture to see the reason for the
name. The generic term for all three of these is “critical point.”
An important example of finding a minimum is “least square fitting” of functions. How close are
two functions to each other? The most commonly used, and in every way the simplest, definition of
the distance (squared) betweenfandgon the intervala < x < bis
∫b
a
dx
∣∣
f(x)−g(x)
∣∣ 2
(8.29)
This means that a large deviation of one function from the other in a small region counts more than
smaller deviations spread over a larger domain. The square sees to that. As a specific example, take a
functionfon the interval 0 < x < Land try to fit it to the sum of a couple of trigonometric functions.
The best fit will be the one that minimizes the distance betweenf and the sum. (Takef to be a
real-valued function for now.)
D^2 (α,β) =
∫L
0
dx
(
f(x)−αsin
πx
L
−βsin
2 πx
L
) 2
(8.30)
Dis the distance between the given function and the sines used to fit it. To minimize the distance,
take derivatives with respect to the parametersαandβ.
∂D^2
∂α
= 2
∫L
0
dx
(
f(x)−αsin
πx
L
−βsin
2 πx
L
)(
−sin
πx
L
)
= 0
∂D^2
∂β
= 2
∫L
0
dx
(
f(x)−αsin
πx
L
−βsin
2 πx
L
)(
−sin