You are on page 1of 8

1

Partial Dierentiation

Let z = f (x, y) be a real valued function of two independent variables, x and y.


We dene the partial derivative of f with respect to (wrt) x as:
[

f (x + x, y) f (x, y)
f
= lim
x0
x
x

where in this limit y is assumed to have a xed value.


Similarly, we dene the partial derivative of f wrt y as
[

f
f (x, y + y) f (x, y)
= lim
y y0
y

where, this time, x is assumed to have a xed value.


Example 1.1
Find f /x and f /y for f (x, y) = x3 + y 2 .
Solution 1.1
f
f
= 3x2 ,
= 2y
x
y
Example 1.2
Find f /x and f /y for f (x, y) = x tan1 y + x3 y + y 3/2 .
Solution 1.2

f
= tan1 y + 3x2 y
x
f
x
3
=
+ x3 + y 1/2
2
y
1+y
2
Note: All the standard rules of ordinary dierentiation (eg product rule, quotient rule etc) apply
unchanged.
Example 1.3
If f (x, y) = ey ln(x + y) then nd f /y.
Solution 1.3
f
ey
y
= e ln(x + y) +
y
x+y

r
y

x
Figure 1:

Example 1.4
Consider the transformation to plane-polar coordinates: From Fig. 1, we have
x = r cos ,

y = r sin

r 2 = x2 + y 2 ,

tan =

y
x

We could, for example, write x as a function of (r, ), (r, y) or (, y):

x = r cos , x =

r2 y 2 , x = y cot

From these we can compute the following partial derivatives in turn:


x
x
r
x
r
= cos ,
= 2
= cot
= = sec ,
2
r
r
x
y
r y
Note: When computing any partial derivative, all the independent variables in the expression
being dierentiated - except the one in the dierentiation - are assumed to be held constant!!
Question: Why do we get two dierent results for x/r above? Well, in the rst case is
being held constant, and in the second case, y is being held constant.

1.1

Higher Order Derivatives

We mean, for example,

f
x

2f
x2

f
2f
=
y y
y 2
(
)
f
2f
=
x y
xy
(
)
f
2f
=
y x
yx
Example 1.5

f (x, y) = x3 + y 2
f
2f
= 3x2 ,
= 6x
x
x2
f
2f
= 2y,
=2
y
y 2
2f

=
(2y) = 0
xy
x
2f
( 2)
=
3x = 0
yx
y
Example 1.6

f (x, y) = x tan1 y + x3 y + y 3/2


f
f
x
3
= tan1 y + 3x2 y,
=
+ x3 + y 1/2
2
x
y
1+y
2
2
2
f
f
2xy
3
= 6xy,
=
+ y 1/2
2
2
2
2
x
y
(1 + y )
4
2
2
f
1
f
1
=
+ 3x2 ,
=
+ 3x2
2
yx
1+y
xy
1 + y2
Note: For all well-behaved functions, then
2f
2f
=
xy
yx
can be assumed true - all functions considered on this course are well-behaved.
Example 1.7
Given f (x, y) = x2 tan1 (y/x) nd fxy at (1, 1).
Solution 1.7

Note that fxy is short notation for 2 f /xy.


f
y

Hence

( )

1
y
= x
1 + (y/x)2 y x
x4 1
x3
= 2
=
x + y2 x
x2 + y 2
2

2f
=
xy
x

f
y

3x2
2x4

x2 + y 2 (x2 + y 2 )2

Thus, at (1, 1), we nd


2f
3 2
= =1
xy
2 4

1.2

Notes

A common notation is dened as follows:


f
f
2f
2f
fx
, fy =
, fxx =
,
f
=
, etc
xy
x
y
x2
xy
Partial dierentiation can be extended to functions of more than two variables in a natural way.
Example 1.8
Suppose f (x, y, z) = x3 + x2 z 4 + xy 5 , then
f
f
f
= 3x2 + 2xz 4 + y 5 ,
= 5xy 4 ,
= 4x2 z 3
x
y
z

1.3

The Ordinary Chain Rule

The ordinary chain rule can be stated as follows: If y = f (x) where x = g(t) then
dy
dy dx
=
dt
dx dt

1.4

The Generalized Chain Rule

The ordinary chain rule extends in an obvious way to functions of two or more variables.
Thus, if z = f (x, y) where x = g(t) and y = h(t) then
dz
z dx z dy
=
+
dt
x dt
y dt
Example 1.9
Thus, if z = sin(xy 2 ) where x = et and y = t3 then
z dx z dy
dz
=
+
dt
x dt
y dt
2
2 t
= y cos(xy )e + 2xy cos(xy 2 )3t2
= t6 cos(t6 et )et + 6et t5 cos(t6 et )
= (t + 6)t5 et cos(t6 et )
4

1.5

A Special Case of the Generalized Chain Rule

For the general case, the problem is: if z = f (x, y) where x g(t) and y h(t) then nd dz/dt,
and the solution is:
z dx z dy
dz
=
+
dt
x dt
y dt
Now suppose that x = t: then the problem becomes: if z = f (x, y) where y h(x), then nd
dz/dx, and the solution is:
dz
z z dy
=
+
dx
x y dx
Example 1.10
If z = x2 y + 1/y and y = ln x then nd dz/dx.
Solution
(

dz
1
= 2xy + x2 2
dx
y

1.6

1
1
= 2xy + x 2
x
xy

Implicit Dierentiation

A further application of the above is to nd dy/dx when y is dened as an implicit function of


x: That is, nd dy/dx when f (x, y) = 0. In this case, we write z f (x, y) so that, rstly
dz
z z dy
=
+
dx
x y dx
and then we note that, since z = 0 then we must have dz/dx = 0 also so that the above gives
directly:
(
) (
)
dy
f
f
=
/
dx
x
y
Example 1.11
Given f (x, y) x2 + 3xy + 4y 2 = 0 nd dy/dx.
Solution
dy
= (2x + 3y)/(3x + 8y).
dx

1.7

Small Error Estimates

The total derivative formula can be used to estimate errors in calculations: Clearly, if z z(x, y)
then
z
z
x +
y
(1)
z
x
y
where x and y are small changes (which can be errors) in x and y, and z is the corresponding
change (or error) in z.
Example 1.12
The value of z is to be calculated from
z=

xy

for x = 4 and y = 9 and where the corresponding errors in x and y are 0.1 and 0.2 respectively.
What is the corresponding maximum modulus for the error in z?
Solution
We have
z
1
=
x
2

y
3
= ,
x
4

z
1
=
y
2

x
1
=
y
3

Consequently, (1) gives


3
1
x + y
4
3
3
1
|z | | x + y|
4
3
1
3
1
3
|x | + |y | = (0.1) + (0.2) 0.14
|z |
4
3
4
3
z

That is, |z | 0.14.


Notes:
We have used |a + b| |a| + |b|.
The three-variable extension is
f =

f
f
f
x +
y +
z
x
y
z

The chain-rule is mainly used when we change form one independent variable to another as in coordinate transormation:
Example 1.13
If f f (x, y) and x = re and y = re then show that
f
f
f
= r
+
x
r

f
f
f
2y
= r

y
r

2x

Solution

f
r

f x f y
f
f
+
= e
+ e
x r
y r
x
y

f
r

= x

f
f
+y
x
y

(2)

Similarly
f

f x f y
f
f
+
= re
re
x
y
x
y

= x

f
f
y
x
y

(3)

Adding and subtracting (2) and (3) gives, respectively:


f
f
f
= r
+
x
r

f
f
f
2y
= r

y
r

2x

Alternative Solution
We could have rearranged x = re and y = re as
x
y

( )

= e2

x
1
= ln
2
y

xy = r2 r = (xy)1/2
and then used the relations

f
f r f
=
+
x
r x x

etc.
Example 1.14
By putting u = xy and v = x2 /y show that the partial dierential equation
x

z
z
+ 2y
= 3x3 cos(xy)
x
y

can be written in the form

z
= v cos u.
u
Hence, nd the general solution of the equation.
7

Solution
We have
z u z v
z
=
+
x
u x v x
z 2x z
= y
+
u
y v

z
z 2x2 z
z
z
x
= xy
+
=u
+ 2v
x
u
y v
u
v
Similarly,
z
z u z v
=
+
y
u y v y
z x2 z
= x

u y 2 v

z
z 2x2 z
z
z
2y
= 2xy

= 2u
2v
y
u
y v
u
v
Adding these together gives, nally,
x

z
z
z
+ 2y
= 3u
= 3x3 cos(xy)
x
y
u

z
3u
= 3uv cos u
u

z
= v cos u.
u

This pde can now be solved as follows: Integrate wrt to u:


z = v sin u + f (v)

( )
x2
x2
z(x, y) =
sin(xy) + f
y
y

You might also like