17

Functions of more than one variable

17.1 Introduction

We concentrated so far in this book on functions of time. In Chapter 5 we looked at waves that were functions of distance, x, and time, t. For many applications, we need to analyse functions of the three possible spatial coordinates, x, y, and z and also of time, t. For instance, consider making a mug of tea using a tea bag. When first brewed, the temperature will be nearly at boiling point 100°C. The temperature of the water will start off being much the same everywhere but it will be cooler near the tea bag and at the sides of the mug. As time progresses the surface of the tea and those parts in touch with the mug, will cool quicker than the centre of the tea. We can see that the temperature of a mug of tea is a function both of where in the mug we measure it and also the length of time since the tea was first made. This is a function of more than one variable.

Some of the ideas that we have learnt for analysing a function of a single variable we revisit here for functions of more than one variable. In this chapter we consider graphs of functions and taking their partial derivatives, changing variables, using the chain rule and the derivative in any given direction. To begin we need to think about visualizing these functions and that means considering how to visualize graphs of functions that would require three or more dimensions when armed only with a two-dimensional sheet of paper.

17.2 Functions of two variables – surfaces

When drawing a graph we need one dimension to represent the actual function value, the dependent variable, for which we have used the vertical axis. When drawing a graph of distance, x or of time t, we are able to use the horizontal axis of the graph to represent the independent variable. Supposing now we have a function of two spatial dimensions – for instance, the height above sea level on a landscape or the temperature in a cup of tea at the surface of the tea. We would like to be able to picture these functions. However, we need more than one horizontal axis in order to be able to represent the spatial dimensions x and y when a picture on a page of this book has only one horizontal direction. We could build three-dimensional models only this would be time consuming and make book production even more costly. One of the ways of representing these graphs on a page of paper is to use a perspective representation of a surface. The other way of doing it is to draw a plan of the function from above and use contours to represent the function value at each point. You are familiar with this from maps that mark contours representing the height of the ground at each point. Another example is meteorological forecasts that use contours superimposed on maps of the country, to represent the air pressure. A third way to picture the functions is to take a cross section parallel to either one of the x- or y-axes.

Graphs of functions of two variables

The function:

ϕ=4πɛ0q(x2+y2)1/2

si1_e

represents the electrical potential field of a point source (where z = 0) positioned at the origin. Various graphs of this function are shown in Figure 17.1: (a) has a perspective view; (b) has a contour representation; and (c) and (d) show x and y cross-sections.

f17-01-9780750658553
Figure 17.1 Graphs of ϕ = 4πε0q/(x2+ y2)1/2. (a) A perspective view. (b) Contour representation. (c) A cross-section parallel to the x-axis for a fixed value of y. (d) A cross-section parallel to the y-axis for a fixed value of x

Graphs of the function h = 4 −2x2 + y are shown in Figure 17.2.

f17-02-9780750658553
Figure 17.2 Graphs of h = 42X2 + y. (a) A perspective view. (b) Contour representation. (c) A cross-section parallel to the x-axis for a fixed value of y. (d) A cross-section parallel to the y-axis for a fixed value of x.

17.3 Partial differentiation

From the graphs of functions that we looked at in the last section we can see that we are able to take a cross-section either parallel to the x-axis or parallel to the y-axis. Each cross-section can be represented by a function of one variable only. If we take a cross-section parallel to the x-axis, then we have fixed y and only x is varying. In this case, we can differentiate the function as a function of one variable.

It is this idea that is used for partial differentiation. We can find the derivative along a line parallel to the x-axis by ‘freezing’ y and differentiation with respect to x only. We can find the derivative along a line parallel to the y-axis by ‘freezing’ x and differentiation with respect to y only. Partial derivatives of the function u = f (x, y) are defined by:

ux=limδx0u(x+δx,y)u(x,y)δx

si2_e

uy=limδy0u(x,y+δy)u(x,y)δy

si3_e

u/∂x reads as ‘partial du by dx’ and ∂u/∂y reads as ‘partial du by dy’.

Example 17.1

u=x33x2y+y.

si4_e

Find its partial derivatives u17-01-9780750658553and u17-02-9780750658553.

Solution To find u17-03-9780750658553, we differentiate, u with respect to x and treat y as though it were a constant

ux=3x23(2)xy=3x26xy.

si5_e

To find ∂u/∂y, we differentiate u with respect to y and treat x as though it were a constant

uy=3x2+1.

si6_e

We can substitute particular values for x and y in order to find the slope of the graph parallel to the x- and parallel to the y-axes.

Example 17.2

Find the slope of the curve h = 4 − 2x2 + y at the point where x = 3, y = 2

(a) in a direction parallel to the x-axis,

(b) in a direction parallel to the y-axis.

Solution

