Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
P1 2018-19 1 / 1
P1 Calculus 2.I
Calculus of Multiple Variables
Prof David Murray
[email protected]/∼dwm/Courses/1CA2
4 lectures, MT 2018-19
P1 2018-19 2 / 1
MotivationSo far in your explorations of the differential and integral calculus,you have considered only functions of one variableThis comes naturally to you ...
ddx(ln(cosh
(sin−1 (1− 1
x
)))): x > 1 and
∫x
(x2 + 1)ndx .
But you do not have to look too hard to find quantities whichdepend on more than one independent variable
P1 2018-19 3 / 1
News, good and ...
The first part of this lecture course explains how to extend thecalculus to to multiple independent variables.
There’s good newsMost changes kick in going from one to two independant variables ...
... so usually two will do f = f (x , y).
And even better newsWhereas calculus in 1 variable can feel somewhat mechanistic ...
... now you really have to think!
P1 2018-19 4 / 1
Part 1 ContentsThe material splits into four topics to be covered over the first fourlecture slots.
é Partial differentiation and differentialsé Relationships arising from the nature of the functioné Changing variables from one set to anotheré Multiple integration
The tutorial sheet is
é 1P1H Partial Differentiation & Multiple Integrals
But, as ever, the sheet is not enough.• You must read, mark, learn and inwardly digest
— and not just these notes.• You must try worked examples from books.
P1 2018-19 5 / 1
Reading
James, G. (2001) Modern Engineering Mathematics, Prentice-Hall,3rd Ed., ISBN: 0-13-018319-9 (paperback).
Stephenson, G. (1973) Mathematical Methods for Science Students,Longman Scientific & Technical, 2nd Ed., ISBN: 0-582-44416-0(paperback).
Kreyszig, E. (1999) Advanced Engineering Mathematics, John Wiley& Sons, 8th Ed., ISBN: 0-471-15496-2 (paperback).
P1 2018-19 6 / 1
Course WWW Pages
Pdf copies of the notes, copies of the lecture slides, the tutorial sheets,corrections, answers to FAQs etc, will be accessible from
www.robots.ox.ac.uk/∼dwm/Courses/1CA2
Only the notes and the tute sheets get put onto canvas at.www.canvas.ox.ac.uk/courses/4803
P1 2018-19 7 / 1
1 Partial Derivatives & Differentials
P1 2018-19 8 / 1
Lecture contents
In this lecture we are concerned with ...
1.1 Continuity/limits for functions of more than one variable1.2 Partial derivatives1.3 A cautionary tale: partial derivatives are not fractions1.4 The total or perfect differential
P1 2018-19 9 / 1
1.1 Continuity and limits
P1 2018-19 10 / 1
Revision of single variable continuity
Function y = f (x) is continuous atx = a if, for every positive number ε(however small), one can find aneighbourhood
|x − a| < η
in which
|f (x) − f (a)| < ε .
Two useful facts about continuous functions are:The sum, difference and product of two continuous functions iscontinuous.The quotient of two continuous functions is continous at every pointwhere the denominator is not zero.
P1 2018-19 11 / 1
Revision of single variable derivative
The total derivative isdefined as
dfdx
= limδx→0
[f (x + δx) − f (x)
δx
].
f (x) is differentiable if thislimit exists, and existsindependent of how δx → 0.
Note thatA differentiable function is continuous.A continuous function is not necessarily differentiable. f (x) = |x | isan example of a function which is continous but not differentiable(at x = 0).
P1 2018-19 12 / 1
Moving to more than one variable
The big changes take place in going from n = 1 variables to n > 1variables. So for much of the time we can deal with functions of only twovariables — eg, f (x , y).
f (x , y) is conveniently represented as a surface, as opposed to a planecurve for a one variable function.
−4−2
02
4
−5
0
5−20
−10
0
10
20
xy
f(x,y
)
−4−2
02
4
−5
0
5−1
−0.5
0
0.5
1
xy
f(x,y
)
(x + y)(x − y) exp[−(x2 + y2)/10] sin(2x) cos(4y)
P1 2018-19 13 / 1
Continuity for functions of several variablesFunction f (x , y) iscontinuous at a point(a, b) in R if, for everypositive number ε(however small), it ispossible to find a positiveη such that
|f (x , y) − f (a, b)| < ε for all points (x − a)2 + (y − b)2 < η2
Thenlim
(x ,y)→(a,b)f (x , y) = f (a, b).
Note that for functions of more variables f (x1, x2, x3, ...) theneighbourhood would be defined by
(x1 − a)2 + (x2 − b)2 + (x3 − c)2 + . . . < η2 .
P1 2018-19 14 / 1
1.2 The partial derivative
P1 2018-19 15 / 1
The partial derivative
Problem!
The slope of the f (x , y) surface at(x , y) depends on which directionyou move off in!
We have to think about slope in aparticular direction.
The obvious directions are thosealong the x− and y−axes.
Solution! To move off from (x , y) in the x direction, keep y fixed.
Define the partial derivative wrt x :
fx =
(∂f
∂x
)y
= limδx→0
[f (x + δx , y) − f (x , y)
δx
]
P1 2018-19 16 / 1
More than two independent variables
If we are dealing with a function of more variables ...
... simply keep all but the one variable constant.
Eg for f (x1, x2, x3, ...) we have
The partial derivative again ...(∂f
∂x3
)x1x2x4...
= limδx3→0
[f (x1, x2, x3 + δx3, x4, ...) − f (x1, x2, x3, x4, ...)
δx3
]
Given that you know the list of the variables, and know the one beingvaried, the “held constant” subscripts are superfluous and are oftenomitted.
P1 2018-19 17 / 1
Geometrical interpretation of the partial derivative
P1 2018-19 18 / 1
The mechanics of evaluating partial derivatives
Operationally, partial differentiation is exactly the same as normaldifferentiation with respect to one variable, with all the others treatedas constants.
♣ ExampleSuppose
f (x , y) = x2y3 − 2y2
First assume y is a constant:
∂f
∂x= 2xy3
Then x is a constant:∂f
∂y= 3x2y2 − 4y
P1 2018-19 19 / 1
Examples♣ ExampleFind the 1st partial derivatives of f (x , y) = e−(x2+y2) sin(xy2)
∂f
∂x= e−(x2+y2)[−2x sin(xy2) + y2 cos(xy2)]
∂f
∂y= e−(x2+y2)[−2y sin(xy2) + 2xy cos(xy2)]
♣ Example
If f (x , y) = ln(xy), find the product(∂f
∂x
)(∂f
∂y
)in terms of f .
f (x , y) = ln(x) + ln(y)
⇒∂f∂x
= 1/x and∂f
∂y= 1/y
⇒(∂f
∂x
)(∂f
∂y
)= 1/xy = e−f (x ,y) .
P1 2018-19 20 / 1
Higher partial derivatives∂f /∂x and ∂f /∂y are probably perfectly good functions of (x , y), so wecan differentiate again.
∂2f
∂x2 =∂
∂xfx = fxx
♣ Example.
f (x , y) = x2y3 − 2y2
∂f /∂x = 2xy3
∂f /∂y = 3x2y2 − 4y
Hence
∂2f /∂x2 = 2y3
∂2f /∂y2 = 6x2y − 4 .
But we should also consider∂
∂y
(∂f
∂x
)=
∂2f
∂y∂x= 6xy2 and
∂
∂x
(∂f
∂y
)=
∂2f
∂x∂y= 6xy2.
P1 2018-19 21 / 1
Higher partial derivatives∂f /∂x and ∂f /∂y are probably perfectly good functions of (x , y), so wecan differentiate again.
∂2f
∂x2 =∂
∂xfx = fxx
♣ Example.
f (x , y) = x2y3 − 2y2
∂f /∂x = 2xy3
∂f /∂y = 3x2y2 − 4y
Hence
∂2f /∂x2 = 2y3
∂2f /∂y2 = 6x2y − 4 .
But we should also consider∂
∂y
(∂f
∂x
)=
∂2f
∂y∂x= 6xy2 and
∂
∂x
(∂f
∂y
)=
∂2f
∂x∂y= 6xy2.
Oooo!∂2f
∂x∂y=
∂2f
∂y∂x— is that always true?
P1 2018-19 22 / 1
♣ A more complicated random example
f (x , y) = e−(x2+y2) sin(xy2)
∂f
∂x= e−(x2+y2)[−2x sin(xy2) + y2 cos(xy2)]
∂f
∂y= e−(x2+y2)[−2y sin(xy2) + 2xy cos(xy2)]
⇒ fyx = e−(x2+y2)[−4x2y cos() + 2y cos() − 2y3x sin()− 2y [−2x sin() + y2 cos()]]
= e−(x2+y2)[sin()[−2y3x + 4xy ] + cos()[−4x2y + 2y − 2y3]]
and fxy = e−(x2+y2)[−2y3 cos() + 2y cos() − 2xy3 sin()− 2x [−2y sin() + 2xy cos()]]
= e−(x2+y2)[sin()[−2xy3 + 4xy ] + cos()[−2y3 + 2y − 4x2y ]]
So they are equal in this case too.
P1 2018-19 23 / 1
Yes, they are equal
When both sides exist, and are continuous at the point of interest,
∂2
∂x∂y≡ ∂2
∂y∂x
It is trivial to show this extends to higher partial derivatives
∂3
x1x2x3≡ ∂n
x1x3x2≡ ∂n
x2x1x3etc
Although the order is unimportant — a little thought can save time!♣ Example.Q: Find
∂3
∂t∂y∂x
[(y5 + xy) cosh(cosh(x2 + 1/x)) + y2tx
].
A: You have three seconds ...
P1 2018-19 24 / 1
1.3 Partial derivatives are not fraction-like
A severe warning
P1 2018-19 25 / 1
Partial derivatives are not fractions
You know from the chain rule that total derivatives have fraction-likequalities ...
♣ Example.Given y = u1/3, u = v3 and v = x2, find dy/dx .
dydx
=dydu· dudv· dvdx
=13u−2/3 3v2 2x = 2x =
131v2 3v2 2x = 2x
which you can check by finding y = x2 explicitly.
P1 2018-19 26 / 1
This is NOT the case for partials
♣ Example.Given the perfect gas law pV = RT , determine the product(
∂p
∂V
)T
(∂V
∂T
)p
(∂T
∂p
)V
Of course those tempted to divide would guess the answer = 1
But you’d be DEAD WRONG!
P1 2018-19 27 / 1
If pV = RT then p =RT
V, V =
RT
p, and T =
Vp
R.
Thus(∂p
∂V
)(∂V
∂T
)(∂T
∂p
)=
(−RT
V 2
)(R
p
)(V
R
)=
−RT
pV= −1.
In fact if we have any function f (x , y , z) = 0, then(∂x
∂y
)(∂y
∂z
)(∂z
∂x
)= −1
Partial derivatives do not behave as fractions.Although we can write down expressions like df = . . .
We can NEVER write down ∂f = . . ..
P1 2018-19 28 / 1
1.4 Total and partial differentials
P1 2018-19 29 / 1
The total differential
A differential is a different from a derivative.
Suppose that we have a continuous function f (x , y) in some region, andboth (∂f /∂x) and (∂f /∂y) are continuous in that region.
The differential tells one by how much the value of the function changesas one moves infinitesimal amounts dx and dy in the x- and y -directions.
The total or perfect differential of f (x , y)
df =∂f
∂xdx +
∂f
∂ydy
P1 2018-19 30 / 1
Explanation (Proof in the notes)
For changes δx and δy the smallchange in f is
δf = f (x+δx , y +δy)− f (x , y) .
Move in two steps: (i) keep yfixed, (ii) keep x fixed.
The small change in f along x is (∂f /∂x)δx .Now worry! The step over δy is made at x + δx not x .In the limit the correction becomes negligible, and ...
The total or perfect differential sums the partial differentials
df =∂f
∂xdx +
∂f
∂ydy
P1 2018-19 31 / 1
[**] Taylor’s expansion in 2 variables to 1st order
Note that our expression for df is EXACT in the limit as dx and dytend to zero.
If δx and δy are just small rather than infinitesimally small then
δf ≈ ∂f∂xδx +
∂f
∂yδy .
Recalling the expression for Taylor’s series in one variable, you may spotthat this is a Taylor’s expansion to 1st order in two variables.In other words
f (x + δx , y + δy) ≈ f (x , y) +∂f
∂xδx +
∂f
∂yδy .
P1 2018-19 32 / 1
[**] Taylor expansion in 2 variable to higher order
We might as well see how it continues!f (x + δx , y + δy)
≈ f (x , y)
1st order: +∂f
∂xδx +
∂f
∂yδy
2nd order: +12!
[(∂2f
∂x2
)(δx)2 + 2
(∂2f
∂x∂y
)(δx)(δy) +
(∂2f
∂y2
)(δy)2
]higher orders: + . . . think binomial . . .
P1 2018-19 33 / 1
♣ Example
Q: A material with a temperature coefficient of α is made into a block ofsides x , y , z measured at some temperature T . The temperature israised by a finite δT . (a) Derive the new volume of the block.A:
V + δV = x(1+ αδT )y(1+ αδT )z(1+ αδT ) = V (1+ αδT )3 .
Q: (b) Now let δT → dT and find the change using the total differential.A: The volume of the block is V = xyz .
dV = yzdx + xzdy + xydz= yzx(αdT ) + xzy(αdT ) + xyz(αdT )
= 3VαdT⇒V + dV = V (1+ 3αdT ) .
This is exact in the limit as dT tends to zero.
P1 2018-19 34 / 1
When is an expression a total differential?Suppose we are given some expression p(x , y)dx + q(x , y)dy .Is it total differential of some function f (x , y)?Now, if it is,
df = p(x , y)dx + q(x , y)dy .
But then we must have that
p(x , y) =∂f
∂xand q(x , y) =
∂f
∂y
and using fxy = fyx
∂
∂yp(x , y) =
∂2f
∂y∂x=
∂
∂xq(x , y) =
∂2f
∂x∂y
The t.d. test: p(x , y)dx + q(x , y)dy is a total differential when
∂p
∂y=∂q
∂x.
P1 2018-19 35 / 1
Example
♣ Example.Q: Show that there is NO function having continous second partialderivatives whose total differential is xydx + 2x2dy .
A: We know that p(x , y)dx + q(x , y)dy is a total differential iff
∂p
∂y=∂q
∂x.
Set p = xy and q = 2x2. Then
∂p
∂y= x 6= ∂q
∂x= 4x .
Clang.
P1 2018-19 36 / 1
Recovering the function from its total differential
Suppose we found p(x , y)dx + q(x , y)dy to be total differential.
Can we recover the function f ?
To recover f we must perform the reverse of partial differentiation.As ∂f /∂x = p(x , y):
f =
∫p(x , y)dx + g(y) + K1
where g is a function of y alone and K1 is a constant.
Similarly,
f =
∫q(x , y)dy + h(x) + K2
We now need to resolve the two expressions for f , and this is possible, upto a constant K , as the following example shows.
P1 2018-19 37 / 1
♣ Eg: f is xy3 + sin x sin y + 6y + 10 — but pretend we don’t know it.
Q: Is this a perfect differential, and if so of what function f (x , y)?
(y3 + cos x sin y)dx + (3xy2 + sin x cos y + 6)dy
A: Using the ∂p/∂y = ∂q/∂x test ...∂
∂y(y3 + cos x sin y) = 3y2 + cos x cos y
∂
∂x(3xy2 + sin x cos y + 6) = 3y2 + cos x cos y
SAME! so it is a perfect differential. Integrating and resolving:
From∂f /∂x : f = (y3x + sin x sin y) + + g(y) + K1l l l l
From∂f /∂y : f = (xy3 + sin x sin y) + h(x) + 6y + K2
Sof = xy3 + sin x sin y + 6y + K1 .
We’d need an extra piece of info to recover K1.
P1 2018-19 38 / 1
Round-up
The differentialdf =
∂f
∂xdx +
∂f
∂ydy
is the value through which a function changes as one moves infinitesimalamounts dx and dy in the x− and y−directions.
Given p(x , y)dx + q(x , y)dyTest whether: ∂p/∂y = ∂q/∂x . If good:Integrate p(x , y) wrt x , remembering g(y) is a const ofintegrationIntegrate q(x , y) wrt y , remembering h(x) is a const ofintegrationResolve the two expressions.
P1 2018-19 39 / 1
Summary
In this lecture we have1.1 Extended notions of Continuity and limits to functions of more than
one variable1.2 Defined Partial derivatives and discussed higher partial derivatives1.3 Been told in no uncertain terms that partial derivatives are not
fractions1.4 Introduced the total or perfect differential as the sum of partial
differentials
Please noteDerivatives are different from differentials.That δ is different from d is different from ∂. Use them properly!
P1 2018-19 40 / 1
2 Partial derivatives & function character
P1 2018-19 41 / 1
Lecture contents
In this lecture we develop a number of relationships which dependon the nature of the function of several variables.There is a danger that the various cases will become an unconnectedjumble.The key thing is to always ask the question
what is f a function of, exactlyand then to write only expressions that you know to be true in thatcase.
The topics are2.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.
P1 2018-19 42 / 1
2.1 A function of a function.f = f (u) where u = u(x , y).
P1 2018-19 43 / 1
Function of a function
Supposef (x , y) = xy sin(xy) .
We could find the partial derivatives in the usual way as(∂f
∂x
)= y sin(xy) + xy2 cos(xy)
(∂f
∂x
)= x sin(xy) + x2y cos(xy)
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.
When f = f (x , y) and u = u(x , y) is found such that f = f (u)
∂f
∂x=
dfdu∂u
∂xand
∂f
∂y=
dfdu∂u
∂y
P1 2018-19 44 / 1
Proof
We know that the total differentials of f (x , y) and u(x , y) are:
df =∂f
∂xdx +
∂f
∂ydy , and du =
∂u
∂xdx +
∂u
∂ydy .
We are allowed to take ratios of total differentials, so that
dfdu
=
∂f∂x dx + ∂f
∂y dy∂u∂x dx + ∂u
∂y dy.
But x and y are independent ⇒ dx and dy are independent.Taking y to be fixed: dy = 0 Taking x to be fixed: dx = 0
dfdu
=∂f∂x dx∂u∂x dx
=∂f
∂x
/∂u
∂x,
dfdu
=
∂f∂y dy∂u∂y dy
=∂f
∂y
/∂u
∂y.
The result quoted follows immediately.
P1 2018-19 45 / 1
♣ ExampleReminder:
∂f
∂x=
dfdu∂u
∂x,
∂f
∂y=
dfdu∂u
∂y
BTW don’t think that means that you dividing out the partial ∂x ’s and ∂y ’s.
Q: Find ∂f /∂x and ∂f /∂y when f = tan−1(y/x).
A: Set f = tan−1(u) with u = y/x . Then
dfdu
=1
(1+ u2)=
x2
x2 + y2
and∂u
∂x= −
y
x2 ;∂u
∂y=
1x
⇒∂f∂x
=dfdu∂u
∂x=
−y
x2 + y2 ;∂f
∂y=
dfdu∂u
∂y=
x
x2 + y2
P1 2018-19 46 / 1
♣ 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
∂2z
∂x2 =1c2∂2z
∂t2,
Write u = x − ct, so that z = f (u), and use the result just proved.
∂z
∂x=
dfdu
(∂u
∂x
)=
dfdu
(1) =dfdu
But df /du is also just a function of u — let’s say df /du = g(u). So ifwe differentiate wrt x again
∂2z
∂x2 =dgdu
(∂u
∂x
)=
dgdu
(1) =d2f
du2
P1 2018-19 47 / 1
Example ctd ...
Reminder: u = x − ct and z = f (u).Now repeat the exercise, but differentiating wrt t.
∂z
∂t=
dfdu
(∂u
∂t
)=
dfdu
(−c) = −cg(u) .
So if we differentiate wrt t again
∂2z
∂t2= −c
dgdu
(∂u
∂t
)= −c
dgdu
(−c) = c2 d2f
du2 .
Hence∂2z
∂x2 =d2f
du2 =1c2∂2z
∂t2
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 2018-19 48 / 1
2.2 Composite functions and the Chain Rule
There are various cases of composite functions, and we deal with them inturn.
This section will also introduce the chain rule, which you will use overand over again.
P1 2018-19 49 / 1
Composite Functions I:What if f = f (x , y) and x = x(t) and y = y(t)?
Function f is said to be a composite function.
Notice that f is effectively a function of t alone
⇒ total derivativedfdt
exists.
We can write the following chain rule:
Chain Rule: When f = f (x , y) and x = x(t) and y = y(t):
dfdt
=∂f
∂x
dxdt
+∂f
∂y
dydt
.
P1 2018-19 50 / 1
Proof
To prove this, write the total differential:
df =∂f
∂xdx +
∂f
∂ydy
Now we know that f , x and y are functions of t alone so the df /dt,dx/dt, and dy/dt all exist.
So, dividing by dt (which we are allowed to do as it is a total differential)
dfdt
=∂f
∂x
dxdt
+∂f
∂y
dydt
P1 2018-19 51 / 1
Composite functions I /ctd:What if f is f (x1, x2, x3, . . . , xn) with xi = xi(t)?
Again f must be a function of t alone, so df /dt exists.
The Chain Rule is
dfdt
=∂f
∂x1
dx1
dt+∂f
∂x2
dx2
dt+ . . . =
n∑i=1
∂f
∂xi
dxidt
.
The proof follows the previous pattern:
df =∂f
∂x1dx1 +
∂f
∂x2dx2 + . . .
then divide both sides by dt.
P1 2018-19 52 / 1
♣ ExampleQ: Find df /dt when
f = f (x , y , z) = xy + yz + zx ; and x = t, y = e−t , z = cos t
A: From the chain rule for composites
dfdt
=∂f
∂x
dxdt
+∂f
∂y
dydt
+∂f
∂z
dzdt
= (y + z)dxdt
+ (x + z)dydt
+ (x + y)dzdt
= (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.
You could & should check the result by explicit substitution.
(Note that you might find the direct method easier. Making things easieris not the point here — the point is finding general relationships thatapply between derivatives, both total and partial.)
P1 2018-19 53 / 1
Composite functions II:If f = f (x , y) and x = x(t1, t2, ...) & y = y(t1, t2, ...)
Similar to previous, but now f is effectively a function of several variablest1, t2, . . ..
Let’s fix all but one of the ti .
We would end up with a composite function as above ...... but now instead of total derivatives df /dt and dxi/dt we must havepartial derivatives ∂f /∂tj and ∂xi/∂tj
Thus
∂f
∂t1=
∂f
∂x
∂x
∂t1+∂f
∂y
∂y
∂t1∂f
∂t2=
∂f
∂x
∂x
∂t2+∂f
∂y
∂y
∂t2
and so on.
P1 2018-19 54 / 1
Composite functions II: chain rule for partials
We can now easily generalize this result to a functionf (x1, x2, x3, ..., xn) with xi = xi (t1, t2, ..., tm).
After chomping your way through the indices you should find that
The Chain Rule for Partials
∂f
∂tj=∂f
∂x1
∂x1
∂tj+∂f
∂x2
∂x2
∂tj+∂f
∂x3
∂x3
∂tj+ . . . : j = 1, . . . ,m.
It turns out that the chain rule for partials is very commonly used intransforming from one set of coordinates to another.
Here is one example, but we shall return to it again (and again).
P1 2018-19 55 / 1
♣ Example: Chain rule for partials
Q: x = r cosφ and y = r sinφ defines the transformation betweenCartesian and plane polar coordinates.Find ∂f /∂r and ∂f /∂φ when f (x , y) = x2 + y2.
A: Using the chain rule for partials:
∂f
∂r=∂f
∂x
∂x
∂r+∂f
∂y
∂y
∂r= 2x cosφ+ 2y sinφ
= 2r cos2φ+ 2r sin2φ = 2r∂f
∂φ=∂f
∂x
∂x
∂φ+∂f
∂y
∂y
∂φ= 2x(−r sinφ) + 2y(r cosφ)
= −2r2 cosφ sinφ+ 2r2 sinφ cosφ = 0 .
P1 2018-19 56 / 1
Direct checking
For x = r cosφ and y = r sinφ and f = x2 + y2 we just used the chainrule for partials to show that
∂f
∂r= 2r
∂f
∂φ= 0 .
This can be checked directly.f = x2 + y2, ⇒ f = r2 cos2φ+ r2 sin2φ = r2.Hence
∂f
∂r= 2r .
And because f has no dependence on the other variable φ, it is obviousthat
∂f
∂φ= 0 .
P1 2018-19 57 / 1
Composite functions III:What if f = f (x , y) and y = y(x)?
Clearly f is a composite function of x alone. So this is like t being x .
Effectively, x = x(x) — but one wouldn’t bother to write this down!
So,dfdt
=∂f
∂x
dxdt
+∂f
∂y
dydt
morphs intodfdx
=∂f
∂x
[dxdx
]+∂f
∂y
dydx
Ie,dfdx
=∂f
∂x+∂f
∂y
dydx
.
Note that this expression contains both total and partial derivates of fwrt x . They are different, and they can co-exist!
P1 2018-19 58 / 1
♣ Example: Composite Functions III
Reminder:dfdx
=∂f
∂x+∂f
∂y
dydx
.
Q: Suppose z = xy + x/y and y =√x . Find dz/dx .
A: Using the results just obtained,
dzdx
= y +1y+ x(1−
1y2 )
12x−1/2
= x1/2 + x−1/2 +12
(x1/2 − x−1/2
)=
32x1/2 +
12x−1/2
a result which can be checked directly in this case, using z = x3/2 + x1/2.
P1 2018-19 59 / 1
2.3 Implicit Functions in 2 variables
P1 2018-19 60 / 1
Implicit functionsIn calculus and analytic geometry it is common to see the equations ofplane curves written as
f (x , y) = 0.
For example the equation of a circle of radius√2 with centre at (0, 1) is
x2 + (y − 1)2 − 2 = 0
In this case it is easy to write an explicit expression for y
y = y(x) = 1± (2− x2)1/2
but often one cannot rearrange in this way.
But if we were to solve for y numerically we might trace out a curvey = y(x) which was single valued and differentiable.
In other words, f (x , y) = 0 may define function y = y(x) implicitly.
P1 2018-19 61 / 1
Implicit functions /ctd
Another way of seeing this is to think about independence andconstraints.
Writing f (x , y) might seem to involve two independent variables. But wehave written one constraint f (x , y) = 0, and this reduces the degrees offreedom from 2 to 1.
It turns out that for many purposes we don’t need an explicit expressionfor the function. It is enough to characterize the function by itsderivative.
So how do we compute the derivative dy/dx for a function y definedimplicitly by f (x , y) = 0?
P1 2018-19 62 / 1
Derivative of an implicit function
We saw that for f (x , y) with y = y(x),
dfdx
=∂f
∂x+∂f
∂y
dydx
.
But f (x , y) = 0 defines y = y(x) implicitly — so this result still holds!
In addition, we know that f = 0 always ⇒df /dx = 0 always.Hence
0 =∂f
∂x+∂f
∂y
dydx
⇒dydx
= −∂f /∂x
∂f /∂y.
P1 2018-19 63 / 1
♣ Example: Implicit functionsFirst consider an example where the implicit function can be derivedexplicitly. This gives us a check on our results.
Q: Find dy/dx when f (x , y) = x − x2y3 = 0.
A: Use the result for implicit functions just derived:
dydx
= −∂f /∂x
∂f /∂y= −
(1− 2xy3
−3x2y2
).
As a check, here we can find y explicitly as y = x−1/3. Hencedy/dx = −x−4/3/3.
Now substitute for y in the earlier result
dydx
= −
(1− 2xy3
−3x2y2
)= −
(1− 2xx−1
−3x2x−2/3
)= −
(−1
−3x4/3
)= −x−4/3/3 .
P1 2018-19 64 / 1
♣ Another Example: Implicit functionsBut remember! The whole point about implicit functions is that you donot need an explicit y = y(x) to get information about the derivatives.This is made clear in the next example.
Q: Find dy/dx when f (x , y) = ax2 + 2hxy + by2 + 2gx + 2fy + c = 0.
A: You may recognize f as a conic section — an ellipse or hyperbola,depending on the constants.
Now we can’t find y as a function of x , but using the result for implicitfunctions we have
dydx
= −∂f /∂x
∂f /∂y= −
2ax + 2hy + 2g2by + 2hx + 2f
.
P1 2018-19 65 / 1
2.4 Implicit Functions in more than 2 variables
This section goes a bit beyond the syllabus, but is helpful because it testsyour ability to think about functions and partial derivatives.
P1 2018-19 66 / 1
[**] Implicit functions in more variablesWith a function of two variables, one equation f (x , y) = 0 was sufficientto determine y = y(x).
Suppose now that we have functions of 3 variables. Now we require twosuch functions, say
f (x , y , z) = 0 g(x , y , z) = 0
to define y = y(x) and z = z(x) implicitly.
Now if we write down the chain rule, we have
dfdx
=∂f
∂x+∂f
∂y
dydx
+∂f
∂z
dzdx
= 0
anddgdx
=∂g
∂x+∂g
∂y
dydx
+∂g
∂z
dzdx
= 0 .
P1 2018-19 67 / 1
/ctd
These last equations
∂f
∂x+∂f
∂y
dydx
+∂f
∂z
dzdx
= 0
and∂g
∂x+∂g
∂y
dydx
+∂g
∂z
dzdx
= 0 .
are two simultaneous equations in dy/dx and dz/dx which can be solved
dydx
=
(∂f
∂z
∂g
∂x−∂f
∂x
∂g
∂z
)/
(∂f
∂y
∂g
∂z−∂f
∂z
∂g
∂y
)and
dzdx
=
(∂f
∂x
∂g
∂y−∂f
∂y
∂g
∂x
)/
(∂f
∂y
∂g
∂z−∂f
∂z
∂g
∂y
).
P1 2018-19 68 / 1
[**] ♣ ExampleTry 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.
A: fx = fy = fz = 1 and gx = 1, gy = −1 and gz = 2. Thus using thesimultaneous equations
dydx
= −13
anddzdx
= −23
In this case we can solve explicitly and check the result.
f + g = 2x + 3z = 0 ⇒ dz/dx = −2/32f − g = x + 3y = 0 ⇒ dy/dx = −1/3
So the result is verified.
P1 2018-19 69 / 1
[**] Partial diff & implicit functions
Rather than having 2 functions of 3 variables, we have only one, vizf (x , y , z) = 0. This defines z = z(x , y) implicitly.
Instead of a second implicit function, suppose we know a point(x0, y0, z0) which satisfies f (x0, y0, z0) = 0. Also suppose that near thispoint, f and its first partial derivatives are continuous and ∂f /∂z = 0.
An existence theorem states that in the region around (x0, y0) there isprecisely one differentiable function z(x , y) which satisfies f (x , y , z) = 0and is such that z0 = z(x0, y0).
P1 2018-19 70 / 1
Partial Differentiation and implicit functions /ctd
Suppose now we fix y at y = y0; then f (x , y0, z) = 0.
This constraint implicitly defines z = z(x) in the neighbourhood of x0.
So, with y fixed at y0 we have f (x , y0, z) = 0 and z = z(x).
We’ve seen that for f (x , y) = 0, y = y(x) that:dydx
= −∂f /∂x
∂f /∂y.
Rewrite this for z instead of y :dzdx
= −∂f /∂x
∂f /∂z.
Nearly right — but we have fixed y at y0, so that dz/dx should be apartial not a total derivative. Thus
∂z
∂x= −
∂f /∂x
∂f /∂z.
P1 2018-19 71 / 1
Differentiation of implicit functions /ctd
But our choice of x , y , z was arbitrary. So the general result is
For f = f (x1, x2, . . . , xn) = 0 provided certain conditions are met
∂xi∂xj
= −∂f /∂xj∂f /∂xi
P1 2018-19 72 / 1
♣ Example: Differentiation of implicit functions
Return to the perfect gas law — now written as f (p,V ,T ) = 0. Recallthat we asked the value of
∂p
∂V.∂V
∂T.∂T
∂p.
Using the result just obtained we could now write:
∂p
∂V.∂V
∂T.∂T
∂p=
[−∂f
∂V
/∂f
∂p
] [−∂f
∂T
/∂f
∂V
] [−∂f
∂p
/∂f
∂T
]= −1 .
Note this result is independent of the form the perfect gas law.
P1 2018-19 73 / 1
Summary
In this lecture we have considered partial differentiation in the context offunctions that have particular attributs.
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.
Next lecture: Changing variables ...... will use the Chain Rule for Partials over and over.
P1 2018-19 74 / 1
3 Changing variables and Jacobians
P1 2018-19 75 / 1
Lecture contents
3.1 Why should we wish to change variables?3.2 How to do it — four possible cases3.3 Jacobians3.4 Three standard transformations3.5 Good and bad transformations
P1 2018-19 76 / 1
3.1 Why should we want to change variables?
P1 2018-19 77 / 1
Why should we want to change variables?
The slope of the f (x , y) surface depends on the direction one moves in ...
... which is why the partial derivative is defined in terms of the change inthe function along a particular direction or axis, keeping the othervariables fixed.
For a function f (x , y), we’ve assumed that the obvious axes or directionsto choose are the x and y axes, keeping y and x fixed.
The question now isAre these always the obvious directions or axes?
P1 2018-19 78 / 1
For example ... consider the function
f (x , y) = e−(x2+y2) cos(4(x2+y2))
Does it make sense to impose asquare “x-constant, y -constant”cake-rack mesh onto thisfunction?
−4−2
02
4
−5
0
5−0.5
0
0.5
1
xy
f(x,y
)
It would be in more sympathy with the function to use a mesh with radialdartboard symmetry.
P1 2018-19 79 / 1
What we need to do ...
To effect this we need to make an appropriate transformation to a newset of variables.
This raises the questions ofé How to choose the new variables and thus describe the
transformation.
é How to describe the function in the new variables.
é How to find the partial derivatives with respect to these newvariables.
P1 2018-19 80 / 1
3.2 How to change variables
P1 2018-19 81 / 1
The general problem(a) shows a surface f (x , y) with lines of constant x and y underneath.The partial derivatives wrt x and y are found by slicing or moving alongthese directions.
(b) shows the exactly the same surface with lines of constant u and vunderneath. The partial derivatives wrt u and v are found by slicingalong these new directions.
f x( , y ) u( , v )F
(a) (b)
P1 2018-19 82 / 1
Choosing the new variables
There is no routine method for doing this, but usually the problemsymmetry drops very large hints as to the transformation you mightchoose.
Later on we will consider some of the most standard transformations
— between Cartesian Coordinates and+ Plane Polar Coordinates (2D): for radial symmetry+ Spherical Polar Coordinates (3D): for spherical symmetry, and+ Cylindrical Polars Coordinates (3D): for cylindrical symmetry.
We also consider working up a transformation from scratch.
P1 2018-19 83 / 1
Defining the transformation
Suppose we are transforming from (x , y) into a general set of newindependent variables (u, v).
There are two cases to consider:1: The straightforward case.
OLD variables in terms of NEW
x = x(u, v) and y = y(u, v) .
2: NEW variables in terms of OLD.
u = u(x , y) and v = v(x , y) .
(One’s first thought is that NEW in terms of OLD the better way ofdefining a transformation, but it turns out to be inconvenient!)
P1 2018-19 84 / 1
Case 1: OLD variables in terms of NEW
“Old in terms of new” is:
x = x(u, v) and y = y(u, v) .
Case 1A:If we know what the function f (x , y) is explicitly, we can replace x andy in the function to get the new function as
f = f (x(u, v), y(u, v)) = F (u, v) .
Then one can work out the partial derivatives with respect to u and vdirectly from the new function F (u, v).
P1 2018-19 85 / 1
♣ Example of Case 1A
Q: The function f = f (x , y) = x/y . Find ∂f /∂u and ∂f /∂v under thetransformation x = u and y = u/v .
A: Old in terms of new, and we know exactly what f (x , y) is.So we can use case 1A ...
f = F (u, v) =u
(u/v)= v
Hence∂f
∂u= 0
∂f
∂v= 1 .
P1 2018-19 86 / 1
Case 1: OLD variables in terms of NEW /ctd
Suppose we don’t have an explicit form for f (x , y), and, therefore,cannot find an explicit form for function F (u, v).
We can still derive the relevant partial derivatives using the Chain Rulefor partials.
Case 1B: Use the Chain Rule for partials
∂f
∂u=
∂f
∂x
∂x
∂u+∂f
∂y
∂y
∂u
∂f
∂v=
∂f
∂x
∂x
∂v+∂f
∂y
∂y
∂v
P1 2018-19 87 / 1
♣ Example of Case 1B
Q: Function f = f (x , y). Derive expressions for ∂f /∂u and ∂f /∂v underthe transformation x = u and y = u/v .
A: Given this transformation, we can write for any function f (x , y)
∂f
∂u=
(∂f
∂x
)(1) +
(∂f
∂y
)(1v
)=
(∂f
∂x
)+
(∂f
∂y
)(1v
)and
∂f
∂v=
(∂f
∂x
)(0) +
(∂f
∂y
)(−
u
v2
)=
(∂f
∂y
)(−
u
v2
)
That’s as far as one can go.
P1 2018-19 88 / 1
A source of confusion cleared up
The functions f (x , y) and F (u, v) work differently on their parameters,and so should have different names — here, f and F .
But notice that our statement of the chain rule for partials uses∂f /∂x with ∂f /∂y AND ∂f /∂u with ∂f /∂v .
You might complain that f is a function of (x , y) NOT (u, v), and so weshould have written ∂F/∂u and ∂F/∂v .
You are correct — but it not done in practice.
If you are worried, just imagine f = f (x , y) and f = F (u, v).
P1 2018-19 89 / 1
Case 2: NEW variables in terms of OLDWe are still transforming the function f = f (x , y) to (u, v) coordinates.But the transformation is given as “new in terms of old” variables:
u = u(x , y) and v = v(x , y) .
Bad news: New-in-terms-of-Old prevents us fromfinding F (u, v) directly; andfinding ∂x/∂u, etc, to populate the Chain Rule for Partials.
Good news: We can proceed in one of two ways.
Case 2A: Try to invert the transformationUse u = u(x , y) and v = v(x , y) as simultaneous equations from whichto find x = x(u, v) and y = y(u, v).
If you can invert, the problem becomes a Case 1 problem.
P1 2018-19 90 / 1
♣ Example of Case 2A
Q: Function f = f (x , y). Derive expressions for ∂f /∂u and ∂f /∂v underthe transformation
u = x and v = x/y .
A: Transformation is new in terms of old.Can we invert? Yes we can!Obvious that
x = u and ⇒v = u/y , ⇒ y = u/v .
We now have Old in terms of New, and can move to Case 1 above.
Is it Case 1A or 1B?
We don’t know what f (x , y) is exactly, so this is now Case 1B.
P1 2018-19 91 / 1
Case 2: NEW variables in terms of OLD /ctdHowever, many transformations cannot be inverted.Fortunately there is still a way of finding the partial derivatives.
Case 2B: When the transformation is not invertibleWrite down the Chain Rule for Partials the other way round!
∂f
∂x=
(∂f
∂u
)∂u
∂x+
(∂f
∂v
)∂v
∂x
∂f
∂y=
(∂f
∂u
)∂u
∂y+
(∂f
∂v
)∂v
∂y
These are simultaneous eqs in the unknown ∂f /∂u and ∂f /∂v :
∂f
∂u=
(∂f
∂x
∂v
∂y−∂f
∂y
∂v
∂x
)/(∂u
∂x
∂v
∂y−∂u
∂y
∂v
∂x
)∂f
∂v=
(∂f
∂y
∂u
∂x−∂f
∂x
∂u
∂y
)/(∂u
∂x
∂v
∂y−∂u
∂y
∂v
∂x
)
P1 2018-19 92 / 1
Summary
1. If transformation is OLD variables in terms of NEWEither* 1A. Find the function explicitly and find the partials from it directlyOr if you cannot* 1B. Find the partials using the Chain-rule-for-partials directly.
2. If the transformation is NEW variables in terms of OLDEither* 2A. Use the transformation as simultaneous equations for OLD vari-ables in terms of NEW and goto Case 1Or if you cannot* 2B. Use the Chain-rule-for-partials for the OLD variables to givesimultaneous equations for the partial derivatives with respect to to theNEW variables.
P1 2018-19 93 / 1
♣ Example #1
Q: A hill has elevation z(x , y) = e−(x2+y2).By transforming to (r ,φ) wherex = rcosφ, y = rsinφ,
derive the new function, andfind ∂z/∂r and ∂z/∂φ.
−4−2
02
4
−5
0
50
0.2
0.4
0.6
0.8
1
xy
f(x,y
)
A: Old in terms of new, and we know the function. ⇒ Case 1AThe hill is therefore
z = z(r ,φ) = e−r2 ⇒ ∂z
∂r= −2re−r2 and
∂z
∂φ= 0 .
The change of height is all in the radial direction. ∂z/∂φ = 0 means thatif you move at constant r (that is, “round” the hill) you will not changeheight at all.
P1 2018-19 94 / 1
♣ Example #2Q: Find the partial derivatives ∂f /∂u and ∂f /∂v when
f = f (x , y) = x2 − y2 and u = (x + y) v = (x − y) .
A: Transformation is new in terms of old. Hence Case 2.Can we invert the transformation? Yes! ⇒ Case 2A.Adding then subtracting:
x =12(u + v) y =
12(u − v) .
It’s now Case 1 and we know the function. ⇒ Case 1A
f = F (u, v) = x2 − y2 =14((u + v)2 − (u − v)2
)= uv
So∂f
∂u= v and
∂f
∂v= u
P1 2018-19 95 / 1
Using Case 1B instead ... If case *A works, case *B will also work.
Q: Same as before. Find ∂f /∂u and ∂f /∂v when
f = f (x , y) = x2 − y2 and u = (x + y) v = (x − y) .
A: Transformation is new in terms of old. Hence Case 2. Can we invertthe transformation? Yes! ⇒ Case 2A. Adding then subtracting:
x =12(u + v) y =
12(u − v) .
It’s now Case 1. Instead of Case 1A, use Case 1B ...
∂f
∂u=
∂f
∂x
∂x
∂u+∂f
∂y
∂y
∂u= (2x).
12+ (−2y).
12= x − y = v
∂f
∂v=
∂f
∂x
∂x
∂v+∂f
∂y
∂y
∂v= (2x).
12+ (−2y).
−12
= x + y = u
P1 2018-19 96 / 1
♣ Now use Case 2B, as if we could not invertu = (x + y) v = (x − y), but pretend we cannot invert ...
∂f
∂x=
(∂f
∂u
)∂u
∂x+
(∂f
∂v
)∂v
∂x
∂f
∂y=
(∂f
∂u
)∂u
∂y+
(∂f
∂v
)∂v
∂y
becomes
2x =
(∂f
∂u
)(1) +
(∂f
∂v
)(1)
−2y =
(∂f
∂u
)(1) +
(∂f
∂v
)(−1)
Adding gives
2x − 2y = 2(∂f
∂u
)⇒
(∂f
∂u
)= (x − y) = v ,
and subtracting gives
2x + 2y = 2(∂f
∂v
)⇒
(∂f
∂v
)= (x + y) = u .
♣ Example #3.Q: A quantity V = V (x , y) satisfies Laplace’s equation
∂2V
∂x2 +∂2V
∂y2 = 0 .
Express this equation in plane polar coordinates (r ,φ) where x = rcosφ,y = rsinφ.A: We want first to write down expressions for ∂V /∂x and ∂V /∂y whichwill involve ∂r/∂x , ∂r/∂y , ∂φ/∂x , and ∂φ/∂y . This is the wrong wayround for the transformation. So
Either invert the transformation (Case 2A), orWrite the CRfP the “other way round” (Case 2B) and use sim eqs.
Both will work, but let’s use 2B ...
∂V
∂r=
(∂V
∂x
)∂x
∂r+
(∂V
∂y
)∂y
∂r=
(∂V
∂x
)cosφ +
(∂V
∂y
)sinφ (1)
∂V
∂φ=
(∂V
∂x
)∂x
∂φ+
(∂V
∂y
)∂y
∂φ=
(∂V
∂x
)(−rsinφ) +
(∂V
∂y
)(rcosφ)(2)
Sorting out the simultaneous equations (do check!) gives
∂V
∂x= cosφ
∂V
∂r−
sinφr
∂V
∂φ(3)
∂V
∂y= sinφ
∂V
∂r+
cosφr
∂V
∂φ(4)
We can drop the V and consider ∂∂x as an operator
∂
∂x= cosφ
∂
∂r−
sinφr
∂
∂φ(5)
∂
∂y= sinφ
∂
∂r+
cosφr
∂
∂φ(6)
So the operator
∂2
∂x2 =
(cosφ
∂
∂r−
sinφr
∂
∂φ
)(cosφ
∂
∂r−
sinφr
∂
∂φ
)(7)
= cos2φ∂2
∂r2 − cosφsinφ[−
1r2∂
∂φ+
1r
∂2
∂φ∂r
](8)
−1rsinφ
[−sinφ
∂
∂r+ cosφ
∂2
∂φ∂r
]+
−sinφr
[−cosφr
∂
∂φ−
sinφr
∂2
∂φ2
]which can be tidied up a little. Note how the operators move through tothe right, operating as they go. Let’s follow through a couple of terms.The following is straightforward:(
cosφ∂
∂r
)(cosφ
∂
∂r
)= cos2φ
∂2
∂r2
but this requires the product rule(cosφ
∂
∂r
)(−sinφr
∂
∂φ
)= −cosφ sinφ
(−
1r2
)∂
∂φ−cosφ sinφ
(1r
)∂2
∂r∂φ
The tidied expression for y is (you should check!)
∂2
∂y2 = sinφ2 ∂2
∂r2 − cosφsinφ[2r2∂
∂φ−
1r
∂2
∂φ∂r
](9)
+1rcosφ
[cosφ
∂
∂r+ sinφ
∂2
∂φ∂r
]+
1r2 cosφ
2 ∂2
∂φ2 (10)
Adding them up:
∂2
∂x2 +∂2
∂y2 =
[∂2
∂r2 +1r
∂
∂r+
1r2∂2
∂φ2
].
So Laplace’s equation in plane polar coordinates is
∂2V
∂r2 +1r
∂V
∂r+
1r2∂2V
∂φ2 = 0.
P1 2018-19 97 / 1
3.3 Jacobians
P1 2018-19 98 / 1
JacobiansThe result of solving the simultaneous equations in 2B was
∂f
∂u=
(∂f
∂x
∂v
∂y−∂f
∂y
∂v
∂x
)/(∂u
∂x
∂v
∂y−∂u
∂y
∂v
∂x
)∂f
∂v=
(∂f
∂y
∂u
∂x−∂f
∂x
∂u
∂y
)/(∂u
∂x
∂v
∂y−∂u
∂y
∂v
∂x
)The denominator in these expressions has special significance — it iscalled the Jacobian.You can write the Jacobian as a determinant, but there is also anotheruseful notation:
J =
(∂u
∂x
∂v
∂y−∂v
∂x
∂u
∂y
)=
∣∣∣∣∣∣∂u∂x
∂v∂x
∂u∂y
∂v∂y
∣∣∣∣∣∣ = ∂(u, v)
∂(x , y)
The Jacobian’s modulus is used when changing variables in multipleintegrals.
P1 2018-19 99 / 1
Jacobians — don’t panic
In some books one reads that
∂(u, v)
∂(x , y)=
∣∣∣∣∣∣∂u∂x
∂v∂x
∂u∂y
∂v∂y
∣∣∣∣∣∣while in others
∂(u, v)
∂(x , y)=
∣∣∣∣∣∣∂u∂x
∂u∂y
∂v∂x
∂v∂y
∣∣∣∣∣∣This might cause panic, until you realize that they are identical!
However, perhaps the first way is to be preferred for reasons we see now.
P1 2018-19 100 / 1
Jacobians
In examples worked through later you will see that
∂(x , y)
∂(u, v)= 1/∂(u, v)
∂(x , y)
We shall gain an intuitive understanding of why this must be so when wecome to use Jacobians in multiple integration.
However it is quite easy to prove using the Jacobian matrix.
P1 2018-19 101 / 1
Jacobian Matrices
The Chain rule for partials says
∂f
∂u=∂f
∂x
∂x
∂u+∂f
∂y
∂y
∂u
∂f
∂v=∂f
∂x
∂x
∂v+∂f
∂y
∂y
∂v
or, switching the order in each product,
∂f
∂u=∂x
∂u
∂f
∂x+∂y
∂u
∂f
∂y
∂f
∂v=∂x
∂v
∂f
∂x+∂y
∂v
∂f
∂y
We can treat these as operator equations: in steps ...
∂
∂uf =
∂x
∂u
∂
∂xf +
∂y
∂u
∂
∂yf
∂
∂vf =
∂x
∂v
∂
∂xf +
∂y
∂v
∂
∂yf
⇒ ∂
∂uf ≡ ∂x
∂u
∂
∂xf +
∂y
∂u
∂
∂yf
∂
∂vf ≡ ∂x
∂v
∂
∂xf +
∂y
∂v
∂
∂yf
P1 2018-19 102 / 1
Jacobian MatricesIn matrix notation, this is[
∂/∂u∂/∂v
]=
[∂x/∂u ∂y/∂u∂x/∂v ∂y/∂v
] [∂/∂x∂/∂y
]=[J x ,y
u,v
] [∂/∂x∂/∂y
]The matrix
[J x ,y
u,v
]is a Jacobian matrix.
Now repeat with the Chain Rule around the other way ...[∂/∂x∂/∂y
]=
[∂u/∂x ∂v/∂x∂u/∂y ∂v/∂y
] [∂/∂u∂/∂v
]=[J u,v
x ,y
] [∂/∂u∂/∂v
]
So,[∂/∂u∂/∂v
]=[J x ,y
u,v
] [∂/∂x∂/∂y
]=[J x ,y
u,v
][J u,v
x ,y
] [∂/∂u∂/∂v
]⇒[J x ,y
u,v
][J u,v
x ,y
]= [I] ⇒
[J x ,y
u,v
]=[J u,v
x ,y
]−1
But a result from linear algebra tells us |J| = 1/|J−1|.
P1 2018-19 103 / 1
3.4 Three standard changes-of-variables -the polars
P1 2018-19 104 / 1
Three standard transformations
There are certain transformations which occur very frequently, viz
1. 2D Cartesian to plane polar coordinates2. 3D Cartesian to cylindrical polar coordinates3. 3D Cartesian to spherical polar coordinates
and you need to be familiar with these, and their geometry, and theirJacobians.
P1 2018-19 105 / 1
2D Cartesian to plane polarsThis is useful for problems with radialsymmetry in the plane. The transformation is
x = r cosφ, y = r sinφ
⇒∂x∂r
= cosφ;∂x
∂φ= −r sinφ;
∂y
∂r= sinφ;
∂y
∂φ= r cosφ
(r, ϕ )(x,y)
x
y
r
ϕ
Writing the Chain Rule for Partials in operator form gives
∂
∂r=
∂x
∂r
∂
∂x+∂y
∂r
∂
∂y= cosφ
∂
∂x+ sinφ
∂
∂y
∂
∂φ=
∂x
∂φ
∂
∂x+∂y
∂φ
∂
∂y= −r sinφ
∂
∂x+ r cosφ
∂
∂y.
Using these as simultaneous equations gives
∂
∂x=
(cosφ
∂
∂r−
sinφr
∂
∂φ
)and
∂
∂y=
(sinφ
∂
∂r+
cosφr
∂
∂φ
).
P1 2018-19 106 / 1
Cartesians to plane polars /ctdReminder ...
x = r cosφ, y = r sinφ
⇒∂x∂r
= cosφ;∂x
∂φ= −r sinφ;
∂y
∂r= sinφ;
∂y
∂φ= r cosφ
The Jacobian is
∂(x , y)
∂(r ,φ)=
∣∣∣∣∣∣∂x∂r
∂x∂φ
∂y∂r
∂y∂φ
∣∣∣∣∣∣ = r cos2φ+ r sin2φ = r .
and, as expected,
∂(r ,φ)
∂(x , y)=
∣∣∣∣∣∣∂r∂x
∂r∂y
∂φ∂x
∂φ∂y
∣∣∣∣∣∣ = (cosφ)(cosφr
) − (sinφ)(−sinφr
) =1r
.
P1 2018-19 107 / 1
3D Cartesian to cylindrical polars
Cylindrical polars add a z-axis,perpendicular to the plane,which is identical to theCartesian z-axis.
(r, ϕ(x,y,z) ,z)r
ϕ
y
x
z
x = r cosφ; y = r sinφ; z = z .
So
∂
∂r= cosφ
∂
∂x+ sinφ
∂
∂y;
∂
∂φ= −r sinφ
∂
∂x+ r cosφ
∂
∂y;
∂
∂z=∂
∂z
∂
∂x= cosφ
∂
∂r−
sinφr
∂
∂φ;
∂
∂y= sinφ
∂
∂r+
cosφr
∂
∂φ;
∂
∂z=∂
∂z
P1 2018-19 108 / 1
Cartesians to cylindrical polars
The Jacobian
∂(x , y , z)
∂(r ,φ, z)=
∣∣∣∣∣∣∣∣∂x∂r
∂x∂φ
∂x∂z
∂y∂r
∂y∂φ
∂y∂z
∂z∂r
∂z∂φ
∂z∂z
∣∣∣∣∣∣∣∣ =∣∣∣∣∣∣cosφ −r sinφ 0sinφ r cosφ 00 0 1
∣∣∣∣∣∣ = r ,
and
∂(r ,φ, z)
∂(x , y , z)=
∣∣∣∣∣∣∣∂r∂x
∂r∂y
∂r∂z
∂φ∂x
∂φ∂y
∂φ∂z
∂z∂x
∂z∂y
∂z∂z
∣∣∣∣∣∣∣ =1r
,
of which most entries can be copied over from plane polars.
P1 2018-19 109 / 1
Cartesian to spherical polars
(x,y,z) (r, θ, ϕ )
y
x
z
θ
r
ϕ
Polar angle
Azimuthal angleThe transformation involves the radius r of a sphere r2 = x2 + y2 + z2,the polar angle 0 6 θ 6 π and the azimuthal angle 0 6 φ 6 2π
x = r sin θ cosφ; y = r sin θ sinφ; z = r cos θ.
P1 2018-19 110 / 1
Cartesian to spherical polars
x = r sin θ cosφ; y = r sin θ sinφ; z = r cos θ
Hence
∂
∂r= sin θ cosφ
∂
∂x+ sin θ sinφ
∂
∂y+ cos θ
∂
∂z
∂
∂θ= r cos θ cosφ
∂
∂x+ r cos θ sinφ
∂
∂y− r sin θ
∂
∂z
∂
∂φ= −r sin θ sinφ
∂
∂x+ r sin θ cosφ
∂
∂y
and
∂
∂x= sin θ cosφ
∂
∂r+
1rcos θ cosφ
∂
∂θ−
sinφr sin θ
∂
∂φ
∂
∂y= sin θ sinφ
∂
∂r+
1rcos θ sinφ
∂
∂θ+
cosφr sin θ
∂
∂φ
∂
∂z= cos θ
∂
∂r−
sin θr
∂
∂θ
P1 2018-19 111 / 1
Cartesian to spherical polars
The Jacobian
∂(x , y , z)
∂(r , θ,φ)=
∣∣∣∣∣∣∣∂x∂r
∂x∂θ
∂x∂φ
∂y∂r
∂y∂θ
∂y∂φ
∂z∂r
∂z∂θ
∂z∂φ
∣∣∣∣∣∣∣=
∣∣∣∣∣∣sin θ cosφ r cos θ cosφ −r sin θ sinφsin θ cosφ r cos θ sinφ r sin θ cosφ
cos θ −r sin θ 0
∣∣∣∣∣∣= r2 sin θ
and as an exercise you should show that
∂(r , θ,φ)
∂(x , y , z)=
∣∣∣∣∣∣∣∂r∂x
∂r∂y
∂r∂z
∂θ∂x
∂θ∂y
∂θ∂z
∂φ∂x
∂φ∂y
∂φ∂z
∣∣∣∣∣∣∣ =1
r2 sin θ.
P1 2018-19 112 / 1
3.5 Good and bad transformations
For you to read later ...
P1 2018-19 113 / 1
A “good” transformation
Cylindrical and spherical polars are particularly useful when solvingproblems involving cylindrical and spherical regions. But what in generalmakes a “good” transformation.
If you were asked “what is the nicest region shape to fit into Cartesiancoordinates Oxy?” — you would answer a rectangle.
Similarly, if you drew your Ouv coordinate system at right angles andasked the same question, you would again answer a rectangle.
P1 2018-19 114 / 1
A “good” transformation
So given some arbitrary region shape in the xy plane, the best sort oftransformation is one which maps it onto a rectangle in the uv plane.
y
x u
v
y
x r
ϕ
a
π/2
a
P1 2018-19 115 / 1
A bad transformation
Another question is “will any transformation work?” The answer is no.
If we start with two (or n) independent variables (x , y), we must ensurethat the new two (or n) are also independent.
The test for this is simple. If u(x , y) and v(x , y) are functionallyindependent, then
∂(u, v)
∂(x , y)6= 0.
Recall that the Jacobian is the denominator in a relationship relatingpartial derivatives with respect to different sets of variables. Trouble isexpected if this is zero.
P1 2018-19 116 / 1
♣ Example: functional dependence
Q: A transformation is proposed from (x , y) to a new set of coordinates(u, v), given by
u = x2 + y + 1 and v = x4 + 2x2y + y2 + x2 − y .
Test whether there is a functional dependence between these variables.
A:
∂(u, v)
∂(x , y)= (uxvy − vxuy )
= (2x)(2x2 + 2y − 1) − (4x3 + 4xy + 2x)(1)= (4x3 + 4xy − 2x) − (4x3 + 4xy + 2x)= 0
It is not quite as easy to see that the dependence is v = u2 − 3u + 2.
P1 2018-19 117 / 1
Summary
In this lecture we been concerned partial differentiation under changingvariables
We considered:3.1 Why?3.2 How to, and the four cases3.3 Jacobians3.4 The polar family: plane, cylindrical and spherical3.5 How to test for a good transformation
Next lecture: Multiple integration ...
P1 2018-19 118 / 1
4 Multiple Integration
P1 2018-19 119 / 1
Lecture contents
In this lecture we are concerned with ...
4.1 Double Integrals as a template for Multiple Integration4.2 Changing variables in Double Integration4.3 Triple (and higher) integration4.4 Standard transformations revisited4.5 Physical definitions involving integration
P1 2018-19 120 / 1
4.1 Double Integration: a template for Multiple Integration
P1 2018-19 121 / 1
The integral for a single variableIn Calculus I we considered a function f (x) defined over some boundedregion R of x .We divided up R into n subregions, where δxi denotes the width of theith subregion.
if(x )
xi
δ
xi
x
Region R
Letting fi be the associated function value, the integral is the limit∫f (x)dx = lim
n→∞δxi→0
n∑i=1
fiδxi .
P1 2018-19 122 / 1
Double Integration
f (x , y) is defined in some bounded region R of the (x , y) plane. Let R bedivided up into n subregions, where δAi denotes the area of the ithsubregion.
Let fi be the function value associated with the ith subregion.
If the sum exists and is finite asn→∞ and δAi→0, then its limitis the double integral:∫∫
f (x , y)dA = limn→∞δAi→0
n∑i=1
fiδAi . Ad i
Functionsurface
f i
x
y
Region Rin x,y plane
Assume it is irrelevant how the region is subdivided and how the xi , yichosen. This is always true for a continuous function f (x , y).
P1 2018-19 123 / 1
♣ Example: Double Integration
Q: Consider a thin plate, whose surface density (mass per unit area) is afunction σ(x , y). What is the mass of region R of the plate?
A: The little bit of mass in area δA at (x , y) must be
δM = σ(x , y)δA
or in the limitdM = σ(x , y)dA
Hence the total mass is
M =
∫∫R
dM =
∫∫R
σ(x , y)dA .
The setting up of integrals in this way is important when solving appliedproblems.
P1 2018-19 124 / 1
Tiling the region
To progress we have to(i) define what dA is.(ii) define the region ofintegration.You can think of placingthe dA’s as generating atiling across the region.
x
y
Region inthe x,y plane
Tile dxdy in general position
In Cartesian coordinates, the xy plane is divided into a cake rack ofx-constant, y -constant lines. The tiles are rectangles, so that δA = δxδy ,and in the limit
dA = dxdy . Eg Mass =∫∫
R
σ(x , y)dxdy .
You start by placing a tile in general position — at an x , y value that isnot special in any way.
P1 2018-19 125 / 1
Summing tiles into strips
First sum the dxdy tiles into astrip parallel to the y -axis. Foreach strip this involves holding xconstant and summing up thelength along y from oneboundary intersection to theother.
in a stripSum over tiles
x
Region inthe x,y plane
x+dxx
y2(x)
y1(x)
In our example, the mass of the thin strip is
dMstrip =
[∫ y=y2(x)
y=y1(x)
σ(x , y)dy
]dx
Note carefully the that limits are functions of x .They change as x changes.
P1 2018-19 126 / 1
Summing strips into the regionThen sum the strip values up from smallest to largest x value.
Sum over stripsin the region
Region inthe x,y plane
x x1 2In our example, the total mass of the region is
Mass of region =
∫ x2x=x1
[∫ y=y2(x)
y=y1(x)
σ(x , y)dy
]dx
Note that during integration wrt x , the length of the strip variesautomatically as x changes because the inner limits are function of x .
P1 2018-19 127 / 1
Evaluating the integral
This is done in two stages, as a repeated integral.
First, consider the integral[∫y=y2(x)
y=y1(x)σ(x , y)dy
]. Because x is held
constant, simply treat it no differently from any other constant.
This yields some new function of (x , y) which is evaluated betweenthe limits y = y1(x) and y = y2(x) — in turn, giving some functionof x alone, g(x) say.
We then integrate the function g(x) over x and evaluate it betweenthe limits x1 and x2.
Thus the double integral is broken down into two single integrals.
P1 2018-19 128 / 1
♣ Example: Evaluating the integral
Q: Derive the area of the shadedtriangular region of thexy−plane by integration. 1
1 2
y
xy (x)
y (x)
1
2
A: Obviously the result should be 1 ...
A =
∫∫R
dA =
∫2
x=0
[∫ y=1
y=x/2dy]dx =
∫2
x=0
[1−
12x
]dx
=
[x −
14x2∣∣∣∣20= 2−
144 = 1
P1 2018-19 129 / 1
The order of integration does not matter
You can just as well sum tiles into strips along the x-direction, then sumstrips in the y -direction.You must take care to redefine the region.
x (y)2
1
1 2
y
x
1x (y)
A =
∫∫R
dA =
∫1
y=0
[∫ x=2y
x=0dx]dy =
∫1
y=02ydy
=[y2∣∣10 = 1
P1 2018-19 130 / 1
A standard recipe for success ...
1 Sketch the region of integration.
2 Draw the tile in general position
3 Think about limits as you build the tile in a strip, then the strip intothe region.
4 Think about the δ quantity associated with the tile.
5 Then write down the integral, and finally
6 Do it.
P1 2018-19 131 / 1
♣ Example: A standard recipe for success
Q: The mass per unit area of thethin triangular plate varies asσ(x , y) = k xy , where k is constant.Find the plate’s mass.Steps 1,2: Sketch & place tileStep 3: LimitsTile→strip: y goes from x/2→ 1Strip→region: x from 0→ 2.Step 4: delta quantity
dM = σ(x , y)dA = k xy dydx .
Step 5: Write down integral
M = k
∫ x=2
x=0x
[∫ y=1
y=x/2ydy
]dx .
1
1 2
y
xy (x)
y (x)
1
2
Step 6: Do it
M = k
∫ x=2
x=0x
[∫ y=1
y=x/2ydy
]dx
= k
∫ x=2
x=0x12
[1−
x2
4
]dx
=k
2
∫ x=2
x=0
[x −
x3
4
]dx
=k
2
[x2
2−
x4
16
∣∣∣∣20=
k
2
P1 2018-19 132 / 1
Complicated regions (a)For a continuous function it does not matter how you subdivide theregion.
But there are several types of complicated regions where care must betaken.
Suppose we wish to find the mass of aplate covering a region R comprised oftwo sub-regions with different densityfunctions.
σ 1 σ 2
R 1 R 2
Needs tworegions
Perform two separate double integrations and add up the results:∫∫R
σdA =
∫∫R1
σ1dA+
∫∫R2
σ2dA .
NB! σ1 and σ2 can be discontinuous at the boundary.
P1 2018-19 133 / 1
Complicated regions (b)
Regions must be split up if there are lines ofconstant x and/or constant y that cut theboundary more than twice.Integrals only have two limits!
R 1
R 2
Needs tworegions
Subdivide the region R into subregions not troubled by this shapeproblem, integrate over the subregions and then sum the results.
P1 2018-19 134 / 1
Complicated regions (c)
Sometimes the boundary is notdefined by a single function.
In the example shown, summingtiles into strips in the y directionwould be straightforward, as thetwo boundaries provide the lowerand upper limits.
However, summing tiles alongthe x-direction would requiresplitting the region into two. One region Needs two
regions
P1 2018-19 135 / 1
4.2 Change of variables in Double Integration
P1 2018-19 136 / 1
Change of variables in double integrals
The definition of the double integral involved a subdivision of the regioninto arbitrarily shapes tiles dAi .
Then, for a function f (x , y), it was noted that the obvious tiling haddA = dxdy .
However, often the shape and symmetry of a problem suggests a differenttiling or mesh, introduced by a transformation to a new set of variables.
x = x(u, v) ; y = y(u, v) .
Let us keep the function in xy space and consider the new tiling.
P1 2018-19 137 / 1
Change of variables in double integrals
x
y
x
y
The tiling is no longer one of straight lines of constant x separated by δxand constant y separated by δy ...
... but rather one of curves of constant u separated by δu and constant vseparated by δv .
Two key things to note are thatthese tiles are NOT rectangular, andthey do NOT have area dudv
.
P1 2018-19 138 / 1
Change of variables in double integrals
To transform the integral we require three things:1. The function value in (u, v) coordinates.2. The tile area3. The region defined in (u, v) space.
We look at these in turn.
1. A function value for each (u, v).This is obtained by substituting for x and y using x = x(u, v) andy = y(u, v). Thus
F (u, v) = f (x(u, v), y(u, v))
P1 2018-19 139 / 1
2. The area of the tile Best found using vector analysis ...
x
y
x
y
Consider the position vector r = x ı+ y and its total differential
dr = ıdx + dy =∂r∂u
du +∂r∂v
dv (Eq A)
The area associated with dr in the two systems is
dA = |ı× |dxdy =
∣∣∣∣ ∂r∂u × ∂r∂v
∣∣∣∣ dudvBut what are the vectors (∂r/∂u), etc?
P1 2018-19 140 / 1
Reminder ...
dr = ıdx + dy =∂r∂u
du +∂r∂v
dv (Eq A)
and we need to find ∂r/∂u and ∂r/∂v ...Use the total differentials
dx =∂x
∂udu +
∂x
∂vdv dy =
∂y
∂udu +
∂y
∂vdv
in (A)
dr = ı(∂x
∂udu +
∂x
∂vdv)+ (∂y
∂udu +
∂y
∂vdv)
=∂r∂u
du +∂r∂v
dv
then equate the coefficients of du and dv (they are independent!!)
∂r∂u
= ı∂x
∂u+ ∂y
∂u
∂r∂v
= ı∂x
∂v+ ∂y
∂v
P1 2018-19 141 / 1
Change of variables in double integralsReminder:
∂r∂u
= ı∂x
∂u+ ∂y
∂u
∂r∂v
= ı∂x
∂v+ ∂y
∂v
Now take the vector product
∂r∂u× ∂r∂v
=
(ı∂x
∂u+ ∂y
∂u
)×(ı∂x
∂v+ ∂y
∂v
)=
(∂x
∂u
∂y
∂v−∂x
∂v
∂y
∂u
)k
and hence the area is ...
dA =
∣∣∣∣∣(∂x
∂u
∂y
∂v−∂x
∂v
∂y
∂u
) ∣∣∣∣∣dudv .
But the | . . . | term is the modulus of the Jacobian!
Important result:
dA = dxdy = mod(∂(x , y)
∂(u, v)
)dudv .
P1 2018-19 142 / 1
Change of variables in double integrals
3. The region of integrationWe have to express the region R ′ in uv space using the limits ofintegration of u and v to exactly cover the physical region R previouslyexpressed in terms of x and y limits.
v
u
NB: we hope it is a rectangle in uv -space. (More later).
Specific examples will explain further.
P1 2018-19 143 / 1
♣ Example: Change of variables
Q: Use integration in Cartesians to find the area ofa semicircle of radius a shown
A:Steps 1,2: dxdy tile in general position x , y .Step 3: Integrate tiles into strips along yTiles→strips: −
√a2 − x2 6 y 6 +
√a2 − x2.
Strips→region: x ranges from 0 6 x 6 a.Step 4: dA = dxdyStep 5: So the integral is
A =
∫∫dA =
∫ x=a
x=0
∫ y=+√a2−x2
y=−√a2−x2
dydx =
∫ x=a
x=02√
a2 − x2dx .
Trig subst: eg x = a sin p and dx = cos p dp∫ x=a
x=02√a2 − x2dx = 2a2
∫π/2p=0
cos2 pdp =a2
2
∫π/2p=0
(1 + cos 2p)dp =a2π
2.
P1 2018-19 144 / 1
♣ Example: now in plane polarsTransformation is x = rcosφ, y = rsinφ.1. Function is f (x , y) = 1, ⇒F (r ,φ) = 1.2. MOD Jacobian.
∂x
∂r= Cφ,
∂x
∂φ= −rSφ,
∂y
∂r= Sφ,
∂y
∂φ= rCφ
⇒ mod∂(x , y)
∂(r ,φ)= |r cos2φ−(−r sin2φ)| = |r | = r .
⇒ dA = mod(∂(x , y)
∂(r ,φ)
)dr dφ = r dr dφ
3. Region. This is 0 6 r 6 a and −π/2 6 φ 6 π/2
So the new integral is entirely separable (←nice)
A =
∫+π/2φ=−π/2
∫ ar=0
r dr dφ =
∫+π/2φ=−π/2
dφ
∫ ar=0
r dr =12πa2.
P1 2018-19 145 / 1
♣ Example #2: Change of variablesQ: The number of dopant atoms per unit area in a flat semicircularsemiconducting wafer of radius a is α(x2 + y2)3/2. Determine theaverage dopant level per unit area.
A: We must work out the total number of atoms and divide by the area.Screaming out for plane polars!
Function: f (x , y) = α(x2 + y2)3/2 = αr3.
Mod Jacobian: as before, is r , ⇒dA = r dr dφ
Region: A rectangle 0 6 r 6 a, −π/2 6 φ 6 π/2.
⇒N = α
∫π/2φ=−π/2
∫ ar=0
r3 r dr dφ = απa5
5.
The average number per unit area is then
Na =N
πa2/2= α
2a3
5.
P1 2018-19 146 / 1
4.3 Triple integrals – more of the same really
P1 2018-19 147 / 1
Triple integrals: just continue the ideas ...Definition: The triple integral is defined as
∫∫∫R f (x , y , z)dV = lim
n→∞n∑
i=1
fiδVi
Volume element: In Cartesians, we can write dV = dxdydz andevaluate as a repeated integral.
Region of Integration: Defining the region of integration tends to beharder in 3D, but the plan is the same.
You place a volume element in general position (x , y , z), integrate theelement first into a “rod”, then integrate the rod into a lamina or “plate”,and finally integrate the plate into the complete volume.
Changing variables: One can also change variables, and again thepattern is exactly the same ... →
P1 2018-19 148 / 1
Triple integralsSuppose we wish and we wish to change to variables u, v ,w where
x = x(u, v ,w) y = y(u, v ,w) z = z(u, v ,w)
Transforming the integral involves1 Finding the new function by substitution
F (u, v ,w) = f (x(u, v ,w), y(u, v ,w), z(u, v ,w)) .
2 Finding the modulus of the Jacobian
mod∂(x , y , z)
∂(u, v ,w)= mod
∂x∂u
∂y∂u
∂z∂u
∂x∂v
∂y∂v
∂z∂v
∂x∂w
∂y∂w
∂z∂w
3 Defining the new region R ′
4 And doing the integral
I =
∫∫∫R′
F (u, v ,w)
∣∣∣∣ ∂(x , y , z)
∂(u, v ,w)
∣∣∣∣ dudvdw .
P1 2018-19 149 / 1
♣ Example #1Q: Find the mass of that part of the solid sphere x2 + y2 + z2 6 a whichoccupies the octant x > 0, y > 0, z > 0, and which has volume densityρ = ρ(x , y , z) = xyz .A: This is an obvious candidate for a transformation, but let’s set up theintegral first in Cartesian coordinates.
dM = ρ(x , y , z)dV ⇒ M =∫∫∫
Rxyz dxdydz .
Place the volume elementin general position(x , y , z), integrate into arod over x , with y and zconstant, then integrateover y into a plate, thenfinally over z .
Volume elementdxdydz
x
ymax
max
z
x
y
P1 2018-19 150 / 1
♣ Example #1Elemental cuboid intorod:Integrate into a rod alongx .
Variable x changes fromxmin = 0 to xmax =?
at which point we needto think hard!
Volume elementdxdydz
x
ymax
max
z
x
y
Note immediately that xmax 6= a.The extreme position for the volume element is on the surface of thesphere, so
x2max + y2 + z2 = a2
⇒xmax =√
a2 − y2 − z2
P1 2018-19 151 / 1
♣ Example #1Rod into plate:When integrating the rodalong y direction
y changes from y = 0
to ymax =?
Volume elementdxdydz
x
ymax
max
z
x
y
Note immediately that ymax 6= a.Rather
(x = 0)2 + y2max + z2 = a2
⇒ymax =√
a2 − z2
P1 2018-19 152 / 1
♣ Example #1Volume elementdxdydz
x
ymax
max
z
x
y
The plate is integrated over z going from 0 to a. Thus the mass is
M =
∫ az=0
z
∫√a2−z2
y=0y
∫√a2−y2−z2
x=0x dx dy dz
=12
∫ az=0
z
∫√a2−z2
y=0y[x2∣∣√a2−y2−z2
0 dy dz
=12
∫ az=0
z
∫√a2−z2
y=0y(a2 − y2 − z2) dy dz
P1 2018-19 153 / 1
♣ Example #1
M =12
∫ az=0
z
∫√a2−z2
y=0y(a2 − y2 − z2) dydz
=12
∫ az=0
z
∫√a2−z2
y=0y(a2 − z2) − y3 dydz
=12
∫ az=0
z
[y2
2(a2 − z2) −
y4
4
∣∣∣∣√a2−z2
y=0dz
=12
∫ az=0
z
[12(a2 − z2)2 −
14(a2 − z2)2
]dz
=18
∫ az=0
z(a2 − z2)2dz
P1 2018-19 154 / 1
♣ Example #1
M =18
∫ az=0
z(a2 − z2)2dz
=18
∫ az=0
za4 − 2z3a2 + z5dz
=18
[12z2a4 −
12z4a2 +
16z6∣∣∣∣az=0
=148
a6
We will return to perform this integral in spherical polar coordinates later.
P1 2018-19 155 / 1
Notice this general rule
The integral
M =
∫ az=0
∫√a2−z2
y=0
∫√a2−y2−z2
x=0xyz dx dy dz
provided a specific example of a more generally true thing ...
M =
∫h2
z=h1
∫g2(z)
y=g1(z)
∫ x=f2(y ,z)
x=f1(y ,z)
F (x , y , z) dx dy dz
c The limits of the first integration can be functions of the remainingtwo variables.
c The limits of the second integration can be functions of theremaining 1 variable.
c The limits of the last integration must be constants.
P1 2018-19 156 / 1
4.4 Standard transformations revisited
P1 2018-19 157 / 1
Standard transformations revisitedWe specialize the general theory to look at the shapes of the area andvolume elements generated by the standard transformations.
1. 2D Cartesian to plane polars.The Jacobian is r which is always positive so that its modulus is r .
Thus the area element is dA = r dr dφ.
d ϕ rd
d A =r d r d ϕ
ϕr
y
x
P1 2018-19 158 / 1
2. 3D Cartesian to cylindrical polars.
The Jacobian is r , and, as r > 0 so is the modulus of the Jacobian.
Thus the volume element is dV = rdrdφdz .
Note also that the volume element is dimensionally correct.
ϕd
r ϕd
ϕ
y
x
zr
d z
d r
P1 2018-19 159 / 1
3. 3D Cartesian to spherical polars
The Jacobian is r2 sin θ (see Lecture 3).
Now θ ranges from 0 to π, so that the Jacobian is always positive.
Thus the volume element is dV = r2 sin θ dr dθ dφ.
The volume element has sides:
* dr* rdθ* r sin θdφ,
generated by swinging thearm of length r sin θthrough the change inazimuthal angle dφ.
d ϕ
θdr
sinr θ dϕd r
r sin θ
x
θd
z
ϕ
θ
y
r
P1 2018-19 160 / 1
♣ Example, now in Spherical Polars
A: With region R being the positive octant,
M =∫∫∫
R x y z dxdydz
=∫∫∫
R(r sin θ cosφ)(r sin θ sinφ)(r cos θ) mod(∂(x , y , z)
∂(r , θ,φ)
)dr dθ dφ
=∫∫∫
R r3(sin2 θ cos θ)(sinφ cosφ)(r2 sin θ)dr dθ dφ
=∫∫∫
R r5(sin3 θ cos θ)(sinφ cosφ)dr dθ dφ
=
∫ ar=0
r5dr∫π/2θ=0
sin3 θ cos θdθ∫π/2φ=0
sinφ cosφdφ
=
[16r6∣∣∣∣ar=0
[14sin4 θ
∣∣∣∣π/2θ=0
[12sin2φ
∣∣∣∣π/2φ=0
=148
a6
P1 2018-19 161 / 1
Covering the regionThis happens automatically (if the limits are correct!!)but it is useful to be able to imagine in your head ...ORDER 1: First r , then θ, then φ
x
z
ϕ
θ
y
r
x
z
ϕ
r
θ
x
z
ϕ
r
θ
x
z
ORDER 2: First φ, then θ, then rEasier to imagine if you think about an entire sphere, then chop out theoctant ...... dV to a ring, ring to shell, then shell to sphere
ORDER 3: First φ, then r , then θ... DIY!... etc
P1 2018-19 162 / 1
4.5 Physical definitions involving integration
P1 2018-19 163 / 1
The definition of several integral properties
It is important to be able to set up integrals from first principles.
You should focus first on defining the the d(Quantity) first —
— the total quantity is then simply the integral over the region.
P1 2018-19 164 / 1
In 2D ...
Consider a lamina of uniform thickness and mass per unit area σ(x , y)occupying the region R in the xy−plane. Then
(1) Area is∫∫
R dxdy .
(2) Mass is∫∫
R σ(x , y)dxdy .
(3) Centroid x-coordinate is∫∫
xdxdy/∫∫
dxdy .
(4) Centre of mass x-coord is∫∫σ(x , y) x dxdy/
∫∫σ(x , y) dxdy .
(5) Moment of inertia about the y -axis is∫∫
R σ(x , y) x2dxdy .
(6) Polar moment of inertia about origin is∫∫
R σ(x , y) (x2 + y2)dxdy .
P1 2018-19 165 / 1
In 3D ... and in more detail ...
(1) Volume: dV = dxdydz ⇒ V =∫∫∫
R dxdydz
(2) Mass: Given a volume density function ρ(x , y , z),
dM = ρ(x , y , z) dxdydz ⇒ M =
∫∫∫ρ(x , y , z) dxdydz
(3) Centroid: Average value of x , y or z . For example
x =1V
∫∫∫R
x dxdydz
P1 2018-19 166 / 1
(4) Centre of Mass: This is the point (xCOM, yCOM, zCOM) at whichplacing the entire mass of a body gives the same moment or torque Γ asintegrating over the torque of the distributed mass.
z
y
dMx
Dealing with just xCOM, the contribution of an element of mass dM at(x , y , z) (ie, in general posn) to the torque about x = 0 is (assuming anacceleration g)
dΓ = x g dM ⇒ Γ = g
∫∫∫R
xdM = gxCOMM
⇒ xCOM =1M
∫∫∫R
xρ(x , y , z) dxdydz
P1 2018-19 167 / 1
(5) Moment of inertia about an axis:The value depends on the axis of rotation.
z
y
dMr
Supposing this to be the z-axis, the element of moment of inertia is
dJz = r2dM = (x2 + y2)dM
⇒ Jz =
∫∫∫R
(x2 + y2)ρ(x , y , z)dxdydz .
About x , the value is
Jx =
∫∫∫R
(y2 + z2)ρ(x , y , z)dxdydz .
P1 2018-19 168 / 1
4.7 More examples
P1 2018-19 169 / 1
♣ Example #2 Triple integrationQ: Compute the moment of inertia Jx aboutthe x-axis of the solid cylinder x2 + y2 6 a2
bounded by z = 0 and z = b. Assume uniformvolume density ρ.A: The moment of inertia of an elementdxdydz about the x-axis is
z
x
ba
dJx = ρ(y2 + z2)dxdydz ⇒Jx = ρ
∫∫∫R
(y2 + z2)dxdydz .
Geometry hints at cylindrical polars, x = rcosφ, y = rsinφ, z = z .Function: (y2 + z2) is (r2 sin2φ+ z2).Mod Jacobian: From earlier, r .Region: 0 6 r 6 a, 0 6 φ 6 2π and 0 6 z 6 b.
Jx = ρ
∫ ar=0
rdr
∫2π
φ=0dφ
∫bz=0
(r2 sin2φ+ z2)dz
= ρ
∫ ar=0
rdr
∫2π
φ=0(br2 sin2φ+ b3/3)dφ
P1 2018-19 170 / 1
♣ Example /ctdReminder ...
Jx = ρ
∫ ar=0
rdr
∫2π
φ=0dφ
∫bz=0
(r2 sin2φ+ z2)dz
= ρ
∫ ar=0
rdr
∫2π
φ=0(br2 sin2φ+ b3/3)dφ
Now ∫2π
0sin2φdφ =
12
∫2π
0(1− cos 2φ)dφ = π
so that
Jx = ρ
∫ ar=0
rdr(r2πb +b3
32π)
= ρ
[a4πb
4+
b32πa2
6
]= ρ
a2bπ
12(3a2 + 4b2).
P1 2018-19 171 / 1
♣ Example #3 Triple integration
Q: A spherical settling tank has radius a and, as shown in the diagram, isfilled to a depth 3a/2 with a fluid suspension whose volume density isρ0
a(3a/2− z) where z is measured upwards from the bottom of the tank.
Calculate the mass of fluid suspension in the tank.
r max
In general posnat r, ϕ ,z
r max
z
z=3a/2
z=0
a
az-a
a
A: The spherical tank pulls you towards spherical polars, but thedependence of the density on z alone should be enough to make yourealize that cylindrical polars are easier!
P1 2018-19 172 / 1
♣ Example #3 /ctd
r max
In general posnat r, ϕ ,z
r max
z
z=3a/2
z=0
a
az-a
a
So
dM =ρ0
a(3a/2− z)rdrdφdz ⇒ M =
ρ0
a
∫∫∫R
(3a/2− z)rdrdφdz .
Now think about the region and the limits this places on the integrals.
M =ρ0
a
∫ z=3a/2
z=0
∫φ=2π
φ=0
∫ r=rmax
r=0(3a/2− z)rdrdφdz
The only limit requiring thought is rmax. From the inset diagram it isobvious that
r2max = a2 − (z − a)2 = (2az − z2) .
P1 2018-19 173 / 1
♣ Example
M =ρ0
a
∫ z=3a/2
z=0(3a/2− z)
∫φ=2π
φ=0dφ
∫ r=√2az−z2
r=0rdr dz
= 2πρ0
a
∫ z=3a/2
z=0(3a/2− z)
12[r2∣∣√2az−z2
0 dz
=2π2ρ0
a
∫ z=3a/2
z=0(3a/2− z)(2az − z2)dz
= πρ0
a
∫ z=3a/2
z=0
[z3 −
7a2z2 + 3a2z
]dz
= πρ0
a
[14z4 −
7a6z3 +
3a2
2z2∣∣∣∣z=3a/2
z=0
= πρ09a4
[14
(9a2
4
)−
7a6
(3a2
)+
3a2
2
]= πρ0
9a3
4
[916
−74+
32
]= πρ0
9a3
4
[516
]= πρ0a
3[4564
]It is encouraging that this is (i) positive, and (ii) dimensionally correct.
P1 2018-19 174 / 1
If you have been ...
∫∫∫∫∫→ → ZZZZzz
Thanks for listening
P1 2018-19 175 / 1
4.8 Volumes from double integration
P1 2018-19 176 / 1
A volumes of revolutionA curve C encloses a region R lyingin the positive quadrant of the xyplane. It is rotated about the x-axis.It sweeps out a volume of revolution.
The dV created by rotation of anarea element dA about the x-axis is
dV = 2πydA .The total volume of revolution is thus:
V =∫∫
R2πydA =∫∫
R2πydxdy .
But the y coordinate of the centroid of the region R with area A
y =∫∫
Rydxdy/∫∫
Rdxdy =∫∫
Rydxdy/A
We arrive at the intuitive result that the total volume is
V = 2πyA
P1 2018-19 177 / 1
A volume under surface
Consider a surface z = f (x , y).
What is the volume enclosed bya region R on the x = y = 0plane as it “rises up” to hit thesurface?
The dV formed by an element ofarea dA = dxdy placed ingeneral position (x , y) on thex=y=0 plane is
dV = f (x , y)dA = f (x , y)dxdy
and so the total volume is simply
V =
∫∫R
f (x , y) dxdy .
P1 2018-19 178 / 1
♣ Example #4:
Q: Find the volume bounded by thecylinder x2 + y2 = 4 and the planesy + z = 4; z = −1.A: Place the volume element in generalposition, and integrate to a rod alongthe z-direction. Then integrate the rodover the circle:
V =
∫∫Circle
∫ z=4−y
z=−1dzdxdy =
∫∫Circle
(5− y)dxdy
=
∫2π
φ=0
∫2
r=0(5− r sinφ)rdrdφ =
∫2π
φ=0
[5r −
r2
2sinφ
∣∣∣∣r=2
r=0dφ
=
∫2π
φ=0[10− 2 sinφ] dφ = [10φ+ 2 cosφ|2π0 = 20π