Analysis in Many Variables II
Analysis in Many Variables II
If f (x) is a real valued function of a single real variable x, i.e. f : R 7→ R, then its derivative
with regard to (wrt) x is defined as
df f (x + h) − f (x)
= lim
dx h→0 h
if it exists.
If f (x, y) is a real valued function of two real variables x and y, f : R2 7→ R, then we define the
partial derivative as
∂f f (x + h, y) − f (x, y)
= lim
∂x h→0 h
∂f
i.e. ∂x
is defined by differentiating wrt x whilst treating y as a constant.
∂f
This can sometimes be written as ∂x y
to make it explicit that y is being fixed.
Eg.
∂f
f (x, y) = cxy then = ycxy−1
∂x
∂f
Similarly, ∂y
defined as
∂f f (x, y + h) − f (x, y) ∂f
= lim =
∂y h→0 h ∂y x
Eg.
y
f (x, y) = cxy = celog x = cey log x
∂f
= cey log x · log x = cxy · log x
∂y
∂f
If we had a function in three real variables f (x, y, z) we could have ∂z x,y
, etc. for 4, 5,..., n
variables.
Eg.
If (r, θ) are polar co-ordinates and (x, y) are Cartesian co-ordinates then we can view x and y
as functions of two variables
x = x(r, θ)
y = y(r, θ)
1
which produces
x(r, θ) = r cos θ
y(r, θ) = r sin θ
End of Lecture 1
2
Continuing from where Lecture 1 finished off, we seek to give the partial derivatives of x = t cos θ
and y = r sin θ in terms of r and θ. p
By algebraic manipulation we can easily see that r = x2 + y 2 and tan θ = xy , which for this we
will call ∗ to make the algebra less messy.
∂r x ∂r y
=p =p
∂x x + y2
2 ∂y x + y2
2
∂∗ ∂θ 1
=⇒ sec2 θ = (via implicit diff. wrt y)
∂y ∂y x
∂θ cos2 θ ( x )2 x x
=⇒ = = r = 2 = 2
∂y x x r x + y2
and likewise by similar argument we can deduce
∂θ y
=− 2
∂x x + y2
Note:
dx 1
Unlike with normal derivatives, the relationship of dy
= dy does not hold for partial derivatives.
dx
∂x 1
6= ∂y
∂y ∂x
∂ 2f ∂ 2f
∂ ∂f ∂ ∂f
= , =
∂u ∂v ∂u∂v ∂v ∂u ∂v∂u
If these two results are continuous functions of u and v then they are always equal.
Example:
3
Note
Chain Rules
Example:
For normal differentiation the chain rule (to differentiate a function of a function) looks like the
following:
d
(sin(et )) = et cos(et )
dx
So if we set
F (t) = sin(et )
= f (x(t)), with f (x) = sin x, x(t) = et
For a function f (x, y) of two functions x(t), y(t) giving F (t) = f (x(t), y(t)) the chain rule looks
slightly different.
Example:
cos t x
F (t) = = f (x(t), y(t)) where x(t) = cos t, y(t) = sin t, f (x, y) =
sin t y
So to check
∂f 1 ∂f x
= , =− 2
∂x y ∂y y
dx dy
= − sin t, = cos t
dt dt
4
So
∂f dx ∂f dy sin t cos t cos t
+ =− −
∂x dt ∂y dt sin t sin2 t
cos2 t
= −1 −
sin2 t
1
= − 2 = − csc2 t
sin t
If F depends on two variables u and v in functions x and y, i.e. F (u, v) = f (x(u, v), y(u, v))
then
∂F ∂x ∂f ∂y ∂f
= +
∂u ∂u ∂x ∂u ∂y
and similarly
∂F ∂v ∂f ∂y ∂f
= +
∂v ∂x ∂x ∂v ∂y
Also, if u and v can be written as functions of x and y then f (x, y) = F (u(x, y), v(x, y)) so
∂f ∂u ∂F ∂v ∂F
= +
∂x ∂x ∂u ∂x ∂v
and similarly
∂f ∂u ∂F ∂v ∂F
= +
∂y ∂y ∂u ∂y ∂v
Example:
Suppose (r, θ) are polar co-ordinates and (x, y) are Cartesian co-ordinates.
Then set F (r, θ) = r cos θ = x = f (x, y).
Then
∂f (x) ∂f
= = 1 (a), and = 0 (b) (the easier route)
∂x ∂x ∂y
Or (via the chain rule)
∂f ∂r ∂F ∂θ ∂F
= +
∂x ∂x ∂r ∂x ∂θ
End Lecture 2
5
(Picking up where Lecture 2 left off)
6
Chapter 1
Notation
The position vector of a point in Rn can be written in terms of the standard basis {e1 , e2 , ... , en }
so
x = x1 e1 + x2 e2 + ... + xn en
Xn
= xi ei = xi ei
i=1
(the second form of the summation is an example of the Einstein Summation Convention, where
when two terms are multiplied together with the same index it is implied that the product is being
summed from i = 1 to i = n)
The ei vectors are all orthonormal wrt the scalar (dot) product
(
1 if i = j
ei · ej =
0 if i 6= j
This is often denoted as ei · ej = δij where δij is called the Kronecker delta, defined as
(
1 if i = j
δij :=
0 if i 6= j
For low values of n (i.e. R2 or R3 ) instead of (x1 , x2 ) or (x1 , x2 , x3 ) it is convention to use (x, y)
or (x, y, z)
u = u1 e1 + u2 e2 + ... + un en = ui ei
v = v1 e1 + v2 e2 + ... + vn en = vi ei
7
their scalar (dot) product is given by
u · v = u1 v1 + u2 v2 + ... + un vn = ui vi
√
The length of u is given by |u| = u · u.
If θ is the angle between u and v then u · v = |u||v| cos θ.
If x is the position vector of a point then |x| is sometimes denoted by r.
Scalar fields are real valued functions on Rn , i.e. they map Rn → R, x 7→ f (x)
Example:
x1 x2 xy
(n = 3) f (x) = = = f (x, y, z)
tan x3 tan z
Example:
f (x) = x(a · x)
could be written as
fi = xi (aj xj )
End of Lecture 3
8
(H/W set: problem sheet 1 Q1,6 due Fri 19th 12noon to lockers in CM117)
Example:
dx
If x(t) is differentiable then is tangent to the curve (if non-zero)
dt
”Proof”
arc length δs
x(t + h)
x(t + h) − x(t)
x(t)
Example:
Note
dx
If t is taken to be the ’arc length’ s along the curve from a fixed point on it then = 1 with
ds
t = s and h = δs.
as |x(s + δs) − x(s)| ≈ δs
|x(s + δs) − x(s)|
=⇒ lim =1
δs→0 δs
dx
=⇒ = 1
ds
9
Chapter 2
∂f ∂f f (x + he1 ) − f (x)
= := lim
∂x ∂x1 h→0 h
etc, which can be generalised to n-dimensions with f (x) : Rn → R as
End Lecture 4
10
(Lecture began with problem class material, hence less content covered)
The restriction of f (x, y) : R2 → R to the parametric curve C : (x(t), y(t)) gives a functions of
t of the form F (t) = f (x(t), y(t)) and
dF dx ∂F dy ∂F
= +
dt dt ∂x dt ∂y
End Lecture 5
11
Alternatively, we could write all of this as a scalar product:
dF dx1 dx2 ∂f ∂f
= e1 + e2 · e1 + e2
dt dt dt ∂x1 ∂x2
| {z } | {z }
(∗) (†)
dF dx
= · ∇f
dt dt
Or as an operator:
d dx
= ·∇
dt dt
Example:
Then
dF df (x(t)) dx1 ∂f dxn ∂f
= = + ... +
dt dt dt ∂x1 dt ∂xn
dF dx
= · ∇f
dt dt
12
Chapter 3
3.1 Examples
Example 1
x2 + y 2
(In R2 ) x = e1 x + e2 y, f (x) =
4
∂f x ∂f y
=⇒ = , =
∂x 2 ∂y 2
x y 1
=⇒ ∇f = e1 + e2 = x
2 2 2
The vector field ∇f can be drawn as arrows of length ||∇f || and direction parallel to nablaf starting
at a variety of sample points.
13
End Lecture 6
Note
∇f is always at right angles (i.e. normal) to the curves ||x|| = a, curves of constant f .
Example
(in R2 )
f (x) = x · e1 , x = x1 e1 + x2 e2
so f (x) = x1
then ∇f = e1
Check for n = 2
i)
∂ ∂
∇(af + bg) = e1 (af + bg) + e2 (af + bg)
∂x1 ∂x2
∂f ∂g ∂f ∂g
= e1 a +b + e2 a +b
∂x1 ∂x1 ∂x2 ∂x2
∂f ∂f ∂g ∂g
= a e1 + e2 + b e1 + e2
∂x1 ∂x2 ∂x1 ∂x2
= a∇f + b∇g
as required
14
ii)
∂ ∂
∇(f g) = e1 (f g) + e2 (f g)
∂x1 ∂x2
∂f ∂g ∂f ∂g
= e1 g+f + e2 g+f
∂x1 ∂x1 ∂x2 ∂x2
∂f ∂f ∂g ∂g
= e1 + e2 g + f e1 + e2
∂x1 ∂x2 ∂x1 ∂x2
= (∇f )g + f (∇g )
as required
While these arguments are only for functions in R2 because they are done component wise it is
trivial to see how they would generalise up to Rn and so we can conclude that i) and ii) hold for all
f, g : Rn → R.
iii) If Φ is a function R → R and f : Rn → R is a scalar field then Φ(f ) is another scalar field
dΦ
and ∇Φ(f ) = ∇f
df
Example
If Φ(f ) = f 2 and f (x, y) = x sin y then Φ(f ) = x2 sin2 y and by direct calculation
In general
∂Φ ∂Φ
∇Φ = e1 + ... + en
∂x1 ∂xn
∂f dΦ ∂f dΦ
= e1 + .... + en
∂x1 df ∂xn df
dΦ
= (∇f )
df
Example
(in R3 )
15
so
f (x) = f (x1 , x2 , x3 ) = a1 x1 + a2 x2 + a3 x3 − (x1 2 + x2 2 + x3 2 )
∂f ∂f ∂f
=⇒ = a1 − 2x1 , = a2 − 2x2 , = a3 − 2x3
∂x1 ∂x2 ∂x3
So
d ∂f dx1 ∂f dxn
f (x(t)) = + .... +
dt ∂x dt ∂xn dt
1
∂f ∂f dx1 dxn
= + ... + · + ... +
∂x1 ∂xn dt t
dx
= (∇f ) ·
dt
dx d f (x(t))
If we use length s to parametricise C, then = n̂ is a unit vector, tangent to C and = n̂ · ∇f
ds ds
is the rate of change of f wrt distance (arc length) in the direction n̂.
df
This is called the directional derivative pf f in direction n̂, sometimes written
dn̂
End Lecture 7
16