0% found this document useful (0 votes)
48 views24 pages

Chap2 3

This document discusses differentiation of functions of several variables. It introduces partial derivatives, which define the rate of change of a multi-variable function in a single variable direction, keeping others fixed. It also discusses total differentials, which quantify the total change in a function given small changes in all variables. Finally, it proves that differentiability of a function implies continuity and existence of all partial derivatives at that point, and introduces the chain rule for composite multi-variable functions.

Uploaded by

Jane Ndinda
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)
48 views24 pages

Chap2 3

This document discusses differentiation of functions of several variables. It introduces partial derivatives, which define the rate of change of a multi-variable function in a single variable direction, keeping others fixed. It also discusses total differentials, which quantify the total change in a function given small changes in all variables. Finally, it proves that differentiability of a function implies continuity and existence of all partial derivatives at that point, and introduces the chain rule for composite multi-variable functions.

Uploaded by

Jane Ndinda
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/ 24

Chapter 2

Di↵erentiation of functions of several


variables

In this chapter we will be looking at how one can di↵erentiate a function of several variables
on the domain where it is defined.

2.1 Partial derivatives


From the previous section we can see that it is fairly easy to extend the idea about continuity
to functions of several variables. This is not the case with the definition of the derivative.
Remember that for functions of one variable, the derivative at a point defines a slope of the
function at that point. Since here we are dealing with functions of several variables, the
”slope” of f (x, y) surface at (x, y) depends on the direction we want to move in (such as x- and
y-directions). If we want to move o↵ from (x, y) in the x-direction, we have to keep y fixed.
This will define the partial derivative of the function f with respect to x:

@f f (x + x, y) f (x, y)
= fx = lim .
@x x!0 x

Let consider a general case. Suppose function f is defined in some neighbourhood of point x0 2
Rn , f (x) = f (x1 , x2 , ..., xn ). If we fix all variables but one, i.e. let x2 = x02 , x3 = x03 , ..., xn = x0n ,
then we obtain a function of one variable f (x1 , x02 , x03 , ..., x0n ). If this function has a derivative
at a point x0 , then this derivative is called a partial derivative of function f in x1 variable at a
point x0 , and is usually denoted as
@f 0
(x ), fx0 1 (x0 ) or fx1 (x0 ),
@x1
i.e.
@f 0 @f
(x , ..., x0n ) = (x1 , ..., x0n ) .
@x1 1 @x1 x1 =x01

A partial derivative fx1 (x0 ) defines a rate of change of function f at the point x0 in the x1
direction, and partial derivatives are evaluated following the same rules as for functions of one
variable.

15
Calculus of Several Variables (G5210) 2018-19 Lecture notes

Example: Let f (x, y) = xy . Find fx and fy .

Solution. We have
@f
fx = = yxy 1 ,
@x
and
@f
fy = = xy ln x.
@y

(x2 +y 2 )
Example: Let f (x, y) = e sin(xy 2 ). Find fx and fy .

Solution. We have
@f (x2 +y 2 ) (x2 +y 2 )
fx = = 2xe sin(xy 2 ) + y 2 e cos(xy 2 ),
@x
and
@f (x2 +y 2 ) (x2 +y 2 )
fy = = 2ye sin(xy 2 ) + 2xye cos(xy 2 ).
@y

Example: If f (x, y) = ln(xy), find an expression for fx fy in terms of f .

Solution. We know that f (x, y) = ln(x) + ln(y). Therefore,


1 1
fx = and fy = .
x y
Therefore,
1 f (x,y)
fx fy = =e .
xy

2.2 Total and partial di↵erentials


Before starting this section, it is worth noting that a di↵erential is not a derivative. Di↵erentials
are about the following. Suppose we have a continuous function f (x, y) in some region, and
both fx and fy are continuous in that region. Now, suppose we move very small amounts x
and y in x- and y-directions. How much does the value of the function change? The amount,
denoted as df , is the total di↵erential.

For a function f (x1 , ..., xn ), a symbol f called the increment of f at a point x0 denotes the
change

f (x0 ) = f (x0 + x) f (x0 ) = f (x01 + x1 , ..., x0n + xn ) f (x01 , ..., x0n ).

Definition 8 A function f is said to be di↵erentiable at point x0 if its total increment at this


point can be written in the form
n
X n
X
f (x0 ) = A1 x1 + ... + An xn + ↵1 x1 + ... + ↵n xn = Ai xi + ↵ i xi ,
i=1 i=1

Dr Yuliya Kyrychko 16 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

where Ai are some numbers (which do not depend on xi ), ↵i = ↵i ( x1 , ..., xn ), i = 1, ..., n


are infinitesimally small functions when { x1 ! 0, ..., xn ! 0} and ↵i (0, ..., 0) = 0.

Definition 9 A linear function defined as


Xn
0 df 0
df (x ) := (x )dxi ,
i=1
dxi

is called di↵erential of function f at point x0 . Note that d ⇡ df when xi = dxi .

Example: A cylindrical tank is 1m high and 0.3m radius. If height is increased by 5cm and
radius by 1cm, what is the e↵ect on volume?

