0% found this document useful (0 votes)
60 views

P1 Calculus II: Partial Differentiation & Multiple Integration

The document discusses composite functions and the chain rule for partial derivatives. It begins by explaining that if f is a function of x and y, and x and y are functions of t, then the total derivative df/dt can be written as the sum of the partial derivatives with respect to x and y, multiplied by the derivatives of x and y with respect to t. This is known as the chain rule. It then generalizes the chain rule to the case where f is a function of multiple variables that are each functions of t. Finally, it provides an example of applying the chain rule to calculate the total derivative df/dt.

Uploaded by

harsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

P1 Calculus II: Partial Differentiation & Multiple Integration

The document discusses composite functions and the chain rule for partial derivatives. It begins by explaining that if f is a function of x and y, and x and y are functions of t, then the total derivative df/dt can be written as the sum of the partial derivatives with respect to x and y, multiplied by the derivatives of x and y with respect to t. This is known as the chain rule. It then generalizes the chain rule to the case where f is a function of multiple variables that are each functions of t. Finally, it provides an example of applying the chain rule to calculate the total derivative df/dt.

Uploaded by

harsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

P1 2017 1 / 35

P1 Calculus II

Partial Differentiation & Multiple Integration

Prof David Murray

david.murray@eng.ox.ac.uk
www.robots.ox.ac.uk/∼dwm/Courses/1PD

4 lectures, MT 2017
P1 2017 2 / 35

2 Partial derivatives & function character


P1 2017 3 / 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.

The topics are


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.
P1 2017 4 / 35

2.1 A function of a function.


f = f (u) where u = u(x, y ).
P1 2017 5 / 35

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.

When f = f (x, y ) and u = u(x, y ) is found such that f = f (u)

∂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

We are allowed to take ratios of total differentials, so that


∂f ∂f
df ∂x dx + ∂y dy
= ∂u ∂u
.
du ∂x dx + ∂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
∂f ∂f
∂x dx ∂y dy
 
df ∂f ∂u df ∂f ∂u
= ∂u = , = ∂u = .
du ∂x dx ∂x ∂x du ∂y dy ∂y ∂y

The result quoted follows immediately.


P1 2017 7 / 35

♣ 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.

Q: Find ∂f /∂x and ∂f /∂y when f = tan−1 (y /x).

A: Set f = tan−1 (u) with u = y /x. Then

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

But df /du is also just a function of u — let’s say df /du = g (u). So if


we differentiate wrt x again

∂2 z d2 f
 
dg ∂u dg
= = (1) =
∂x 2 du ∂x du du 2
P1 2017 9 / 35

Example ctd ...


Reminder: u = x − ct and z = f (u).
Now repeat the exercise, but differentiating wrt t.
 
∂z df ∂u df
= = (−c) = −cg (u) .
∂t du ∂t du

So if we differentiate wrt t again

∂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

2.2 Composite functions and the Chain Rule

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)?

Function f is said to be a composite function.

Notice that f is effectively a function of t alone

df
⇒ total exists.
dt

We can write the following chain rule:


Chain Rule: When f = f (x, y ) and x = x(t) and y = y (t):

df ∂f dx ∂f dy
= + .
dt ∂x dt ∂y dt
P1 2017 12 / 35

Proof

To prove this, write the total differential:

∂f ∂f
df = dx + dy
∂x ∂y

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)

df ∂f dx ∂f dy
= +
dt ∂x dt ∂y dt
P1 2017 13 / 35

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

df ∂f dx1 ∂f dx2 X ∂f dxin


= + + ... = .
dt ∂x1 dt ∂x2 dt ∂xi dt
i=1

The proof follows the previous pattern:

∂f ∂f
df = dx1 + dx2 + . . .
∂x1 ∂x2
then divide both sides by dt.
P1 2017 14 / 35

♣ Example
Q: 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

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.

You could & should check the result by explicit substitution.


(Note that you might find the direct method easier. Making things easier
is not the point here — the point is finding general relationships that
apply between derivatives, both total and partial.)
P1 2017 15 / 35

Composite functions II:


If z = f (x, y ) and x = x(t1 , t2 , ...) & y = y (t1 , t2 , ...)
Similar to previous, but now f is effectively a function of several variables
t1 , 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 have
partial derivatives ∂f /∂tj and ∂xi /∂tj

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

Composite functions II: chain rule for partials

We can now easily generalize this result to a function


