P1 Calculus II: Partial Differentiation & Multiple Integration
P1 Calculus II: Partial Differentiation & Multiple Integration
P1 Calculus II
david.murray@eng.ox.ac.uk
www.robots.ox.ac.uk/∼dwm/Courses/1PD
4 lectures, MT 2017
P1 2017 2 / 35
Lecture contents
In this lecture we develop a number of relationships which depend
on the nature of the function of several variables.
There is a danger that the various cases will become an unconnected
jumble.
The key thing is to always ask the question
what is f a function of, exactly
and then to write only expressions that you know to be true in that
case.
Function of a function
Suppose
f (x, y ) = xy sin(xy ) .
We could find the partial derivatives in the usual way as
∂f 2 ∂f
= y sin(xy ) + xy cos(xy ) = x sin(xy ) + x 2 y cos(xy )
∂x ∂x
BUT!
Notice that f is a function f = f (u) = u sin u of a single variable u = xy .
So total df /du must exist.
∂f df ∂u ∂f df ∂u
= and =
∂x du ∂x ∂y du ∂y
P1 2017 6 / 35
Proof
We know that the total differentials of f (x, y ) and u(x, y ) are:
∂f ∂f ∂u ∂u
df = dx + dy , and du = dx + dy .
∂x ∂y ∂x ∂y
♣ Example
Reminder:
∂f df ∂u ∂f df ∂u
= , =
∂x du ∂x ∂y du ∂y
BTW don’t think that means that you dividing out the partial ∂x’s and ∂y ’s.
df 1 x2
= =
du (1 + u 2 ) x2 + y2
and
∂u y ∂u 1
= − 2; =
∂x x ∂y x
∂f df ∂u −y ∂f df ∂u x
⇒ = = 2 ; = = 2
∂x du ∂x x + y2 ∂y du ∂y x + y2
P1 2017 8 / 35
♣ Example (harder)
Q: A quantity z(x, t) is given by z = f (x − ct) where c is a constant.
Show that, no matter what f is exactly, z satisfies
∂2 z 1 ∂2 z
= ,
∂x 2 c 2 ∂t 2
Write u = x − ct, so that z = f (u), and use the result just proved.
∂z df ∂u df df
= = (1) =
∂x du ∂x du du
∂2 z d2 f
dg ∂u dg
= = (1) =
∂x 2 du ∂x du du 2
P1 2017 9 / 35
∂2 z d2 f
dg ∂u dg
2
= −c = −c (−c) = c 2 2 .
∂t du ∂t du du
Hence
∂2 z d2 f 1 ∂2 z
2
= 2 = 2 2
∂x du c ∂t
Note that we have not had to say anything about the function f at all,
and you might care to check the result for any arbitrary function.
P1 2017 10 / 35
There are various cases of composite functions, and we deal with them in
turn.
This section will also introduce the chain rule, which you will use over
and over again.
P1 2017 11 / 35
Composite Functions I:
What if f = f (x, y ) and x = x(t) and y = y (t)?
df
⇒ total exists.
dt
df ∂f dx ∂f dy
= + .
dt ∂x dt ∂y dt
P1 2017 12 / 35
Proof
∂f ∂f
df = dx + dy
∂x ∂y
df ∂f dx ∂f dy
= +
dt ∂x dt ∂y dt
P1 2017 13 / 35
∂f ∂f
df = dx1 + dx2 + . . .
∂x1 ∂x2
then divide both sides by dt.
P1 2017 14 / 35
♣ Example
Q: Find df /dt when
df ∂f dx ∂f dy ∂f dz
= + +
dt ∂x dt ∂y dt ∂z dt
dx dy dz
= (y + z) + (x + z) + (x + y )
dt dt dt
= (e −t + cos t)(1) + (t + cos t)(−e −t ) + (t + e −t )(− sin t)
= e −t (1 − t − cos t − sin t) + cos t − t sin t.
Thus
∂f ∂f ∂x ∂f ∂y
= +
∂t1 ∂x ∂t1 ∂y ∂t1
∂f ∂f ∂x ∂f ∂y
= +
∂t2 ∂x ∂t2 ∂y ∂t2
and so on.
P1 2017 16 / 35
After chomping your way through the indices you should find that
It turns out that the chain rule for partials is very commonly used in
transforming from one set of coordinates to another.
∂f ∂f ∂x ∂f ∂y
= + = 2x cos φ + 2y sin φ
∂r ∂x ∂r ∂y ∂r
= 2r cos2 φ + 2r sin2 φ = 2r
∂f ∂f ∂x ∂f ∂y
= + = 2x(−r sin φ) + 2y (r cos φ)
∂φ ∂x ∂φ ∂y ∂φ
= −2r 2 cos φ sin φ + 2r 2 sin φ cos φ = 0 .
P1 2017 18 / 35
Direct checking
For x = r cos φ and y = r sin φ and f = x 2 + y 2 we just used the chain
rule for partials to show that
∂f ∂f
= 2r =0.
∂r ∂φ
dz 1 1 1
= y+ + x(1 − 2 ) x −1/2
dx y y 2
1 1/2
= x 1/2 + x −1/2 + x − x −1/2
2
3 1/2 1 −1/2
= x + x
2 2
a result which can be checked directly in this case, using z = x 3/2 + x 1/2 .
P1 2017 21 / 35
Implicit functions
In calculus and analytic geometry it is common to see the equations of
plane curves written as
f (x, y ) = 0.
√
For example the equation of a circle of radius 2 with centre at (0, 1) is
x 2 + (y − 1)2 − 2 = 0
y = y (x) = 1 ± (2 − x 2 )1/2
It turns out that for many purposes we don’t need an explicit expression
for the function. It is enough to characterize the function by its
derivative.
df ∂f ∂f dy
= + .
dx ∂x ∂y dx
1 − 2xy 3
dy ∂f /∂x
=− =− .
dx ∂f /∂y −3x 2 y 2
1 − 2xy 3 1 − 2xx −1
dy −1
=− =− =− = −x −4/3 /3 .
dx −3x 2 y 2 −3x 2 x −2/3 −3x 4/3
P1 2017 26 / 35
Now we can’t find y as a function of x, but using the result for implicit
functions we have
dy ∂f /∂x 2ax + 2hy + 2g
=− =− .
dx ∂f /∂y 2by + 2hx + 2f
P1 2017 27 / 35
This section goes a bit beyond the syllabus, but is helpful because it tests
your ability to think about functions and partial derivatives.
P1 2017 28 / 35
f (x, y , z) = 0 g (x, y , z) = 0
and
dg ∂g ∂g dy ∂g dz
= + + =0.
dx ∂x ∂y dx ∂z dx
P1 2017 29 / 35
/ctd
These last equations
∂f ∂f dy ∂f dz
+ + =0
∂x ∂y dx ∂z dx
and
∂g ∂g dy ∂g dz
+ + =0.
∂x ∂y dx ∂z dx
are two simultaneous equations in dy /dx and dz/dx which can be solved
dy ∂f ∂g ∂f ∂g ∂f ∂g ∂f ∂g
= − / −
dx ∂z ∂x ∂x ∂z ∂y ∂z ∂z ∂y
and
dz ∂f ∂g ∂f ∂g ∂f ∂g ∂f ∂g
= − / − .
dx ∂x ∂y ∂y ∂x ∂y ∂z ∂z ∂y
P1 2017 30 / 35
[**] ♣ Example
Try an example where the implicit functions can be derived explicitly.
Q: Find dy /dx and dz/dx when
f (x, y , z) = x + y + z = 0 g (x, y , z) = x − y + 2z = 0.
dy 1 dz 2
= − and =−
dx 3 dx 3
f + g = 2x + 3z = 0 ⇒ dz/dx = −2/3
2f − g = x + 3y = 0 ⇒ dy /dx = −1/3
dy ∂f /∂x
We’ve seen that for f (x, y ) = 0, y = y (x) that: =− .
dx ∂f /∂y
dz ∂f /∂x
Rewrite this for z instead of y : =− .
dx ∂f /∂z
∂z ∂f /∂x
=− .
∂x ∂f /∂z
P1 2017 33 / 35
∂xi ∂f /∂xj
=−
∂xj ∂f /∂xi
P1 2017 34 / 35
Note this result is independent of the form the perfect gas law.
P1 2017 35 / 35
Summary
We considered:
2.1 A function of a function.
2.2 Composite functions I,II,III, including the Chain Rule for Partials.
2.3 Implicit functions in two variables.
2.4 ** Implicit functions in more than two variables.