Solution. Let the radius be r and height be h. Then the volume is given by

V = ⇡r2 h,

and
@V @V
= 2⇡rh and = ⇡r2 .
@r @h
Therefore,
@V @V
V ⇡ r+ h = 2⇡rh r + ⇡r2 h.
@r @h
We have r = 0.3, h = 1, r = 1cm = 0.01m and h = 5cm = 0.05m, hence

V ⇡ 2⇡(0.3)(1)(0.01) + ⇡(0.3)2 (0.05) = 0.033m3 .

Theorem 5 If function is di↵erentiable at a point, then it is continuous at that point.

Proof: From the Definition 8, it immediately follows that f (x0 ) ! 0 as xi ! 0. ⌅

Theorem 6 If function is di↵erentiable at a point, then there exist all its partial derivatives
at that point.

Proof: Recall the definition of di↵erentiable function at a point, which is given by

f = A1 x1 + ... + An xn + ↵1 x1 + ... + ↵n xn .

Suppose all xi = 0 except xk , so xi 6= 0, for any k between 1 and n. Therefore, f =


Ak xk + ↵k xk , where Ak is a number, and ↵k ! 0 when xk ! 0. This gives
f
= Ak + ↵k ! Ak for xk ! 0.
xk

Dr Yuliya Kyrychko 17 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

This means that there exists


f
lim = Ak ,
xk !0 xk
and this completes the proof. ⌅

Note. The existence of partial derivates at a point does not mean that the function is di↵er-
entiable at that point. Consider an example
8
< 1, x = y 6= 0
f (x, y) =
:
0, x 6= 0, x = y = 0.

This function has partial derivatives at (0, 0) given by

@f @f
(0, 0) = (0, 0) = 0,
@x @y

but this function is not continuous at (0, 0). Since it is not continuous at (0, 0), this means that
it is not di↵erentiable at point (0, 0).

2.3 Composite functions and the chain rule


Recall that in the case of function of one variable, we have the following rule:

if y = f (u) and u = g(x),

then
dy dy du
= ,
dx du dx
where u is called the intermediate variable, and x is the independent variable. For partial
derivatives, the same chain rule can be applied, but the situation becomes more complicated as
it depends on how many intermediate and independent variables are present. Consider three
di↵erent cases.

1. Let z = f (x, y), x = x(t) and y = y(t), which means that z is ultimately a function of t, and

dz @z dx @z dy
= + .
dt @x dt @y dt

2. Let w = f (x, y, z), x = x(t), y = y(t), z = z(t), so w is a function of t only and

dw @w dx @w dy @w dz
= + +
dt @x dt @y dt @z dt

3. Let z = f (x, y), x = x(u, v), y = y(u, v), that is z is a function of u and v, and

@z @z @x @z @y
= + ,
@u @x @u @y @u

Dr Yuliya Kyrychko 18 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

@z @z @x @z @y
= + .
@x @x @v @y @v
In general, we have the following theorem.

Theorem 7 Let each of the n functions f1 , ..., fn of n variables be di↵erentiable at a point


x0 2 Rn . Let the function g of n variables be di↵erentiable at a point y 0 = (f1 (x0 ), ..., fn (x0 )).
Then, a composite function
h(x) := g(f1 (x), ..., fn (x))
is di↵erentiable at a point x0 , and its partial derivatives can be found as
n
X @g
@h 0 @fk 0
(x ) = (y 0 ) (x ), i = 1, ..., n.
@xi k=1
@y k @xi

Example: Let z = x2 y, x = t2 , y = t3 . Calculate dz/dt.

Solution.
dz @z dx @z dy
= + = (2xy)(2t) + (x2 )(3t2 ) = 7t6 .
dt @x dt @y dt

Example: Let u = x2 2xy 2 + 2y 3 , x = s3 ln t, y = 2st2 . Find @u/@s and @u/@t.

Solution. In this example, u = u(x, y), so it’s a function of two variables, and x = x(x, t),
y = y(s, t) are also functions of two variables. Therefore,

@u @u @x @u @y
= +
@s @x @s @y @s
= (2x 2y 2 )(3s2 ln t) + ( 4xy + 6y 2 )(2t2 ),

and
@u @u @x @u @y
= +
@t @x @t @y @t
✓ 3◆
2 s
= (2x 2y ) + ( 4xy + 6y 2 )(4st).
t


Example: Calculate the rate at which the area of the rectangle is changing if its length is
15m and is increasing at 3ms 1 , and its width is 6m and is increasing at 2ms 1 .

Solution. Let x denote the length of the rectangle, y denote the width of the rectangle, A be
the area, and t be time. With this notation, we are given that
dx 1 dy
= 3ms and = 2ms 1 .
dt dt

Dr Yuliya Kyrychko 19 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

The area A = xy, and we want to find dA/dt when x = 15 and y = 6. We can apply the chain
rule to obtain
dA @A dx @A dy
= +
dt @x dt @y dt
dx dy
=y +x = (6)(3) + (15)(2)
dt dt
= 48m2 s 1 .

2.4 Higher order partial derivatives


