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.
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.
The function:
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.
Graphs of the function h = 4 −2x2 + y are shown in Figure 17.2.
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:
∂u/∂x reads as ‘partial du by dx’ and ∂u/∂y reads as ‘partial du by dy’.
Find its partial derivatives and .
Solution To find , we differentiate, u with respect to x and treat y as though it were a constant
To find ∂u/∂y, we differentiate u with respect to y and treat x as though it were a constant
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.
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
At the point (3, 2), = −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.
At the point (3, 2), = 1 and therefore the slope parallel to the y-axis is 1.
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
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:
As long as δx, δy are not actually equal to 0 we can multiply the first term by δx /δx and the second term by δy /δy. As 8s →0, so also δx → 0 and δy → 0, hence we get
In the first term, we can take the limit as δy → 0 to get:
Using our previous definitions of the partial derivative we take the limits to find:
Similarly, we can show that
Given h = 4 − 2x2 + y and x = r cos(θ), y = r sin(θ) find .
Solution We can find the following partial derivatives:
To find we use the chain rule:
and substituting for x and y gives
Similarly, to find we use the chain rule:
and substituting for x and y gives
Check: We should get the same result by substituting for x and y in h and then directly finding and . Substituting x = r cos(θ) and y = r sin(θ) into h = 4 − 2x2 + y gives
Differentiating h with respect to r and keeping θ constant gives:
Differentiating h with respect to θ and keeping r constant gives:
and we see that these are the same results as before.
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:
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 δx /δx and the second term by δy /δy gives:
As x and y are functions of t only,
so taking the limits in the expression above we get:
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)).
As we now have a way of determining the gradient along any given path as
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 δx /δt ≈ dx/dt, δy/δt ≈ dy/dt and δu/δt ≈ du/dt. Substitute these into the above chain rule above to get: δu/δt ≈ (∂u/∂x)(δx/δt) + (∂u/∂y)(δy/δt). As long as δt is not actually equal to 0, we can multiply both sides of this equation by δt to get
This expression can be used to approximate the value of a function near a known value.
The focal length of a convex lens is given by
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
We can approximate the error for ƒ using:
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:
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
Substituting p = 0.1 and q = 0.025 gives
Finally, we can estimate the error for f from
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:
Given u = x3 − 3y2x + y2 and x = 2t, y = 1−2t, find du/dt:
(b) by direct substitution.
Solution (a)
The chain rule
gives
Substituting for x and y as functions of t, we find:
(b) Substitute x = 2t, y = 1 − 2t into u = x3− −3y2x + y2 giving
Therefore, du/dt = −48t2 + 56t − 10.
We can carry on differentiating partial derivatives to find higher-order partial derivatives such as ∂2u/∂x2, ∂2u/∂y2, ∂2u/∂x∂y and ∂2u/∂y∂x, where
For functions with continuous first-order derivatives
The partial derivatives ∂2u/∂x2, ∂2u/∂y2, ∂2u/∂x∂y, and ∂2u/∂y∂x 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.
Find its first- and second-order partial derivatives with respect to x and y
Solution
We differentiate with respect to x, keeping y constant, to find
We differentiate with respect to y, keeping x constant, to find
We differentiate with respect to x, keeping y constant, to find
We differentiate with respect to y, keeping x constant, to find
Notice that as expected.
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:
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:
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:
This can also be used to estimate the maximum error in a calculated value.
17.1 Find the first-order partial derivatives of the following:
(b)
(c)
(d)
17.2 Use the chain rule to find partial derivatives of the following in terms of x and y where and .
(b) u (r,θ) = r2 + tan (θ).
17.3 Given , find the value of the following partial derivatives at the point (0,4)
(b)
(c)
(d)
(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 .
17.6 Given u = e−8t(A cos(2x) + B sin(2x)), evaluate and and hence show that u is a solution to the partial differential equation .
17.7 Use the approximation
with near the point (6,4) to estimate the value of .
17.8 The power delivered to the load resistance RL for the circuit is given by
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.
18.222.97.149