Unit3 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Unit 3 - Partial Differentiation and Double

Integrals

Partial Differentiation
Most of the differentiation we have dealt with so far concerned functions of a single

variable. We have found dy/dx as a function of two variables before by differentiating


Economics.
Example 1

Example 2

Given that f (x, y) = x sin (xy) - xy², find (i) fx , (ii) fy , (iii) fx (π/2, 1).

(i) f x = sin (xy) + x [ y cos (xy) ] - y² = sin (xy) + xy cos (xy) - y².

[ Note that the term x sin (xy) was differentiated as a product ]

(ii) f y = x² cos (xy) − 2xy.

(iii) f x (π/2, 1) = sin (π/2) + π/2 cos (π/2) − 1 = 1 + 0 − 1 = 0.

Example 3

The cost $C of producing one box of greeting cards is a function of the cost of the

paper ($x) and the cost of the labour ($y) and is approximated by

C (x, y) = 2x + 3y² - xy + 2.5

Find (i) Cx , (ii) Cy(1, 5).


(iii) Interpret Cy(1, 5).

(i) Cx = 2 − y.

(ii) Cy = 6y − x. Therefore Cy (1, 5) = 30 − 1 = 29.

(iii) Cy (1, 5) gives the marginal cost of labour (at the instant when labour costs $5), given that the cost
of paper is fixed at $1.

Second Order Partial Derivatives


There are four second order partial derivatives that can be found for z = f (x, y).

These are (i) fxx , (ii) fyy , (iii) fxy , (iv) fyx .

Note carefully that fxy , for example, means that we first find fx , then find the partial

derivative of f x with respect to y .

[ This might cause a little difficulty at the beginning , as we are used to dealing with the

operation 'on the right' first, e.g. the composite function fg(x) means the function g

followed by the function f. ]

Note also that the above second order partial derivatives can be written alternatively as

Example 4

Given that f (x, y) = xy² + 5x²y − 2y³, find (i) fxy , (ii) fyx , (iii) fxx .

(i) Remember that we find f x first, then find the partial derivative of f x with respect to y.

As fx = y² + 10xy, fxy = 2y + 10x.

(ii) As fy = 2xy + 5x² - 6y², fyx = 2y + 10x.

(iii) fx = y² + 10xy. Therefore fxx = 10y.

[ Note here that fxy = fyx . This is true for many functions of two variables (as you will
see). However, it is not generally true, so be careful ! ]

Example 5

Given that f(x, y) = 5xy − 3y + exy , find fyx (1, 2).

fy = 5x − 3 + x exy . Therefore fyx = 5 + exy + xy exy .

Therefore fyx (1, 2) = 5 + e² + 2e² = 5 + 3e².

Chain Rule for Partial Derivatives

Example 6
In our next session we will show how we can find extreme values of a function of two

variables. This will prove to be very interesting as we now explore the 3-dimensional

world !
Extrema of Functions of Two Variables
Before we outline the conditions for extreme values of a function of two variables, it would be a good
idea to review the previous work covered in relation to a single variable. One reason for this review is
that there is some similarity between the results for a single variable and those for two variables. In a
nutshell, the previous results were :

1. If f '(x) = 0 at , e.g., x = a, and also f ''(a) < 0, there will be a relative maximum at the

point [a, f(a)].

2. If f '(x) = 0 at, e.g., x = b, and also f ''(b) > 0, there will be a relative minimum at the

point [b, f(b)].

3. If f '(x) = 0 at, e.g., x = c, and also f ''(c) = 0, then we would need to examine the signs

of f '(x) just before and just after the point where x = c in order to determine whether

the point [c, f (c)] represents a relative maximum, a relative minimum or a point of

inflexion.