Suppose function f (x1 , x2 , ..., xn ) has a partial derivative @f /@xi in the
✓ neighbourhood
◆ of the
@ @f
point M 2 Rn , then this derivative can have its own derivative .
@xk @xi

@f
Definition 10 If function has a partial derivative at the point M 2 Rn , that is there
✓ ◆ @x i
@ @f
exists , this derivative is called the second order partial derivative of the function
@xk @xi
f in variables xi and xk at the point M , and is denoted by

@ 2f
(M ).
@xi @xk
If i 6= k, it is called a mixed second order partial derivative.

From the definition above, for a function f = f (x, y) we have


@ 2f
• ⌘ fxx - the derivative of f taken twice with respect to x;
@x2

@ 2f
• ⌘ fyx - the derivative of f taken with respect to y and then with respect to x;
@x@y

@ 2f
• ⌘ fxy - the derivative of f taken with respect to x and then with respect to y;
@y@x

@ 2f
• ⌘ fyy - the derivative of f taken twice with respect to y;
@y 2

Dr Yuliya Kyrychko 20 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

In a similar way It is possible to define the nth order partial derivatives.

Definition 11 The nth order derivative of the function f (x1 , x2 , ..., xn ) in xi1 , xi2 , ..., xin at
the point M is defined as
✓ ◆
@ nf @ @ n 1f
= .
@xin @xin 1 ...@xii @xin @xin 1 ...@xii

If all indexes i1 , ..., in are di↵erent, then this partial derivative is called a mixed partial
derivative of order n.

Example: Find all partial derivatives up to the second order of the function

f (x, y) = x4 y 2 x2 y 6 .

Solution. We have
fx = 4x3 y 2 2xy 6 ; fy = 2x4 y 6x2 y 5 .
Now,
fxx = 12x2 y 2 2y 6 ; fyy = 2x4 30x2 y 4
and
fxy = 8x3 y 12xy 5 ; fyx = 8x3 y 12xy 5 .

Example: Find all derivatives up to the second order of the function

u = xy .

Solution. Starting from the first order derivatives, we have

ux = yxy 1 ; uy = xy ln x.

Now we can calculate the second order derivatives as follows

uxx = y(y 1)xy 2 ; uyy = xy (ln x)2

and
uxy = yxy 1
ln x + xy 1 ; uyx = xy 1
+ yxy 1
ln x.

You might have noticed that in the last two examples, fxy = fyx . The obvious question to ask
ourselves now is: is this always true? Let us consider the following example.

Dr Yuliya Kyrychko 21 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Example: Let ⇢
xy, |y|  |x|,
u(x, y) =
xy, |y| > |x|.
Find uxy (0, 0) and uyx (0, 0).

Solution. The function u is plotted in Fig. 2.1, where shaded area is where u = xy, and
u = xy everywhere else. For any y 6= 0, in the very small neighbourhood of the point (0, y),

Figure 2.1: A graph of the function u.

we have u(x, y) = xy, hence, ux (x, y) = y, and ux (0, y) = y. The last equality holds even
for y = 0, i.e. ux (0, 0) = 0. Therefore, for any y we have
ux (0, y) = y.
If we di↵erentiate this again, we have
uyx (0, y) = 1, uyx (0, 0) = 1.
Similar argument leads to the conclusion that uxy = 1. This means that uxy (0, 0) 6= uyx (0, 0).

We have the following theorem.


Theorem 8 If in some neighbourhood of the point (x0 , y0 ) function f (x, y) has mixed deriva-
tives fxy and fyx , and if these mixed derivatives are continuous at the point (x0 , y0 ), then they
are equal, i.e.
fxy (x0 , y0 ) = fyx (x0 , y0 ).

2.5 Higher order di↵erentials


Consider a function of two variables f (x, y), which is twice di↵erentiable at the point M0 =
(x0 , y0 ), which means that the function is di↵erentiable in some neighbourhood of the point

Dr Yuliya Kyrychko 22 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

M0 , and its partial derivatives @f /@x and @f /@y are di↵erentiable in some neighbourhood of
the point M0 . Consider a di↵erential of this function in the neighbourhood of the point M0
@f @f
df = (x, y)dx + (x, y)dy.
@x @y
It is worth noting the di↵erential is a function of four variables, namely, x, y, dx, dy. In order to
introduce the second order di↵erential of the function f (x, y), we will consider df as the function
of x, y only, and take dx and dy as fixed numbers. Since @f /@x and @f /@y are di↵erentiable
at the point M0 , therefore, df is di↵erentiable at the point M0 .

Definition 12 The second order di↵erential of the function f (x, y) at the point M0 is de-
fined as the di↵erential of the first di↵erential df if the following conditions are satisfied:

• df is taken as a function of x and y only;

• when calculating the di↵erentials of @f /@x(x, y) and @f /@y(x, y), the displacements
x and y of the variables x and y are equal to dx and dy correspondingly.

The second order di↵erential is written as

d2 f = d(df ).

Let us calculate the second order di↵erential of the function f (x, y). By definition, we have
✓ ◆
2 @f @f
d f =d dx + dy
@x @y

 ✓ ◆  ✓ ◆