(a) To find the slope parallel to the x-axis, we freeze y and differentiating with respect to x, that is, we need the partial derivative with respect to x

h=42x2+yhx=4x.

si7_e



At the point (3, 2), u17-04-9780750658553 = −12 and therefore the slope parallel to the x-axis is −12.

(b) To find the slope parallel to the y-axis, we freeze x and differentiating with respect to y, that is, we need the partial derivative with respect to y.

h=42x2+yuy=1.

si8_e



At the point (3, 2), u17-05-9780750658553 = 1 and therefore the slope parallel to the y-axis is 1.

17.4 Changing variables – the chain rule

Supposing we have a function, u = f(x, y), and x and y are functions of s and t so that x = v(s,t),y = w(s,t), and u = F(s,t). We want to find a relationship between the partial derivatives of u with respect to s and t and those with respect to x and y. We assume in the following discussion that we have well-behaved functions, that is, the functions and their partial derivatives do not have discontinuities in the region of x, y.

We want to find the partial derivative of u with respect to s, that is, we would like to find

us=limδs0u(s+δs,t)u(s,t)δs.

si9_e

As we are considering a change of variable so that the point (x, y) corresponds to the point (s, t) and therefore u (x, y) = u (s, t). We consider a small change, δs, in the variable s so that the point (s + δs, t) will correspond to some point (x + δx, y + y) in the (x, y) plane, where δx and δy are small. Again u(s + δs, t) will have the same value as u(x + δx,y + δy). Using u(s + δs,t) = u(x + δy,y + δy) = u(x + δx,y + δy) – u(x,x + δy) + u(x,y + δy) and u(x,y) = u(s, t) we find:

us=limδs0u(x+δx,y?+δy)u(x,y+δy)+u(x,y+δy)u(x,y)δs=limδs0u(x+δx,y+δy)u(x,y+δy)δs+limδs0u(x,y+δy)u(x,y)δs.

si10_e

As long as δx, δy are not actually equal to 0 we can multiply the first term by δxx and the second term by δy /δy. As 8s →0, so also δx → 0 and δy → 0, hence we get

us=limδx0,δy0u(x+δx,y?+δy)u(x,y+δy)δxlimδs0δxδs+limδx0limδy0u(x,y+δy)u(x,y)δylimδs0δyδs.

si11_e

In the first term, we can take the limit as δy → 0 to get:

us=limδx0u(x+δx,y)u(x,y)δxlimδs0δxδs+limδy0u(x,y+δy)u(x,y)δylimδs0δyδs.

si12_e

Using our previous definitions of the partial derivative we take the limits to find:

us=uxxs+uyys.

si13_e

Similarly, we can show that

ut=uxxt+uyyt.

si14_e

Example 17.3

Given h = 4 − 2x2 + y and x = r cos(θ), y = r sin(θ) find u17-06-9780750658553.

Solution We can find the following partial derivatives:

hx=4xhy=1xr=cos(θ)yr=sin(θ)xθ=rsin(θ)yθ=rcos(θ).

si15_e

To find u17-07-9780750658553we use the chain rule:

hr=hxxr+hyyrhr=4xcos(θ)+sin(θ)

si16_e

and substituting for x and y gives

hr=4rcos2(θ)+sin(θ)

si17_e

Similarly, to find u17-08-9780750658553we use the chain rule:

hθ=hxxθ+hyyθhθ=4x?rsin(θ)+rcos(θ)

si18_e

and substituting for x and y gives

hθ=4r2cos(θ)sin(θ)+rcos(θ).

si19_e

Check: We should get the same result by substituting for x and y in h and then directly finding u17-09-9780750658553and u17-10-9780750658553. Substituting x = r cos(θ) and y = r sin(θ) into h = 4 − 2x2 + y gives

h=42r2cos2(θ)+rsin(θ).

si20_e

Differentiating h with respect to r and keeping θ constant gives:

hr=4rcos2(θ)+sin(θ).

si21_e

Differentiating h with respect to θ and keeping r constant gives:

hθ=2r22cos(θ)sin(θ)+rcos(θ)=4r2cos(θ)sin(θ)+rcos(θ)

si22_e

and we see that these are the same results as before.

17.5 The total derivative along a path

We have found the derivatives in the x- and y-directions for some function u = f (x, y). We would now like to consider the derivative along any given path, where for instance x = g(t) and y = h(t), that is, both x and y are a function of t. Consider a small change in u, δu, in the direction of the path, with a change in t of δt. Then we can define the total derivative along the path as:

dudt=limδt0u(x+δx,y+δy)u(x,y)δt.

si23_e

Substituting u(x + δy, y + δy) = u(x + δx, y + δy) − u(x,x + δy) + u(x, y + δy) and multiplying the first term by δxx and the second term by δyy gives:

