Multivariable Calculus Multivariable calculus is a popular topic (chapter 2) in FP3. As is made clear in the introduction to that chapter, an important reason for stuing functions of more than one variable is that in many applications the value of the quantity you want to know depends on several other quantities (variables). Although a realistic model may use many variables, we shall concentrate on functions of two or three variables since the new ideas can be seen clearly in these cases. Functions of two variables An eample is z = f(, y) = + 2y + 1 This can be represented as a 2-dimensional surface in 3 dimensional space. It is sometimes helpful to draw a contour diagram consisting of curves of the form z = k e.g. the contour z = 5 gives the ellipse 2 + 2y 2 = 4. Alternatively, sections of the form = a or y = b can be useful. In the above eample, the section = 3 reduces to the parabola Derivatives z 2 = 2y + 10. The key concept in this chapter is differentiation. Unlike for functions of one variable, the two interpretations of differentiation as Partial Derivatives Find the rate of change of a function Find the tangent line at a point are essentially different for two or more variables. In higher dimensions, the rate of change of a function is complicated by having to specify rate of change with respect to what? In the eample, z depends on and y. Just knowing how one of these variables changes is insufficient to determine the behaviour of z. However, it does give important information. The process of finding the rate of change of one variable with respect to another, while keeping all other variables fied is known as partial differentiation. In the above eample, differentiating z with respect to while keeping y fied would be z f written: = 2 or = 2 or f ( y, ) = 2 1
The process of obtaining partial derivatives is the single most important technique in this chapter and students must know how to do it, but, if they are competent at normal differentiation, they will pick it up quickly. The split nature of differentiation in two or more dimensions becomes clear when we consider the analogy to a tangent line. Functions of two variables like the above can be represented as surfaces in three dimensions and the natural geometric equivalent of a tangent line is a tangent plane. The equation of the tangent plane at a point on the surface is obtained by considering the partial derivatives at this point. So, if z = f(,y), the tangent plane at the point P = (a,b,c) is given by: z c= f ( a) + f ( y b) (1) y or dz = d+ or dz = d+ where the partial derivatives are evaluated at P (2) (3) (2) is analogous to: = d where d and are differentials (see appendi 1). d This situation and these equations are best eplained by a diagram! (see appendi 2). In the eample z = + 2y + 1, at the point (2,3) the partial derivatives are: f (2,3) = 4 and f (2,3) = 12 The equation of the tangent plane at this point is z 23 = 4( 2) + 12( y 3) or 4+ 12y z = 21 A one-dimensional function is differentiable at a point if we can construct the tangent line. There are plenty of eamples of functions for which this is not possible eg. y = at (0,0). y 2
This happens because the function changes direction sharply at (0,0). Similarly, a two-dimensional function is differentiable at a point if we can construct the tangent plane. A function may not be differentiable (i.e. not have a tangent plane) at a point because it is sharp and not smooth there. The key difference from functions of one variable is that a function may have partial derivatives (i.e. it may be possible to differentiate with respect to and y separately) but not be differentiable, (i.e. it may not have a tangent plane). For eample, consider the surface z = y near the origin (0,0,0). From the 3-d plot it can be seen that, as we move away from the origin along the -ais or the y-ais: = 0 and = 0 But no suitable tangent plane can be defined which approimates the function successfully near the origin. For this and other functions, Autograph is a useful tool for drawing diagrams to clarify understanding. This is rather an artificial eample and most functions that students will meet in this unit are differentiable. Nevertheless it is important to maintain a distinction between the concept of differentiability (the eistence of an approimating tangent plane) and derivability (the eistence of the rate of change of a function with respect to a single variable (the partial derivative)). For completion, if the partial derivatives of a function eist near a point and are continuous there, then the function is differentiable and has a tangent plane at this point. Directional derivatives and the vector grad f The gradient on a surface depends on the direction taken (as with partial derivatives). The directional derivative d z ds is the rate of change of z in the direction d where s is the length of d. It can be thought of as the scalar change in z needed to stay on the tangent plane after a unit horizontal step û parallel to d. 3
dz = d+ may be written as a scalar product: d d z =. (4) The vector is called grad f and can be written as f or z So the directional derivative, d z ds = û.grad f The significance of grad f ( 0) at a point is that it is a vector normal to the contour through that point It gives the magnitude and direction of the greatest rate of change of f. (If grad f = 0, then both partial derivatives = 0 and the point is stationary (see below).) d If dz = 0 (i.e. we stay on the contour line) then grad f is perpendicular to d Also, the directional derivative is a maimum when grad f is parallel to i.e. grad f is a vector in the direction of greatest slope. So, in our eample if we set out from the point (2,3,23) and move 1 unit in a direction of 40 with the positive -ais, then d = cos40 and = sin40. The scalar change dz needed to stay on the tangent plane is given by: Stationary points dz = d+ = 4cos40 +12sin40 6.27 If z = f(,y), a point at which the tangent plane is horizontal is called a stationary point. At a stationary point, and are both zero. A stationary point could be a maimum or minimum or a saddle point but there are other possibilities (e.g. a ridge). The best way for students to investigate the nature of these is to consider values of the function near the point. 4
Functions of more than two variables As said at the beginning, eamples of functions of many variables are common. We will concentrate here on functions of three variables. If w = g(,y,z) w w w then dw= d+ + dz g g g or dw= d+ + dz (6) gives the equation of the tangent hyperplane. This is difficult to visualize (!) but can be useful in three ways: (1) If the function g is differentiable and δ = d, δy = d y and δz = d z, then the change in w, δw is given by: w w w δ w δ+ δy+ δz This result may be used to find approimations to the value of the function (dw gives the change on the tangent hyperplane ) near a known point. g g (2) If we define grad g as the vector y and û as the unit vector g d then from (6) d z dw = û.grad g gives the change in w on the tangent hyperplane for a unit change in,y and z. As before, this is the directional derivative (the rate of change of w in a particular direction) and may be written d w with s defined as before. ds (3) The (implicit) equation g(,y,z) = k defines a surface in three dimensions. Such a surface is a 3-d equivalent of a contour of the form f(,y) = k defined above. Now, if u d = is tangential to such a surface, d z 5
then (6) may be written: u.grad g = 0 (or u.grad w = 0) * (since dw = 0). This means that the (2-d!) tangent plane can easily be found since grad g is the normal vector to all vectors in the tangent plane. As in the A2 unit C4, once students are able to find the normal vector to a plane in 3-d space, most algebraic objects can be found easily (for eample the normal line at a point has direction vector grad g). The theory in (3) above may be used to find the tangent plane for functions of the form z = f(,y). In the original eample z = + 2y + 1, we can define w= g(, y, z) = + 2y z and the equation may be written: gyz (,, ) = 1 or w = 1 Then the tangent plane at the point (2,3,23,-1) can be found from u.grad g = 0 g 2 g y 3. = 0 z 23 g z 2 4 y 3. 12 = 0 z 23 1 4( 2) + 12( y 3) 1( z 23) = 0 4+ 12y z = 21 as before. This result (*) (with its offshoots) is really the only one that is required in this chapter. Hence you can teach the contents of this chapter at pace provided that your students learn and understand the significance of *. The technical requirements of partial differentiation and vector algebra should alrea be familiar to them from C3/C4. 6
Appendi 1: meaning of differentials In the Leibnitz notation, d y is regarded as a single entity, not as a ratio of two separate d quantities and d. In fact, and d can be given separate meanings in such a way that their ratio is equal to the derivative. Let y = f () where f is a differentiable function of. The differential d is defined as an independent variable, ie d can take any real value. The differential is then defined by the equation: = f ()d or = d d (So is also a variable, but is dependent on and d.) and the derivative d y can be interpreted as a ratio of differentials. d In 2 dimensions it is easy to interpret the differentials geometrically. Consider points P (, y ) and Q ( + δ y, + δ y) y R P Q S δ y δ =d RS Gradient at P = slope of tangent PR ie. d = PS RS = PS = δ = d= d d d The differential is the change in y to stay on the tangent line when changes by d. δ y is the change in y to stay on the curve when changes by δ (= d). 7
Appendi 2: the tangent plane z y R S B δ z C K Q M dz L(,y,c) A P(a,b,c) d H PQRS represents the surface z = f(,y). PABC represents the tangent plane to the surface at P. So dz = LM + BM = AH + CK dz = d+ where the partial derivatives are evaluated at P (which is equation (2) on page 2). John Cooper: 4.7.07 8