@f @f
= d dx + d dy
@x @y

 ✓ ◆ ✓ ◆
@ @f @ @f
= dx + dy dx
@x @x @y @x

 ✓ ◆ ✓ ◆
@ @f @ @f
+ dx + dy dy
@x @y @y @y

@ 2f 2 @ 2f @ 2f
= (dx) + 2 dxdy + (dy)2 .
@x2 @x@y @y 2

Example: Let f (x, y) = xy . Calculate the second order di↵erential of the function f (x, y) at
the point M0 = (1, 0).

Dr Yuliya Kyrychko 23 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Solution. We start by calculating the first and second order derivatives of the function f (x, y)
as follows
fx = yxy 1 , fy = xy ln x;
and
fxx = y(y 1)xy 2 , fxy = xy 1
+ yxy 1
ln x, fyy = xy (ln x)2 .
Now using the formula for the second order di↵erential, we obtain
d2 f |M0 = fxx (M0 )dx2 + 2fxy (M0 )dxdy + fyy (M0 )dy 2

= 0 · dx2 + 2dxdy + 0 · dy 2 = 2dxdy.


You might have noticed that the expression for the second order di↵erential resembles that
of the quadratic binomial. Indeed, it is possible to express the second order di↵erential as a
symbolic second order binomial.

An operator is a rule according to which one function can be transformed into another function.
For example, the process of finding a derivative of the function f (x, y) in x can be considered
@ @f
as an operator (denoted by ), which transforms function f (x, y) into function (x, y), so
@x @x
@ @f
that f= .
@x @x
@ @
An operator d = dx + dy is called the di↵erential operator. If one applies this operator
@x @y
@f @f
to the function f (x, y), this gives the di↵erential of the function, i.e. df = dx + dy. The
@x @y
product of the operators is defined as follows
@ @ @2
· =
@x @y @x@y

✓ ◆2
@ @ @ @2
· = =
@x @x @x @x2

✓ ◆k ✓ ◆l
@ @ @ k+l
· = ,
@x @y @xk @y l
where k, l 2 N. Now we can define the second order di↵erential operator as
✓ ◆2
2 @ @ @2 2 @2 @2
d = dx + dy = (dx) + 2 dxdy + (dy)2 .
@x @y @x2 @x@y @y 2
Using this definition, we can now write the second order di↵erential in the form
✓ ◆2
2 @ @
df= dx + dy f.
@x @y
In general, we can define the nth order di↵erential of the function f (x, y).

Dr Yuliya Kyrychko 24 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Definition 13 Suppose function f (x, y) is n times di↵erentiable in some neighbourhood of


the point M0 (that is, it is di↵erentiable n 1 times in the neighbourhood of the point M0 ,
and all its partial derivatives are di↵erentiable n 1 times at the point M0 ). Then, the nth
order di↵erential, denoted as dn f is defined as

dn f = d(dn 1 f ), n = 2, 3, ...

or, in the operator form ✓ ◆n


n @ @
d f= dx + dy f.
@x @y

If function f (x1 , x2 , ..., xn ) is the function of n independent variables, then

@ @
d= dx1 + ... + dxn ,
@x1 @xn
and ✓ ◆n
n @ @
d f= dx1 + ... + dxn f.
@x1 @xn
In particular,
✓ ◆2 n
X
2 @ @ @ 2f
df= dx1 + ... + dxn f= dxi dxj .
@x1 @xn i,j=1
@xi @xj

2.6 Taylor’s formula


Before we derive the Taylor’s formula for a function of many variables, let us recall the Taylor’s
formula for a function of one variable. If function F (t) is (n + 1) times di↵erentiable in the
neighbourhood of the point t0 , then for any t from this neighbourhood, then the following
Taylor’s formula holds
1 (n)
F (t) = F (t0 ) + F 0 (t0 )(t t0 ) + ... + F (t0 )(t t0 ) n
n!
1
+ F (n+1) (t0 + ✓(t t0 ))(t t0 )(n+1) , 0 < ✓ < 1.
(n + 1)!

Let t t0 = t = dt. Since F (k) (t0 )(t t0 )k = F (k) (t0 )(dt)k = dk F |t=t0 , if we let F (t) F (t0 ) =
F , we can rewrite the Taylor’s fomula in the form
1 n 1
F = dF |t=t0 + ... + d F |t=t0 + dn+1 F |t=t0 +✓ t . (2.1)
n! (n + 1)!

A similar formula exists for functions of several variables.

Dr Yuliya Kyrychko 25 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Theorem 9 If function f (x1 , ..., xm ) is (n+1) times di↵erentiable in the "-neighbourhood of the
point M0 (x01 , ..., x0m ), then for any point M (x01 + x1 , ..., x0m + xm ) from this "-neighbourhood,
f = f (M ) f (M0 ) can be expressed as follows
1 2 1 1
f = df |M0 + d f |M0 + ... + dn f |M0 + dn+1 f |N , (2.2)
2! n! (n + 1)!