f (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 ∂f ∂x1 ∂f ∂x2 ∂f ∂x3
= + + + . . . : j = 1, . . . , m.
∂tj ∂x1 ∂tj ∂x2 ∂tj ∂x3 ∂tj

It turns out that the chain rule for partials is very commonly used in
transforming from one set of coordinates to another.

Here is one example, but we shall return to it again (and again).


P1 2017 17 / 35

♣ Example: Chain rule for partials

Q: x = r cos φ and y = r sin φ defines the transformation between


Cartesian and plane polar coordinates.
Find ∂f /∂r and ∂f /∂φ when f (x, y ) = x 2 + y 2 .

A: Using the chain rule for partials:

∂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 ∂φ

This can be checked directly.


f = x 2 + y 2 , ⇒ f = r 2 cos2 φ + r 2 sin2 φ = r 2 .
Hence
∂f
= 2r .
∂r
And because f has no dependence on the other variable φ, it is obvious
that
∂f
=0.
∂φ
P1 2017 19 / 35

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,
df ∂f dx ∂f dy
= +
dt ∂x dt ∂y dt
morphs into  
df ∂f dx ∂f dy
= +
dx ∂x dx ∂y dx
Ie,
df ∂f ∂f dy
= + .
dx ∂x ∂y dx
Note that this expression contains both total and partial derivates of f
wrt x. They are different, and they can co-exist!
P1 2017 20 / 35

♣ Example: Composite Functions III


Reminder:
df ∂f ∂f dy
= + .
dx ∂x ∂y dx

Q: Suppose z = xy + x/y and y = x. Find dz/dx.

A: Using the results just obtained,

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

2.3 Implicit Functions in 2 variables


P1 2017 22 / 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

In this case it is easy to write an explicit expression for y

y = y (x) = 1 ± (2 − x 2 )1/2

but often one cannot rearrange in this way.


But if we were to solve for y numerically we might trace out a curve
y = y (x) which was single valued and differentiable.
In other words, f (x, y ) = 0 may define function y = y (x) implicitly.
P1 2017 23 / 35

Implicit functions /ctd

Another way of seeing this is to think about independence and


constraints.

Writing f (x, y ) might seem to involve two independent variables. But we


have written one constraint f (x, y ) = 0, and this reduces the degrees of
freedom from 2 to 1.

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.

So how do we compute the derivative dy /dx for a function y defined


implicitly by f (x, y ) = 0?
P1 2017 24 / 35

Derivative of an implicit function


We saw that for f (x, y ) with y = y (x),

df ∂f ∂f dy
= + .
dx ∂x ∂y dx

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
∂f ∂f dy
0 = +
∂x ∂y dx
dy ∂f /∂x
⇒ = − .
dx ∂f /∂y
P1 2017 25 / 35

♣ Example: Implicit functions


First consider an example where the implicit function can be derived
explicitly. This gives us a check on our results.

Q: Find dy /dx when f (x, y ) = x − x 2 y 3 = 0.

A: Use the result for implicit functions just derived:

1 − 2xy 3
 
dy ∂f /∂x
=− =− .
dx ∂f /∂y −3x 2 y 2

As a check, here we can find y explicitly as y = x −1/3 . Hence


dy /dx = −x −4/3 /3.

Now substitute for y in the earlier result

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

♣ Another Example: Implicit functions


But remember! The whole point about implicit functions is that you do
not 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 ) = ax 2 + 2hxy + by 2 + 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 implicit
functions we have
dy ∂f /∂x 2ax + 2hy + 2g
=− =− .
dx ∂f /∂y 2by + 2hx + 2f
P1 2017 27 / 35

2.4 Implicit Functions in more than 2 variables

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

[**] Implicit functions in more variables


With a function of two variables, one equation f (x, y ) = 0 was sufficient
to determine y = y (x).

Suppose now that we have functions of 3 variables. Now we require two


such 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


df ∂f ∂f dy ∂f dz
= + + =0
dx ∂x ∂y dx ∂z dx

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.

A: fx = fy = fz = 1 and gx = 1, gy = −1 and gz = 2. Thus using the


simultaneous equations

dy 1 dz 2
= − and =−
dx 3 dx 3

In this case we can solve explicitly and check the result.

f + g = 2x + 3z = 0 ⇒ dz/dx = −2/3
2f − g = x + 3y = 0 ⇒ dy /dx = −1/3

So the result is verified.


P1 2017 31 / 35

[**] Partial diff & implicit functions

Rather than having 2 functions of 3 variables, we have only one, viz


f (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 this
point, f and its first partial derivatives are continuous and ∂f /∂z = 0.

An existence theorem states that in the region around (x0 , y0 ) there is


precisely one differentiable function z(x, y ) which satisfies f (x, y , z) = 0
and is such that z0 = z(x0 , y0 ).
P1 2017 32 / 35

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).

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

Nearly right — but we have fixed y at y0 , so that dz/dx should be a


partial not a total derivative. Thus

∂z ∂f /∂x
=− .
∂x ∂f /∂z
P1 2017 33 / 35

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 ∂f /∂xj
=−
∂xj ∂f /∂xi
P1 2017 34 / 35

♣ Example: Differentiation of implicit functions

Return to the perfect gas law — now written as f (p, V , T ) = 0. Recall


that we asked the value of
∂p ∂V ∂T
. . .
∂V ∂T ∂p

Using the result just obtained we could now write:


      
∂p ∂V ∂T ∂f ∂f ∂f ∂f ∂f ∂f
. . = − − −
∂V ∂T ∂p ∂V ∂p ∂T ∂V ∂p ∂T
= −1 .

Note this result is independent of the form the perfect gas law.
P1 2017 35 / 35

Summary

In this lecture we have considered partial differentiation in the context of


functions 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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy