Week3 PDF
Week3 PDF
The notation for partial derivatives ∂x f, ∂y f was introduced by Carl Gustav Jacobi. Before, Josef
Lagrange had used the term ”partial differences”. Partial derivatives fx and fy measure the rate
of change of the function in the x or y directions. For functions of more variables, the partial
derivatives are defined in a similar way.
1 For f (x, y) = x4 − 6x2 y 2 + y 4 , we have fx (x, y) = 4x3 − 12xy 2 , fxx = 12x2 − 12y 2 , fy (x, y) =
−12x2 y + 4y 3 , fyy = −12x2 + 12y 2 and see that fxx + fyy = 0. A function which satisfies this
equation is also called harmonic. The equation fxx + fyy = 0 is an example of a partial
differential equation: it is an equation for an unknown function f (x, y) which involves
partial derivatives with respect to more than one variables.
Clairaut’s theorem If fxy and fyx are both continuous, then fxy = fyx .
Proof: we look at the equations without taking limits first. We extend the definition and say that
a background “Planck constant” h is positive, then fx (x, y) = [f (x + h, y) − f (x, y)]/h. For h = 0
we define fx as before. Comparing the two sides for fixed h > 0 shows
hfx (x, y) = f (x + h, y) − f (x, y) hfy (x, y) = f (x, y + h) − f (x, y).
2
h fxy (x, y) = f (x + h, y + h) − f (x, y + h) − (f (x + h, y) − f (x, y)) h2 fyx (x, y) = f (x + h, y + h) − f (x + h, y) − (f (x, y + h) − f (x, y))
We have not taken any limits and established an identity which holds for all h > 0: the discrete
derivatives fx , fy satisfy the relation fxy = fyx for any h > 0. We could fancy the identity obtained
in the proof as a ”quantum Clairaut” theorem. If the classical derivatives fxy , fyx are both
continuous, it is possible to take the limit h → 0. The classical Clairaut’s theorem as a ”classical
limit”. Note that the quantum Clairaut theorem shown in this proof holds for all functions f (x, y)
of two variables. We do not even need continuity.
2 Find fxxxxxyxxxxx for f (x) = sin(x) + x6 y 10 cos(y). Answer: you do not need to compute.
Once you see it, its obvious.
1
fx (x, y) = (3x2 y − y 3 )/(x2 + y 2 ) − 2x(x3 y − fy (x, y) = (x3 − 3xy 2 )/(x2 + y 2 ) − 2y(x3 y −
xy 3 )/(x2 +y 2 )2 , fx (0, y) = −y, fxy (0, 0) = −1, xy 3 )/(x2 + y 2 )2 , fy (x, 0) = x, fy,x (0, 0) = 1.
An equation for an unknown function f (x, y) which involves partial derivatives with
respect to at least two different variables is called a partial differential equation
(PDE) If only the derivative with respect to one variable appears, it is an ordinary
differential equation (ODE).
Here are examples of partial differential equations. You have to know the first four in the same
way than a chemist has to know what H2 O, CO2 , CH4 , N aCl is.
4 The wave equation ftt (t, x) = fxx (t, x) governs the motion of light or sound. The function
f (t, x) = sin(x − t) + sin(x + t) satisfies the wave equation.
5 The heat equation ft (t, x) = fxx (t, x) describes diffusion of heat or spread of an epi-
1 −x2 /(4t)
demic. The function f (t, x) = √
t
e satisfies the heat equation.
6 The Laplace equation fxx + fyy = 0 determines the shape of a membrane. The function
f (x, y) = x3 − 3xy 2 is an example satisfying the Laplace equation.
8 The eiconal equation fx2 + fy2 = 1 is used to see the evolution of wave fronts in optics.
The function f (x, y) = cos(x) + sin(y) satisfies the eiconal equation.
9 The Burgers equation ft + f fx = fxx describes waves at the beach which break. The
√ 1 −x2 /(4t)
x e
function f (t, x) = t √t 1 −x2 /(4t) satisfies the Burgers equation.
1+ t
e
2
Notice that in all these examples, we have just given one possible solution to the partial differen-
tial equation. There are in general many solutions and only additional conditions like initial or
boundary conditions determine the solution uniquely. If we know f (0, x) for the Burgers equation,
then the solution f (t, x) is determined. A course on partial differential equations would show you
how to get the solution.
Paul Dirac once said: ”A great deal of my work is just playing with equations and seeing
what they give. I don’t suppose that applies so much to other physicists; I think it’s a peculiarity
of myself that I like to play about with equations, just looking for beautiful mathematical
relations which maybe don’t have any physical meaning at all. Sometimes they do.” Dirac
discovered a PDE describing the electron which is consistent both with quantum theory and special
relativity. This won him the Nobel Prize in 1933. Dirac’s equation could have two solutions, one
for an electron with positive energy, and one for an electron with negative energy. Dirac interpreted
the later as an antiparticle: the existence of antiparticles was later confirmed. We will not learn
here to find solutions to partial differential equations. But you should be able to verify that a
given function is a solution of the equation.
Homework
3
satisfies the Sine Gordon equation utt − uxx = − sin(u). If
you can do that problem without technology, put it on a sepa-
rate page and give it to Oliver. Its not for credit. I just wonder
whether somebody can do it.
3 Verify that for any constants b, c, the function f (x, t) = e−bt cos(x+
ct) satisfies the driven transport equation ft(x, t) = cfx(x, t) −
bf (x, t) It is sometimes also called the advection equation.
4 The differential equation
ft = f − xfx − x2fxx
is a variant of the infamous Black-Scholes equation. Here
f (x, t) is the prize of a call option and x the stock prize ad t is
time. This is a bit a creative problem. Find a function f (x, t)
which solves this equation.
5 The partial differential equation ft + f fx = fxx is called Burg-
ers equation and describes waves at the beach. In higher di-
mensions, it leads to the Navier-Stokes equation which are used
to describe the weather. Verify that
2
1 3/2 − x4t
xe
f (t, x) qt 2
1 − x4t
t e +1
solves the Burgers equation.
Remark. You better use technology. Here is an example on
how to check that a function is a solution of the heat equation in
Mathematica:
f[t_,x_]:=(1/Sqrt[t])*Exp[-x^2/(4t)];
Simplify[D[f[t,x],t] == D[f[t,x],{x,2}]]
And here is the function
(1/t)^(3/2)*x*Exp[-x^2/(4t)]/((1/t)^(1/2)*Exp[-x^2/(4t)]+1);
4
Math S21a: Multivariable calculus Oliver Knill, Summer 2016
(k)
If you should have seen Taylor series, this is a truncation of the series f (x) = ∞
P
k=0 f (a)(x −
k
a) /k! taking only the k = 0 and k = 1 term. It is important to think about this in terms of
functions and not graphs because we will also look at this also for functions of three variables,
where we can not draw graphs.
y=L(x)
y=f(x)
The graph of the function L is close to the graph of f at a. We generalize this to higher dimensions:
1
1 What is the linear approximation of the function f (x, y) = sin(πxy 2 ) at the point (1, 1)? We
have (fx (x, y), fy (x, y) = (πy 2 cos(πxy 2 ), 2yπ cos(πxy 2 )) which is at the point (1, 1) equal to
∇f (1, 1) = hπ cos(π), 2π cos(π)i = h−π, 2πi.
2 Linearization can be used to estimate functions near a point. In the previous example,
−0.00943 = f (1+0.01, 1+0.01) ∼ L(1+0.01, 1+0.01) = −π0.01−2π0.01+3π = −0.00942 .
5 Find the tangent line to the graph of the function g(x) = x2 at the point (2, 4).
Solution: the level curve f (x, y) = y − x2 = 0 is the graph of a function g(x) = x2 and
the tangent at a point (2, g(2)) = (2, 4) is obtained by computing the gradient ha, bi =
∇f (2, 4) = h−g ′ (2), 1i = h−4, 1i and forming −4x + y = d, where d = −4 · 2 + 1 · 4 = −4.
The answer is −4x + y = −4 which is the line y = 4x − 4 of slope 4.
2
7 The quartic surface
f (x, y, z) = x4 − x3 + y 2 + z 2 = 0
is called the piriform. What is the equation for the tangent plane at the point P = (2, 2, 2)
of this pair shaped surface? We get ha, b, ci = h20, 4, 4i and so the equation of the plane
20x + 4y + 4z = 56, where we have obtained the constant to the right by plugging in the
point (x, y, z) = (2, 2, 2).
3
Homework
Source: http://www.cdnpapermoney.com
4
Math S21a: Multivariable calculus Oliver Knill, Summer 2016
If f and g are functions of a single variable t, the single variable chain rule tells us that
d/dtf (g(t)) = f ′ (g(t))g ′ (t). For example, d/dt sin(log(t)) = cos(log(t))/t.
It can be proven by linearizing the functions f and g and verifying the chain rule in the linear
case. The chain rule is also useful:
Define the gradient ∇f (x, y) = hfx (x, y), fy (x, y)i or ∇f (x, y, z) =
hfx (x, y, z), fy (x, y, z), fz (x, y, z)i.
If ~r(t) is curve and f is a function of several variables we can build a function t 7→ f (~r(t)) of one
variable. Similarly, If ~r(t) is a parametrization of a curve in the plane and f is a function of two
variables, then t 7→ f (~r(t)) is a function of one variable.
d
The multivariable chain rule is dt
f (~r(t)) = ∇f (~r(t)) · ~r′ (t).
holds for every h > 0. The left hand side converges to dtd f (x(t), y(t)) in the limit h → 0 and
the right hand side to fx (x(t), y(t))x′ (t) + fy (x(t), y(t))y ′ (t) using the single variable chain rule
twice. Here is the proof of the later, when we differentiate f with respect to t and y is treated as
a constant:
Write H(t) = x(t+h)-x(t) in the first part on the right hand side.
1
1 We move on a circle ~r(t) = hcos(t), sin(t)i on a table with temperature distribution f (x, y) =
x2 − y 3 . Find the rate of change of the temperature ∇f (x, y) = (2x, −3y 2 ), ~r′ (t) =
(− sin(t), cos(t)) d/dtf (~r(t)) = ∇T (~r(t)) · ~r′ (t) = (2 cos(t), −3 sin(t)2 ) · (− sin(t), cos(t)) =
−2 cos(t) sin(t) − 3 sin2 (t) cos(t).
From f (x, y) = 0 one can express y as a function of x. From d/df (x, y(x)) = ∇f · (1, y ′ (x)) =
fx +fy y ′ = 0, we obtain y ′ = −fx /fy . Even so, we do not know y(x), we can compute its derivative!
Implicit differentiation works also in three variables. The equation f (x, y, z) = c defines a surface.
Near a point where fz is not zero, the surface can be described as a graph z = z(x, y). We can
compute the derivative zx without actually knowing the function z(x, y). To do so, we consider y
a fixed parameter and compute using the chain rule
The chain rule is powerful because it implies other differentiation rules like the addition, product
and quotient rule in one dimensions: f (x, y) = x+y, x = u(t), y = v(t), d/dt(x+y) = fx u′ +fy v ′ =
u′ + v ′ .
f (x, y) = xy, x = u(t), y = v(t), d/dt(xy) = fx u′ + fy v ′ = vu′ + uv ′ .
f (x, y) = x/y, x = u(t), y = v(t), d/dt(x/y) = fx u′ + fy v ′ = u′ /y − v ′ u/v 2 .
As in one dimensions, the chain rule follows from linearization. If f is a linear function f (x, y) =
ax + by − c and if the curve ~r(t) = hx0 + tu, y0 + tvi parametrizes a line. Then dtd f (~r(t)) =
d
dt
(a(x0 + tu) + b(y0 + tv)) = au + bv and this is the dot product of ∇f = (a, b) with ~r ′ (t) = (u, v).
Since the chain rule only refers to the derivatives of the functions which agree at the point, the
chain rule is also true for general functions.
2
Homework
4
Math S21a: Multivariable calculus Oliver Knill, Summer 2016
The symbol ∇ is spelled ”Nabla” and named after an Egyptian or Assyrian harp. Early on, the
name ”Atled” was suggested. But the textbook of 1901 of Gibbs which used Nabla, was too
persuasive. Here is a very important fact:
Proof. Every curve ~r(t) on the level curve or level surface satisfies dtd f (~r(t)) = 0. By the chain
rule, ∇f (~r(t)) is perpendicular to the tangent vector ~r′ (t).
Because ~n = ∇f (p, q) = ha, bi is perpendicular to the level curve f (x, y) = c through (p, q), the
equation for the tangent line is ax + by = d, a = fx (p, q), b = fy (p, q), d = ap + bq. Compactly
written, this is
∇f (~x0 ) · (~x − ~x0 ) = 0
and means that the gradient of f is perpendicular to any vector (~x − ~x0 ) in the plane. It is one of
the most important statements in multivariable calculus. since it provides a crucial link between
calculus and geometry. The just mentioned gradient theorem is also useful. We can immediately
compute tangent planes and tangent lines:
1 Compute the tangent plane to the surface 3x2 y + z 2 − 4 = 0 at the point (1, 1, 1). Solution:
∇f (x, y, z) = h6xy, 3x2 , 2zi. And ∇f (1, 1, 1) = h6, 3, 2i. The plane is 6x + 3y + 2z = d where
d is a constant. We can find the constant d by plugging in a point and get 6x+3y+2z = 11.
1
2 Problem: reflect the ray ~r(t) = h1 − t, −t, 1i at the surface
x4 + y 2 + z 6 = 6 .
Solution: ~r(t) hits the surface at the time t = 2 in the point (−1, −2, 1). The velocity vec-
tor in that ray is ~v = h−1, −1, 0i The normal vector at this point is ∇f (−1, −2, 1) =
h−4, −4, 6i = ~n. The reflected vector is R(~v = 2Proj~n (~v ) − ~v . We have Proj~n (~v ) =
8/68h−4, −4, 6i. Therefore, the reflected ray is w
~ = (4/17)h−4, −4, 6i − h−1, −1, 0i.
The directional derivative tells us how the function changes when we move in a given direction.
Assume for example that T (x, y, z) is the temperature at position (x, y, z). If we move with veloc-
ity ~v through space, then D~v T tells us at which rate the temperature changes for us. If we move
with velocity ~v on a hilly surface of height h(x, y), then D~v h(x, y) gives us the slope we drive on.
3 If ~r(t) is a curve with velocity ~r ′ (t) and the speed is 1, then D~r′ (t) f = ∇f (~r(t)) · ~r ′ (t) is the
temperature change, one measures at ~r(t). The chain rule told us that this is d/dtf (~r(t)).
2
5 You are on a trip in a air-ship over Cambridge at (1, 2) and you want to avoid a thunderstorm,
a region of low pressure. The pressure is given by a function p(x, y) = x2 + 2y 2 . In which
direction do you have to fly so that the pressure change is largest?
Solution: The gradient
√ ∇p(x, y) = h2x, 4yi at the point (1, 2) is h2, 8i. Normalize to get
the direction h1, 4i/ 17.
The directional derivative has the same properties than any derivative: Dv (λf ) =
λDv (f ), Dv (f + g) = Dv (f ) + Dv (g) and Dv (f g) = Dv (f )g + f Dv (g).
We will see later that points with ∇f = ~0 are candidates for local maxima or minima of f .
Points (x, y), where ∇f (x, y) = (0, 0) are called critical points and help to understand the func-
tion f .
Homework