where N is some point from the segment M0 M and di↵erentials dk f are calculated as
✓ ◆k
k @ @
d f= x1 + ... + xm f.
@x1 @xm

Formula (2.2) is called the Taylor’s formula for the function F (M ) expanded about the point
(M0 ).

Proof: Suppose we fix a point M (x01 + x1 , ..., x0m + xn ) from the "-neighbourhood of the
point M0 , as shown in Fig. 2.2. The equations for the segment M0 M can be expressed in the
form

Figure 2.2: A point M (x01 + x1 , ..., x0m + xm ) from the "-neighbourhood of the point M0 .

x1 = x01 + t x1 , ..., xm = x0m + t xm , 0  t  1,


where point M0 corresponds to t = 0, and point M corresponds to t = 1. On the segment
M0 M , we have
f (x01 + t x1 , ..., x0m + t xm ) =: F (t),
is a composite function of one variable t, and F (t) is (n + 1) times di↵erentiable on the interval
0  t  1. Moreover,
f = f (M ) f (M0 ) = F (1) F (0). (2.3)
We can use formula (2.1) in order to expand the expression F (1) F (0). Letting t0 = 0, t = 1,
dt = t = 1 0 = 1 in the expression (2.1) yields
1 n 1
F (1) F (0) = dF |t=0 + ... + d F |t=0 + dn+1 F |t=✓ . (2.4)
n! (n + 1)!

Dr Yuliya Kyrychko 26 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Since x1 , ..., xm are linear functions of t, the di↵erentials dk F can be calculated as follows
✓ ◆k
@ @
dk F |t=0 = x1 + ... + xm f | M0 = d k f | M0 , k = 1, 2, ..., n. (2.5)
@x1 @xm

Similarly,
✓ ◆n+1
n+1 @ @
d F |t=✓ = x1 + ... + xm f |N (x01 +✓ x1 ,...,x0m +✓ xm ) = dn+1 f |N . (2.6)
@x1 @xm

From the fact that 0 < ✓ < 1, it follows that the point N lies on the segment M0 M .
Substituting the expressions (2.5) and (2.6) into the right hand side of the expression (2.4),
and taking into account (2.3) gives us the formula (2.2) and concludes the proof of this theorem.


The Taylor’s formula can also be expressed using the derivatives of the function. For this, let
us calculate the di↵erentials dk f via the function’s derivatives, i.e.
✓ ◆k
@ @
d k f | M0 = x1 + ... + xm f | M0
@x1 @xm

m X
X m m
X @kf
= ··· (M0 ) xi1 ... xik .
i1 =1 i2 =1 ik =1
@xi1 ...@xik

In particular,
m
X @ 2f
d 2 f | M0 = (M0 ) xi xj .
i,j=1
@xi @xj

Suppose xi = xi x0i , i = 1, ..., m. Using the expression (2.2), we obtain the following Taylor’s
formula
Xn m
1 X @kf
f (x1 , ..., xm ) = f (x01 , ..., x0m ) + (x01 , ..., x0m ) xi1 ... xik + Rn+1 ,
k=1
k! i ,...,i =1
@x i 1 ...@x i k
1 k

where
1
Rn+1 = dn+1 f |N
(n + 1)!
is called the remainder.

Example: At some instant, the temperature distribution on a plate lying in the xy-plane is
2 2
given by T (x, y) = C + e (x +y ) , where C is a constant. Assuming that measurements of T
and its partial derivatives up to the second order are available at the point (2, 1), estimate the
temprerature at (x, y) = (2.1, 1.1). Compare this with the actual value from the function. How
would you estimate the temperature gradient in the x-direction at this point?

Dr Yuliya Kyrychko 27 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Solution. First, we need to construct the values for the ”measurements” at the point (2, 1).
We have
(x2 +y 2 )
T (x, y) = C + e , T (2, 1) = C + e 5 ;

(x2 +y 2 )
Tx = 2xe , Tx (2, 1) = 4e 5 ;

(x2 +y 2 )
Ty = 2ye , Tx (2, 1) = 2e 5 ;

(x2 +y 2 )
Txx = (4x2 2)e , Tx (2, 1) = 14e 5 ;

(x2 +y 2 )
Tyy = (4y 2 2)e , Tx (2, 1) = 2e 5 ;

(x2 +y 2 )
Txy = 4xye , Tx (2, 1) = 8e 5 .

Using Taylor’s formula, we have


5
T (2.1, 1.1) ⇡ T (2, 1) + ( (0.1)4e (0.1)2e 5 )

1 5 5
+ ((0.01)14e + 2(0.01)8e + (0.01)2e 5 )
2

= C + 0.56e 5 .

Using the exact function, we have


2 2
T (2.1, 1.1) = C + exp (2.1 +1.1 ) = C + e 5.62
= C + e 0.62 e 5 = C + 0.538e 5 .

Example: Find the third order Taylor expansion of the function f (x, y) = e2x sin 3y about the
point (0, 0).

Solution. In this example, we will use two di↵erent methods for calculating the Taylor expan-
sion of the function f (x, y). First, calculate all partial derivatives up to the third order at the

Dr Yuliya Kyrychko 28 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

point (0, 0). This gives


f (x, y) = e2x sin 3y, f (0, 0) = 0;

fx (x, y) = 2e2x sin 3y, f (0, 0) = 0;

fy (x, y) = 3e2x cos 3y, f (0, 0) = 3;

fxx (x, y) = 4e2x sin 3y, f (0, 0) = 0;

fxy (x, y) = 6e2x cos 3y, f (0, 0) = 6;

fyy (x, y) = 9e2x sin 3y, f (0, 0) = 0;

fxx (x, y) = 8e2x sin 3y, f (0, 0) = 0;

fxxy (x, y) = 12e2x cos 3y, f (0, 0) = 12;

fxyy (x, y) = 18e2x sin 3y, f (0, 0) = 0;

fyyy (x, y) = 27e2x cos 3y, f (0, 0) = 27.

Using the Taylor’s formula for functions of several variables to order three about the point
(0, 0), we obtain
X 1 @ l+m f
f (x, y) = l @y m
(0, 0)xl y m + ...
0l,m3,l+m3
l!m! @x

1 1 1 1
= 3y + 6xy + 12x2 y 27y 3 + ...
1!3! 1!1! 2!1! 0!3!

9 3
= 3y + 6xy + 6x2 y y + ....
2
The second method to get the same result is to use the single variable Taylor expansions,
namely, we know that
1 2 1 3
ex = 1 + x + x + x + ...
2! 3!

1 3
sin y = y y + ....
3!

Dr Yuliya Kyrychko 29 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

If we replace x by 2x in the first and y by 3y in the second expansions, and multiply the two
expressions keeping the terms of degree at most three, we obtain

f (x, y) = e2x sin 3y

 
1 1 1
= 1 + 2x + (2x)2 + (2x)3 + ... 3y (3y)3 + ...
2! 3! 3!

 
4 9 3
= 1 + 2x + 2x + x3 + ...
2
3y y + ...
3 2

9 3
= 3y y + 6xy + 6x2 y + ...,
2
which is exactly the same expression as the one we have calculated above. ⌅

2.7 Extrema points


Now that we have derived the Taylor’s formula for functions of several variables, we can use it
to determine whether a function has minima, a maxima or saddle points.

Definition 14 Let function u = f (M ) be defined in some neighbourhood of the point M0 2


Rn . The function u = f (M ) is said to attain its local maximum (minimum at the point M0 )
if there exists an "-neighbourhood of the point M0 , in which f (M ) < f (M0 ) (f (M ) > f (M0 )),
M 6= M0 .

Minima and maxima points of the function are its extrema points.

Theorem 10 (necessary condition on the existence of the local extrema) If at the point M0 (x01 , ..., x0n )
@u
the function u = f (x1 , ..., xn ) has its extrema and if a partial derivative exists at this point
@xk
M0 , then
@u
(M0 ) = 0.
@xk

Proof: Let us fix all independent variables except for xk by taking xi = x0i (i 6= k), and
consider a function of one variable f (x01 , x0k 1 , xk , x0k+1 , ..., x0m ) =: '(xk ). This function has a
local extrema at the point xk = x0k , and its derivative at the point x0k exists and is

@u
'0 (x0k ) = (M0 ).
@xk

Dr Yuliya Kyrychko 30 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

From the theorem about the existence of the extrema for functions of one variable, it follows
that '0 (x0k ) = 0, which, in turn, means that

@u
(M0 ) = 0.
@xk
This concludes the proof. ⌅

Corollary. If function u = f (M ) has a local extrema at the point M0 and is di↵erentiable at


the point M0 , then
@u @u
du|M0 = (M0 )dx1 + ... + (M0 )dxn = 0.
@x1 @xn

It is worth noting that the condition du|M0 = 0 is a necessary but not sufficient condition on
the existence of the local extrema.

Suppose u = xy. This means that ux (0, 0) = 0 and uy (0, 0) = 0, so that du|(0,0) = 0. However,
this function does not have its extrema at (0, 0) since in any neighbourhood of the point (0, 0)
this function takes both positive and negative values, which means that it admits values larger
than u(0, 0) = 0 and smaller than u(0, 0).

Definition 15 If function u = f (M ) is di↵erentiable at the point M0 and du|M0 = 0, then


point M0 is called the stationary or critical point of the function u = f (M ),

Theorem 11 Let function f (x, y) of two variables be di↵erentiable in some neighbourhood of


the point (x0 , y0 ), and that the following holds

fx (x0 , y0 ) = fy (x0 , y0 ) = 0.

Let H denote the Hessian matrix


✓ ◆
fxx fxy
H= .
fyx fyy

(A) If det(H) < 0 at (x0 , y0 ) i.e.


2
fxx fyy fxy < 0,
then function f (x, y) has a saddle point.

Dr Yuliya Kyrychko 31 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

(B) If det(H) > 0, i.e.


2
fxx fyy fxy >0
and fxx > 0 at (x0 , y0 ), then function f (x, y) has a local minimum at (x0 , y0 ).

(C) If det(H) > 0, i.e.


2
fxx fyy fxy >0
and fxx < 0 at (x0 , y0 ), then function f (x, y) has a local maximum at (x0 , y0 ).

(D) If det(H) = 0, i.e.


2
fxx fyy fxy =0
then function f (x, y) might or might not have extrema at (x0 , y0 ).

Example: Find and classify all critical points of the function

f (x, y) = x2 xy + y 2 2x 2y.

Solution. In order to find critical or stationary points, we have to solve simultaneous equations

fx (x, y) = 2x y 2 = 0
fy (x, y) = x + 2y 2 = 0,

which gives (x, y) = (2, 2) as the only critical/stationary point. The Hessian at this point is
✓ ◆ ✓ ◆
fxx fxy 2 1
H= = .
fyx fyy 1 2

Since det(H) = 4 1 > 0 and fxx = 2 > 0, the critical point (2, 2) is a local minimum. ⌅

Example: Find and classify all critical points of the function

f (x, y) = 3xy x3 y3.

Solution. In order to find critical or stationary points, we have to solve simultaneous equations

fx (x, y) = 3y 3x2 = 0
fy (x, y) = 3x 3y 2 = 0,

Dr Yuliya Kyrychko 32 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

which gives (x, y) = (0, 0) and (x, y) = (1, 1) as the stationary/critical points. The Hessian is
given by ✓ ◆ ✓ ◆
fxx fxy 6x 3
H= = .
fyx fyy 3 6y
At the point (0, 0), we have
✓ ◆
0 3
H= =) det(H) = 9 < 0,
3 0

so (0, 0) is a saddle point. Looking at the Hessian at (1, 1), we obtain


✓ ◆
6 3
H= =) det(H) = 36 9 = 27 > 0.
3 6

Since fxx (1, 1) = 6 < 0, the point (1, 1) is a local maximum. ⌅

2.8 Constrained minima and maxima


We understand the notion of maximising and minimising the function. However, sometimes it
is necessary to maximise or minimise a function subject to some constraint.

Suppose that some function f (x, y) is to be analysed for stationary points subject to the con-
straint g(x, y) = 0. For the function f (x, y) to have stationary points, we require
@f @f
df = dx + dy = 0,
@x @y
@f @f
which gives rise to the condition = 0 and = 0 because dx and dy are considered as
@x @y
independent variables. But now dx and dy are not independent because they are implicitly
related via g(x, y) = 0. In other words, g(x, y) = 0 defines y = y(x) implicitly, and, therefore,
dy/dx exists.

We have shown earlier that in this case


@g @g
dg = dx + dy = 0,
@x @y
@g @g
from where we can get dy/dx = @x / @y . We can add any amount of dg to df and still get zero.
Hence, ✓ ◆ ✓ ◆
@f @g @f @g
d(f + g) = + dx + + dy = 0.
@x @x @y @y
For the constrained maxima/minima we require
@f @g
+ =0
@x @x

@f @g
+ = 0.
@y @y

Dr Yuliya Kyrychko 33 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

These two equations along with the condition g(x, y) = 0 are sufficient to determine stationary
points of interest and . The ”dummy” variable is called a Lagrange multiplier, we only really
care about the values of x and y.

Once you have found all the critical points, you plug them into f to see where the maxima and
minima are. The critical points where f is greatest are maxima, and the critical points where
f is smallest are minima.

Solving system of equations can be difficult, below are some tricks that may help:

• Since we do not actually care what is, it may be easier to first solve for in terms of
x, y and z, and eliminate it from the equatons;

• Whenever you take a square root, you must consider both positive and negative square
roots;

• Whenever you divide an equation by an expression, you must ensure that the expression
is not equal to zero.

2.8.1 General case of finding minima and maxima using Lagrange


multipliers
Suppose functions f , '1 , ..., 'm (1  m < n) are continuously di↵erentiable on the open set
G 2 Rn . In order to find maxima/minima f the function f , we have the following optimisation
problem:

minimise or maximise f (x1 , ..., xn )


subject to constraints 'j = 0, j = 1, ..., m

This problem is solved using the following procedure.

(i) Construct the Lagrange function


m
X
L(x) := f (x) + j 'j (x)
j=1

(ii) Find all stationary points by solving the n + m simultaneous equations, namely

@
L(x) = 0, i = 1, ..., n,
@xi

'j (x) = 0, j = 1, ..., m

and find x1 , ..., xn , 1, ..., m.

Dr Yuliya Kyrychko 34 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

(iii) Now maximise or minimise the function subject to given constraints by finding the values
of the function f at the stationary/critical points.

Example: Calculate the maximum distance from the origin to the curve 3x2 +3y 2 +4xy 2 = 0.

p
Solution. The distance from the origin to any point (x, y) is l = x2 + y 2 . We want to
maximise this distance but subject to (x, y) lying on the surface, i.e. subject to 3x2 + 3y 2 +
4xy 2 = 0. In this case it is easier to maximise l2 and not l giving the same result. The
Lagrange equations are

2x + (6x + 4y) = 0,
2y + (6y + 4x) = 0,

which must be solved together with

3x2 + 3y 2 + 4xy 2 = 0.

Solving these simultaneous equations gives the stationary points


✓ ◆ ✓ ◆
1 1 1 1
p ,p , p , p , (1, 1), ( 1, 1).
5 5 5 5

For thepfirst pair, we have l2 = 2/5 and for the second pair l2 = 2. Thus, the maximum distance
is l = 2. ⌅

Example: Use Lagrange multipliers to find all critical points of the function f (x, y, z) =
x + y + 2z on the surface x2 + y 2 + z 2 = 3. Determine the maxima and minima of f on this
surface.

Solution. Calculating partial derivatives, we have

fx = 1; fy = 1; fx = 2,

and
gx = 2x; gy = 2y; gz = 2z.
Now we have to solve simultaneous equations

1 + 2 x = 0,
1 + 2 y = 0,
2 + 2 x = 0,
x2 + y 2 + z 2 = 3.

Expressing x, y and z in terms of from the first three equations and substituting them into
the last equation, gives
1 1 1
2
+ 2 + 2 = 3,
4 4

Dr Yuliya Kyrychko 35 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

p
which gives = ±1/ 2. Plugging these values of into the first three equations, gives two
critical points ! !
p p p p
2 2 p 2 2 p
, , 2 , , , 2 .
2 2 2 2
Since f (x, y, z) = x + y + 2z, we have
p p !
2 2 p p
f , , 2 =3 2
2 2

is the maximum, and !


p p
2 2 p p
f , , 2 = 3 2.
2 2
is the minimum. ⌅

Example: Use Lagrange multipliers to show that f (x, y, x) = z 2 has only one critical point on
the surface x2 + y 2 z = 0. Show that the one critical point is a minimum.

Solution. In order to find critical points, we have to solve simultaneous equations


2 x = 0,
2 y = 0,
2z = 0,
2 2
x +y z = 0.
If 6= 0, then x = 0 and y = 0 from the first two equations, which gives z = 0 from the last
equation. So, the critical point is (x, y, z) = (0, 0, 0).
If = 0, then from the third equation, we have z = 0. From the fourth equation, it follows
that x = 0 and y = 0 in this case. Again, we get the same critical point (x, y, z) = (0, 0, 0).

Since f (x, y, x) = z 2 , f (x, y, x) 0 for all (x, y, z). At the critical point (0, 0, 0), we have
f (0, 0, 0) = 0. Thus, (0, 0, 0) is the minimum. ⌅

Example: Find maxima/minima points of the function


f (x, y, z) = xyz
subject to the constraints
x2 + y 2 + z 2 = 1
x + y + z = 0.

Solution. Unlike the previous examples, in this example, we have to find minima/maxima of
the function subject to two constraints. The Lagrange function has the form
2
L(x, y, z) = xyz + 1 (x + y2 + z2 1) + 2 (x + y + z).

Dr Yuliya Kyrychko 36 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

In order to find critical/stationary points, we have to solve the following system of simultaneous
equations:

yz + 2 1 x + 2 = 0,
xz + 2 1 y + 2 = 0,
xy + 2 1 z + 2 = 0,
x2 + y 2 + z 2 = 1
x + y + z = 0.

If we add the first three equations, and use the last equation, we obtain

yz + xz + xy + 3 2 = 0.

It is easy to check that


1
2(yz + xz + xy) = (x + y + z)2 (x2 + y 2 + z 2 ) = 0 1= 1 =) yz + xz + xy = ,
2
so the last expression becomes
1 1
+3 2 =0 =) 2 = .
2 6
The di↵erence of the first two equations can be written as

(y x)(z 2 1 ) = 0.

In a similar manner, the di↵erence between the second and third equations, and the di↵erence
between third and first equations is

(z y)(x 2 1 ) = 0,
(x z)(y 2 1 ) = 0.

In the light of the last two equations, we have

(y x)(z y)(x z) = 0,

which gives y = x, z = y and x = z. We will consider the case when y = x, and the other two
cases can be done similarly. If y = x, then we have the following simultaneous equations to
solve
1
yz + 2 1 y + = 0,
6

1
y2 + 2 1z + = 0,
6

2y + z = 0,

Dr Yuliya Kyrychko 37 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

which gives
1
2y 2 + 2 1 y + = 0,
6

1
y2 4 1y + = 0,
6

z= 2y.

Solving these equations yields,


p p
2 1 6 6
y = =) y=± =) z= 2y = ⌥ ,
6 6 3
and p
6
x=y=± ,
6
and p
1 6
1 = =± .
12y 12
Now, we have two stationary points,
p p p ! p p p !
6 6 6 6 6 6
(x, y, z) = , , and (x, y, z) = , , .
6 6 3 6 6 3

Calculating the values of the function f at those points gives


p p p ! p
6 6 6 6
f , , = ,
6 6 3 18

which is the minimum and p p p ! p


6 6 6 6
f , , = ,
6 6 3 18
which is the maximum. ⌅

Dr Yuliya Kyrychko 38 y.kyrychko@sussex.ac.uk

You might also like