dudt=limδx0,δy0u(x+δx,y?+δy)u(x,y+δy)δxlimδt0δxδt+limδx0,limδy0u(x,y+δy)u(x,y)δylimδt0δyδt.

si24_e

As x and y are functions of t only,

limδt0δxδt=dxdtandlimδt0δyδt=dxdt

si25_e

so taking the limits in the expression above we get:

dudt=uxdxdt+uydydt.

si26_e

This is the second version of the chain rule, where we are not just making a change of variables but now we are limiting the direction of the derivative to be along a particular path, such that x = g(t) and y = h(t). This is the total derivative function along the path and du/dt is the gradient of the tangent along the path defined by (x(t), y(t)).

Approximations

As we now have a way of determining the gradient along any given path as

dudt=uxdxdt+uydydt.

si27_e

We can use this to estimate the value of the function near some known value (x, y). In Chapter 7, we used the approximation that for small δx, δy / δx ≈ dy/dx. Therefore, along some known path we can use δxt ≈ dx/dt, δyt ≈ dy/dt and δut ≈ du/dt. Substitute these into the above chain rule above to get: δut ≈ (∂u/∂x)(δxt) + (∂u/∂y)(δyt). As long as δt is not actually equal to 0, we can multiply both sides of this equation by δt to get

δuuxδx+uyδy.

si28_e

This expression can be used to approximate the value of a function near a known value.

Example 17.4

The focal length of a convex lens is given by

1f=1p+1q

si29_e

where p is the distance of some object and q the distance of its image, measured in both case from the position of the lens. The maximum error in measurement of distances is known to be 5%. If p and q are measured as 10 and 2.5 cm respectively, estimate the focal length of the lens and the maximum error in your estimate.

Solution We have p = 0.1 m and q = 0.025 m. Substituting for f gives

1f=10.1+10.0251f=10+40=50f=0.02

si30_e

We can approximate the error for ƒ using:

δffpδp+fqδq

si31_e

to estimate the maximum error in this value for f. If the error in measurement of p and q could be up to 5%, then the maximum errors for p and q are given by:

δp=p?×?5/100,?substitute?p=0.1,?giving?δp=0.005δq=q?×?5/100,?substitute?q=0.025,?giving?δq=0.00125

si32_e

We also find the first-order partial derivatives for f from the formula for f in terms of p and q, which we rewrite as

1f=q+ppqf=pqp+qfp=pq(p+q)2+qp+q=qp+q2pq(p+q)2=q2(p+q)2fq=pq(p+q)2+pp+q=p2+pqpq(p+q)2=p2(p+q)2.

si33_e

Substituting p = 0.1 and q = 0.025 gives

fp(0.1,0.025)=0.04andfq(0.1,?0.025)=0.64.

si34_e

Finally, we can estimate the error for f from

δffpδp+fqδq.

si35_e

At p = 0.1,q = 0.025, we have δp = 0.005, δq = 0.00125, ∂f /∂p = 0.04, and ∂f/∂q = 0.64, which gives ∂f ≈ 0.04 × 0.005 + 0.64 × 0.00125 = 0.001.

This means that the focal length of the lens is 0.02 m with a maximum error of approximately 0.001 m.

The chain rule holds whatever variable name we use in place of t, the parameter to describe the path in the x, y plane. It also holds whatever path we choose, that is, whatever the functions used for x = g(t) and y = h(t) (provided all the derivatives exist and are continuous in the region of the path). Therefore, we can use mathematical shorthand to give an expression for the total derivative, du:

du=uxdx+uydy.

si36_e

Example 17.5

Given u = x3 − 3y2x + y2 and x = 2t, y = 1−2t, find du/dt:

(a) using the chain rule,

(b) by direct substitution.

Solution (a) u=x33y2x+y2?and?x=2t,?y=12t,?so:si37_e

ux=3x23y2anduy=6yx+2ydxdt=2anddydt=2

si38_e

The chain rule

dudt=uxdxdt+uydydt

si39_e

gives

dudt=(3x23y2)2+(6yx+2y)(2)=6x26y2+12yx4y.

si40_e

Substituting for x and y as functions of t, we find:

dudt=6(2t)26(12t)2+12(12t)2t4(12t)=24t26+24t24t2+24t48t24+8t=48t2+56t10.

si41_e

(b) Substitute x = 2t, y = 1 − 2t into u = x3− −3y2x + y2 giving

u=8t33(12t)22t+(12t)2u=8t33(14t+4t2)2t+(14t+4t2)u=8t36t+24t224t3+14t+4t2u=16t3+28t210t+1

si42_e

Therefore, du/dt = −48t2 + 56t − 10.

17.6 Higher-order partial derivatives