[ It should be noted that we did not fully explore the conditions for a point of inflexion in our first year
course. As a matter of interest, a point of inflexion occurs when the gradient has a relative maximum
or a relative minimum. We could, therefore, have an oblique tangent at a point of inflexion, e.g.

Conditions for Extrema of a Function of Two Variables


Given that z = f(x, y), the first condition is that
[ This clearly compares with the condition that dy/dx = 0 in our previous work. ]

Pairs of values (x, y) such that f x = f y = 0 are called critical values , and the point

[x, y, f(x, y)] is a critical point .

It is not difficult to explain why the conditions given in (1) are necessary.

both equal to zero at the point [a, b, f(a, b)], Remember that f x (a, b), for example, is the

partial derivative of f with respect to x whilst y remains constant (at y = b). f x therefore

gives the gradient of the curve Cb , and fx (a, b) is the gradient of Cb when x = a and y = b.

It therefore follows that fx (a, b) = 0 at an extreme point.

Distinguishing Between Extrema


We will now look at the 'two variable' equivalent of finding the sign of the second

differential coefficient to distinguish between turning points when y = f(x). This result

involves using the second order partial derivatives fxx , fyy and fxy . However, the proof

requires knowledge not covered in this course and (unfortunately) will not be given here.

Perhaps when you see the result, you will appreciate why this is so !

Second Partial Derivative Test


Suppose that fx (a, b) = fy (a, b) = 0, i.e. the first condition, holds.

We now let K = fxx (a, b). fyy (a, b) − [ fxy (a, b) ]² .

The second partial derivative test now states that

(1) If K > 0 and fxx (a, b) > 0, then f(a, b) is a relative minimum .

[ Note that the condition fxx (a, b) > 0 bears some correspondence to the previous

condition that f ''(x) > 0. ]

(2) If K > 0 and fxx (a, b) < 0, then f(a, b) is a relative maximum .
[ Once again, note the comparison with f ''(x) < 0. ]

(3) If K < 0, then (a, b, c) is a saddle point of f, where c = f(a, b) .

The question now is "What on earth is a saddle point ?"

Saddle Points

A saddle point obviously occurs at [a, b, f(a, b)] when f x (a, b) = f y (a, b) = 0. However,

this extreme value is neither a relative maximum nor a relative minimum. It is, in fact, a

kind of mixture of both, and can be said to be the three-dimensional equivalent of a point

of inflexion. An example of a saddle point is given below :

In the above illustration it can be seen that point X may be considered a minimum

relative to the points A and B , and a maximum relative to the points D and C.

Example 1

For the following functions, find any critical points on the corresponding curves and then

determine any relative maximum, relative minimum or saddle points.

(i) f(x, y) = - 12x² -3y² + 4xy + 16x – 8y + 60.

(ii) f(x, y) = y³ - 3y² - x² - 9y + 10x – 60.

(i) fx = - 24x + 4y + 16, f y = - 6y + 4x – 8. Therefore, if fx = fy = 0,

- 24x + 4y + 16 = 0 and – 6y + 4x – 8 = 0. Therefore, 6x – y = 4 and 2x – 3y = 4.

Substituting y = 6x – 4 in 2x – 3y = 4, 2x – 18x + 12 = 4 and – 16x = - 8.


Therefore x = ½ and y = - 1. This gives z = f(½, - 1) = - 3 – 3 – 2 + 8 + 8 + 60 = 68.

Therefore the only critical point is (½, - 1, 68).

Our next step is to find the second order partial derivatives fxx , fyy and fxy .

In this example, fxx= - 24, fyy = - 6 and fxy = 4. Therefore, applying the second partial

derivative test, K = fxx (a, b). fyy (a, b) – [ fxy (a, b) ]² = - 24 (- 6) – 16 > 0.

Also, fxx (a, b) < 0. Therefore there is a relative maximum at the point (½, - 1, 68), i.e.

f has a relative maximum value of 68.

(ii) If f(x, y) = y³ - 3y² - x² - 9y + 10x – 60, fx = - 2x + 10 and fy = 3y² - 6y – 9.

Therefore, if fx = fy = 0, - 2x + 10 = 0 and 3y² - 6y – 9 = 0.

Therefore x = 5 and y² - 2y – 3 = 0, i.e. (y – 3)(y + 1) = 0.

The critical values are therefore (5, 3) and (5, - 1).

Also, fxx = - 2, fyy = 6y – 6 and fxy = 0.

Taking first the critical value (5, 3), K = - 2(18 – 6) – 0 = - 24.

Therefore, as K < 0, there is a saddle point when x = 5 and y = 3.

As f(5, 3) = 27 – 27 – 25 – 27 + 50 – 60 = - 62, the saddle point is at (5, 3, - 62).

Taking now the critical value (5, - 1), K = - 2(- 6 – 6) – 0 = 24, i.e. K > 0.

Also, fxx < 0, hence giving a relative maximum when x = 5, y = - 1.

Further, f(5, - 1) = - 1 – 3 – 25 + 9 + 50 – 60 = - 30. Therefore there is a relative

maximum point at (5, - 1, - 30).

Our last task in this session is to apply our knowledge to the solution of some problems.
Example 2

Suppose a company produces two products, electric pencil sharpeners and electric

staplers. The total revenue R (in thousands of dollars) for selling x pencil sharpeners (in

hundreds) and y staplers (in hundreds) is

R(x, y) = - 5x² - 8y² + 39x + 39y – 2xy + 20.

(a) Find x and y so that R will be maximized.

(b) What is that maximum revenue ?

10x + 2y = 39 and 16y + 2x = 39. Therefore 80x + 16y = 312 and 16y + 2x = 39.

Therefore 312 – 80x = 39 – 2x, i.e. 273 = 78x and x = 273/78 = 7/2.

If x = 7/2, 2y = 39 – 35 = 4 and y = 2.

As we were told in the question that revenue is maximized, there is no need for the

following proof. However, we will go through the procedure for the sake of practice.

Let K = fxx (7/2,2). fyy (7/2,2) – [ fxy (7/2, 2) ]², where R(x, y) is written as f(x, y).

Now, fxx = - 10, fyy = - 16 and fxy = - 2. Therefore K = - 10 x (-16) – (-2)² > 0.

Also, f xx (7/2, 2) < 0. Therefore there is a relative maximum when x = 7/2, y = 2.

[ Note that this tells us that the revenue is maximized when 3½ x 100 (= 350) electric

pencil sharpeners and 200 electric staplers are sold. ]

The maximum revenue would be

$1000(-5 x 49/4 – 8 x 4 + 39 x 3½ + 39 x 2 – 2 x 3½ x 2 + 20) = $1000 x 127¼

= $127250.
Example 3

Find three numbers whose sum is N and the sum of whose squares is a minimum. Prove

that the answer does give a relative minimum.

Let the numbers be x, y and z, i.e. x + y + z = N. Also, let x² + y² + z² = T.

Therefore T = x² + y² + (N – x – y)².

As 2x = 2N – 4y, 2(2N – 4y) – 2N + 2y = 0. Therefore 4N – 8y – 2N + 2y = 0,

giving 2N = 6y and y = N/3. Therefore, as 2x = 2N – 4y, 2x = 2N – 4N/3 = 2N/3 and

x = N/3. Clearly, z = N/3 also.

The numbers are therefore all equal to N/3.

Further, Txx = 4, Tyy = 4 and Txy = 2. Therefore K = 4 x 4 - 2² > 0.

Also, Txx > 0, giving a minimum value when x = y = z = N/3.


Lagrange Multipliers
We will now look at the problem of finding the maximum or minimum value of a function f(x, y)
subject to a restrictive condition. We have met this kind of situation several times before, but in this
session our approach will be rather different. Consider the problem outlined below :

'A manufacturer of cylindrical containers that hold 90π cm³ plans to make the top and bottom of a
material that costs $0.05 per cm² and the curved surface of a material that costs $0.03 per cm². What
dimensions should the container have to keep the cost of material as low as possible ?'

If the base radius = r cm, the height = h cm and the total cost of material = $C,

C = 2πr² x 0.05 + 2πrh x 0.03. We also have the condition that πr²h = 90π, i.e.

r²h = 90.

Our previous work on this topic required us to use a substitution such as h = 90/r² to

Lagrange Multiplier
We will now approach this same problem from a rather different angle, using the method of the
Lagrange Multiplier. This method (which again has to be stated without proof) is outlined below :

If f(x, y) is to be maximized or minimized subject to the condition g(x, y) = 0,

1. Introduce a new variable λ such that F(x, y, λ) = f(x, y) + λg(x, y).


2. Calculate Fx , Fy and Fλ and solve the system of equations Fx = 0, Fy = 0, Fλ = 0.
3. The subsequent values obtained for x and y give the solution for maximizing or
minimizing f(x, y).

[ Note that this method does not distinguish between maximum and minimum points. If this is
required in a problem, we can use the second partial derivative test which we developed earlier. ]
Example 1

Taking the problem previously solved regarding the cylindrical containers,

let F(r, h, λ) = 2πr² x 0.05 + 2πrh x 0.03 + λ(r²h − 90).

[ Note that the condition was previously simplified to r²h = 90. However, the result

requires that the condition is written in the form g(x, y) = 0. ]

Now, Fr = 4πr x 0.05 + 2πh x 0.03 + 2λrh = 0.2πr + 0.06πh + 2λrh,

F h = 2πr x 0.03 + r²λ = 0.06πr + r²λ , and Fλ = r²h − 90.

Putting Fr = Fh = Fλ = 0, we are now faced with the problem of determining the values of

r, h and λ that solve this system of equations.

As 0.06πr + r²λ = 0, λ = - 0.06πr/r² = - 0.06π/r.

Substituting in 0.2πr + 0.06πh + 2λrh = 0, we obtain 0.2πr + 0.06πh − 0.12πh = 0.

Therefore 0.2r − 0.06h = 0, i.e. 20r − 6h = 0 and r = 3h/10.

One can hardly blame you for asking the obvious question at this point, "Why go to all this trouble
when the first method seems to be much easier ?" The only answer that can be given is that sometimes
substituting using the 'constraint equation' can be very complicated, even though this would probably
not be the case in the questions we will attempt. Still, the method of using Lagrange Multipliers gives
us 'another string to our bow', which is what mathematics is all about, i.e. giving us the armoury to
tackle whatever problems we may meet !

Example 2
A firm produces air filters and oil filters and has estimated its monthly cost function for

producing x units of air filters and y units of oil filters to be

C(x, y) = 8x² + 6y² - 20y + 8xy − 8x + 10.


If the firm must produce a total of 90 units (due to consumer demand), how many of each

should it produce in order to minimize cost ? What would be this minimum cost ?

The constraint equation in this case is x + y = 90, i.e. x + y − 90 = 0.

We therefore put F(x, y, λ) = C(x, y) + λ(x + y − 90)

= 8x² + 6y² - 20y + 8xy − 8x + 10 + λ(x + y − 90).

Therefore F x = 16x + 8y − 8 + λ , Fy = 12y − 20 + 8x + λ and Fλ = x + y − 90.

Therefore, if Fx = Fy = Fλ = 0, x + y = 90.

Also, eliminating λ from the equations 16x + 8y − 8 + λ = 0, 12y − 20 + 8x + λ = 0,

- 16x − 8y + 8 = - 12y + 20 − 8x. Therefore 4y − 8x − 20 = 0, i.e. y − 2x = 3.

Therefore, as x + y = 90, we substitute y = 3 + 2x to give x + 3 + 2x = 90.

Therefore 3x = 87 and x = 29. Also, y = 3 + 58 = 61.

The firm should therefore produce 29 units of air filters and 61 units of oil filters in order

to minimize costs.

The minimum cost would be $(8 x 29² + 6 x 61² - 20 x 61 + 8 x 29 x 61 − 8 x 29 + 10)

= $(6728 + 22326 − 1220 + 14152 − 232 + 10) = $41764.

Example 3

A farm has 100m of metal railing with which to form two adjacent sides of a rectangular enclosure,
the other two sides being two existing walls of the yard, meeting at right angles (see the diagram
below). What dimensions will give him the maximum possible area ?
Clearly the constraint equation is x + y = 100, i.e. x + y − 100 = 0.

Also, the area A = xy. We can now put F(x, y, λ) = xy + λ(x + y − 100).

Therefore Fx = y + λ, Fy = x + λ and Fλ = x + y − 100.

Therefore, if y + λ = 0 and x + λ = 0, x = y = - λ. Hence - 2λ − 100 = 0 and λ= - 50.

Therefore x = y = 50 and the dimensions for the maximum possible area are 50m by 50m.
Double Integrals
Although we have found volumes of solids by integration before, these were restricted to solids with a
circular cross-section. In this session, however, we will discover how to find volumes of solids such as
the one below, where the base consists of all points (x, y) in some given region R, and the height z
varies with each (x, y), this height being given by f(x, y).

Suppose we now divide this volume V into an infinite number of rectangular solids such

as the one shown in the diagram below (although the size of this rectangular solid is

greatly exaggerated !).


In the diagram above please note that ∆y, ∆x should be changed to δy, δx .

The volume of the given rectangular solid would be δx. δy. f(x, y), and the volume V of the total solid
would approximately equal the sum of these individual volumes. This approximation, of course,
would improve as the number, n, of rectangular solids increases, tending to a limit of V as n → 8.

We can therefore write V = Σ δx. δy. f(x, y), summed over all the possible values of (x, y). How do we
find such an infinite sum ? Well, we have met this kind of situation before ! Remember how we
explained that 'the area between a curve and the x-axis' could be found by dividing the area into an
infinite number of rectangular strips ?

The area between the curve y = f(x), the x-axis and the lines x = a, x = b is given approximately by
adding rectangular strips of area y.δx such as the one shown above. As the number of rectangular
strips in this region increases indefinitely, the sum

In a similar way, if the number of rectangular solids of volume dx. dy. f(x, y) increases indefinitely, the
volume V is given by

∫ ∫ f(x, y) dx
, i.e. a double integral.
dy
Example 1
Volumes Using Double Integrals
To ease you into these problems, we will look at several examples of increasing difficulty.

Example 2
Example 3

In this example, the base region R is no longer rectangular, the equation of the line L being y = - 2x +
4. Also, the 'top' of the solid is taken to be parallel to the xy plane. In this case, the top of the solid is
part of the plane z = 5.

= area of base x height. In this example, the volume = ½ x 2 x 4 x 5 = 20, which, of course, agrees with
our previous solution.

Example 4

Our next example seeks to vary the height of the solid.


Example 5

Find the volume of the solid with base R bounded by y = 0, y = x² and x = 1, and

f(x, y) = 15 - 3x - y.

The base would look like

You might also like