We can carry on differentiating partial derivatives to find higher-order partial derivatives such as ∂2u/∂x2, ∂2u/∂y2, ∂2u/∂xy and ∂2u/∂yx, where

2ux2=xux2uy2=yuy2uxy=xuy2uyx=yux.

si43_e

For functions with continuous first-order derivatives

2uxy=2uyx.

si44_e

The partial derivatives ∂2u/∂x2, ∂2u/∂y2, ∂2u/∂xy, and ∂2u/∂yx are called the second-order partial derivatives of u because we have differentiated twice to find them. We can continue differentiating to find third-and higher-order partial derivatives.

Example 17.6

u=x42x3y+xy2.

si45_e

Find its first- and second-order partial derivatives with respect to x and y

Solution

u=x42x3y+xy2ux=4x36x2y+y2uy=2x3+2xy.

si46_e

We differentiate u17-11-9780750658553with respect to x, keeping y constant, to find

2ux2=xux=12x212xy.

si47_e

We differentiate u17-12-9780750658553with respect to y, keeping x constant, to find

2uy2=yuy=2x.

si48_e

We differentiate u17-13-9780750658553with respect to x, keeping y constant, to find

2uxy=xuy=6x2+2y.

si49_e

We differentiate u17-14-9780750658553with respect to y, keeping x constant, to find

2uyx=yux=6x2+2y.

si50_e

Notice that u17-15-9780750658553as expected.

17.7 Summary

1. A function u (x, y) is a function of two variables x and y; u is the dependent variable and x and y are the independent variables. The graph of this function can be represented on the page of a book or a computer screen by using a perspective representation of a surface or by using contours to represent the lines where the value of the function is constant.

2. A Function of two variables f(x y) has two first-order partial derivatives. The partial derivative with respect to x is found by considering y to be constant and then differentiating with respect to x only. The partial derivative with respect to y is found by considering x to be a constant and differentiating with respect to y only.

3. The chain rule can be used to change the variables of differentiation. Supposing we have a function, u = f(x, y), and x and y are functions of s and t so that x = v(s, t), y = w(s, t), and u = F(s, t), then:

us=uxxs+uyysandut=uxxt+uyyt

si51_e

4.  If we know the path on which we are travelling across the surface f (x, y), so that x and y are defined in terms of a parameter t, then it is possible to find the total derivative of f with respect to t because the gradient along the path will be unique at each point. It this case we can use:

dudt=uxdxdt+uydydt.

si52_e

5. Partial derivatives can be used for approximating the value of a function near a known value. For a function of two variables we have:

δuuxδx+uyδy.

si53_e

This can also be used to estimate the maximum error in a calculated value.

17.8 Exercises

17.1 Find the first-order partial derivatives of the following:

(a) f(x,?y)=x?ln(y2)si54_e

(b) g(x,?y)=x?+?xy4xysi55_e

(c) h(x,?y)=?tan1(xy)si56_e

(d) f(x,?y)=?4xyex2.si57_e

17.2 Use the chain rule to find partial derivatives of the following in terms of x and y where r=x2+y2si58_e and θ=tan1(yx)si59_e.

(a) u (r, θ) = sin(θ)/r

(b) u (r,θ) = r2 + tan (θ).

17.3 Given u=(x2+y2)/ysi60_e, find the value of the following partial derivatives at the point (0,4)

(a) uysi61_e

(b) 2uxysi62_e

(c) 2uyxsi63_e

(d) 2ux2si64_e

(e) 2uy2si65_e.

17.4 Given z = x2 + y2 and x = r cos(θ), y = r cos(θ) find ∂z/∂r and ∂z/∂θ by substitution and by using the relationships between the partial derivatives. Show that the results obtained are equal.

17.5 Given that z = 2x + 3y2 and x = 3t> + 5,y = − 2t find z/x,?z/y,?dx/dt,?dy/dt,?and?dz/dtsi66_e.

17.6 Given u = e−8t(A cos(2x) + B sin(2x)), evaluate u/tsi67_e and 2u/x2si68_e and hence show that u is a solution to the partial differential equation u/t=22u/x2si69_e.

17.7 Use the approximation

δuuxδx+uyδy

si70_e

with u=x2+y3si71_e near the point (6,4) to estimate the value of 5.962+4.033si72_e.

17.8 The power delivered to the load resistance RL for the circuit is given by

P=25?RL/(R+RL)2

si73_e

If R = 2000 and RL = 1000 with a possible error of 5% in either, find P and estimate the maximum error in P.

17.9 The height, width, and length of an open box are subject to errors of 1, 2, and 3%, respectively. Estimate to the nearest percentage the maximum relative error in calculating the surface area of the box for a desired height of 4 m, width of 3 m, and length of 2 m.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.97.149