Difference between revisions of "Functions of Several Variables"
(Created page with "* [https://tutorial.math.lamar.edu/classes/calciii/multivrblefcns.aspx Functions of Several Variables], Paul's Online Notes * [https://math.libretexts.org/Bookshelves/Calculus...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | '''See also: [[Equations of Lines, Planes and Surfaces in Space]]''' | ||
+ | |||
+ | |||
+ | |||
+ | This chapter serves as an introduction to multivariable calculus. Multivariable calculus is more complicated than when we were dealing with single-variable functions because more variables means more situations to be concerned about. In the following chapters, we will be discussing limits, differentiation, and integration of multivariable functions, using single-variable calculus as our basis. | ||
+ | ==Topology in <math>\R^n</math>== | ||
+ | In your previous study of calculus, we have looked at functions and their behavior. Most of these functions we have examined have been all in the form | ||
+ | :<math>f(x):\R\to\R</math> | ||
+ | and only occasional examination of functions of two variables. However, the study of functions of ''several'' variables is quite rich in itself, and has applications in several fields. | ||
+ | |||
+ | We write functions of vectors - many variables - as follows: | ||
+ | :<math>f:\R^m\to\R^n</math> | ||
+ | and <math>f(\vec{x})</math> for the function that maps a vector in <math>\R^m</math> to a vector in <math>\R^n</math> . | ||
+ | |||
+ | Before we can do calculus in <math>\R^n</math> , we must familiarize ourselves with the structure of <math>\R^n</math> . We need to know which properties of <math>\R</math> can be extended to <math>\R^n</math> . This page assumes at least some familiarity with basic linear algebra. | ||
+ | |||
+ | === Lengths and distances=== | ||
+ | If we have a vector in <math>\R^2</math> we can calculate its length using the Pythagorean theorem. For instance, the length of the vector <math>(2,3)</math> is | ||
+ | :<math>\sqrt{3^2+2^2}=\sqrt{13}</math> | ||
+ | |||
+ | We can generalize this to <math>\R^n</math> . We define a vector's length, written <math>\|\vec{x}\|</math> , as the square root of the sum of the squares of each of its components. That is, if we have a vector <math>\vec{x}=(x_1,\ldots,x_n)</math> , | ||
+ | :<math>\|\vec{x}\|=\sqrt{x_1^2+\cdots+x_n^2}</math> | ||
+ | |||
+ | Now that we have established some concept of length, we can establish the distance between two vectors. We define this distance to be the length of the two vectors' difference. We write this distance <math>d(\vec{x},\vec{y})</math> , and it is | ||
+ | :<math>d(\vec{x},\vec{y})=\big\|\vec{x}-\vec{y}\big\|=\sqrt{\sum_{i=1}^n(x_i-y_i)^2}</math> | ||
+ | |||
+ | This distance function is sometimes referred to as a ''metric''. Other metrics arise in different circumstances. The metric we have just defined is known as the ''Euclidean'' metric. | ||
+ | |||
+ | ===Open and closed balls=== | ||
+ | In <math>\R</math> , we have the concept of an ''interval'', in that we choose a certain number of other points about some central point. For example, the interval <math>[-1,1]</math> is centered about the point 0, and includes points to the left and right of 0. | ||
+ | |||
+ | In <math>\R^2</math> and up, the idea is a little more difficult to carry on. For <math>\R^2</math> , we need to consider points to the left, right, above, and below a certain point. This may be fine, but for <math>\R^3</math> we need to include points in more directions. | ||
+ | |||
+ | We generalize the idea of the interval by considering all the points that are a given, fixed distance from a certain point - now we know how to calculate distances in <math>\R^n</math> , we can make our generalization as follows, by introducing the concept of an ''open ball'' and a ''closed ball'' respectively, which are analogous to the open and closed interval respectively. | ||
+ | :an ''open ball'' | ||
+ | ::<math>B(\vec{a},r)</math> | ||
+ | :is a set in the form <math>\Big\{\vec{x}\in\R^n\Big|d(\vec{x},\vec{a})<r\Big\}</math> | ||
+ | :a ''closed ball'' | ||
+ | ::<math>\overline{B}(\vec{a},r)</math> | ||
+ | :is a set in the form <math>\Big\{\vec{x}\in\R^n\Big|d(\vec{x},\vec{a})\le r\Big\}</math> | ||
+ | |||
+ | In <math>\R</math> , we have seen that the open ball is simply an open interval centered about the point <math>x=a</math> . In <math>\R^2</math> this is a circle with no boundary, and in <math>\R^3</math> it is a sphere with no outer surface. (''What would the closed ball be?'') | ||
+ | |||
+ | <!-- | ||
+ | *===Neighbourhoods=== | ||
+ | A neighbourhood is an important concept to determine whether a set later, is open or closed. A set <math>N</math> in <math>\R^n</math> is called a neighbourhood (usually just abbreviated to nhd) of <math>\vec{a}</math> in <math>\R^n</math> such that <math>\vec{a}</math> is contained in <math>N</math> , and that for some <math>r</math> , an open ball of radius <math>r</math> about <math>\vec{a}</math> is a subset of <math>N</math> . | ||
+ | |||
+ | More symbolically, <math>\forall r>0,d(\vec{x},\vec{a})<r\ \Rightarrow\ \vec{x}\in N</math> . | ||
+ | |||
+ | Simply put, all points sufficiently close to <math>a</math>, are also in <math>N</math> . | ||
+ | --> | ||
+ | <!-- image --> | ||
+ | <!-- | ||
+ | We have some terminology with certain points and their neighbourhoods - a point in a set with a neighbourhood lying completely in that set is known as an ''interior point'' of that set. The set of all interior points of a set <math>S</math> is known as the ''interior'' of the set <math>S</math> and is written <math>S^\circ</math> . | ||
+ | |||
+ | *===Open and closed sets=== | ||
+ | With these ideas now, we can formulate the concept of an open set and a closed set. | ||
+ | |||
+ | We say that a set is ''open'' if every point in that set is an interior point of that set, which means that we can construct a neighbourhood of every point in that set. Symbolically, for all <math>\vec{a}\in S</math> , there is a <math>r'>0</math> , so all <math>\vec{x}</math> satisfying <math>d(\vec{x},\vec{a})<r'</math> is in <math>S</math> . | ||
+ | |||
+ | We have the fact that open balls are open sets. <!-- shall put proof later --> | ||
+ | <!-- | ||
+ | With the idea of the ''complement'' of a set <math>S</math> being all the points that are not in <math>S</math> , written <math>S^c</math> or <math>S'</math> , a ''closed'' set is a set with its complement being open. | ||
+ | |||
+ | It is important to note that most sets are not open or closed. Think about a box in <math>\R^2</math> with its top and bottom included, and it's left and right sides open - this set is <math>\{(x,y)|\|x\|<1\text{ and }\|y\|\le1\}</math> . | ||
+ | |||
+ | *===Limit points=== | ||
+ | A ''limit point'' of some set <math>S</math> is a point where, if we construct a neighbourhood about that point, that neighbourhood always contains some other point in <math>S</math> . | ||
+ | |||
+ | Here's an example. If <math>S=\left\{\frac{1}{n}\bigg|n\in\Z^+\}</math> , and we pick the point 0, we can always construct a neighbourhood about 0 which includes some other point of <math>S</math> . This brings up the important point that a limit point need not be in that set. 0 is clearly not in <math>S</math> - but is a limit point of that set. | ||
+ | |||
+ | If we include all the limit points of a set including that set, we call that set the ''closure'' of <math>S</math> , and we write it <math>\overline{S}</math> . | ||
+ | |||
+ | Limit points allow us to also characterize whether a set is open or closed - a set is ''closed'' if it contains all its limit points. | ||
+ | |||
+ | --> | ||
+ | |||
+ | === Boundary points === | ||
+ | If we have some area, say a field, then the common sense notion of the ''boundary'' is the points 'next to' both the inside and outside of the field. <!-- We can make this analogy with sets in <math>\R^n</math> . A ''boundary point'' of a set <math>S</math> is a point where every neighbourhood of that point contains at least a point in <math>S</math> and not in <math>S</math> . --> For a set, <math>S</math> , we can define this rigorously by saying the boundary of the set contains all those points such that we can find points both inside and outside the set. We call the set of such points <math>\partial S</math> . | ||
+ | |||
+ | Typically, when it exists the dimension of <math>\partial S</math> is one lower than the dimension of <math>S</math> . e.g. the boundary of a volume is a surface and the boundary of a surface is a curve. | ||
+ | |||
+ | This isn't always true; but it is true of all the sets we will be using. | ||
+ | |||
+ | <!-- | ||
+ | For example, | ||
+ | :<math>\partial\overline{B}((0,0),1)=\{(x,y)|x^2+y^2=1\}</math> | ||
+ | The boundary of a closed ball in <math>\R^2</math> is the circle surrounding the interior of that ball. | ||
+ | --> | ||
+ | |||
+ | <!-- === Bounded sets === Too short a section to warrant an heading --> | ||
+ | A set <math>S</math> is ''bounded'' <!--(don't confuse with ''boundary'')--> if there is some positive number such that we can encompass this set by a closed ball about <math>\vec0</math> . --> if every point in it is within a finite distance of the origin, i.e there exists some <math>r>0</math> such that <math>\vec{x}</math> is in S implies <math>\vec{x}<r</math> . | ||
+ | |||
+ | == Limits == | ||
+ | We will focus on the limits of two-variable functions while reviewing the limits of single-variable functions. Multivariable limits are significantly harder than single-variable limits because of different directions. Assume that there is a single-variable function:<blockquote><math>y=f(x)</math></blockquote>In order to ensure that <math>\lim_{x\rightarrow c}f(x)</math> exists, we need to test it from two directions: one approaching <math>c</math> from the left side (<math>x\rightarrow c^-</math>) and the other approaching <math>c</math> from the right side (<math>x\rightarrow c^+</math>). Recall that<blockquote><math>\lim_{x\rightarrow c}f(x)</math> exists when <math>\lim_{x\rightarrow c^-}f(x)=\lim_{x\rightarrow c^+}f(x)</math>.</blockquote>For example, <math>\lim_{x\rightarrow 0}\frac{1}{x}</math> does not exist because <math>\lim_{x\rightarrow 0^-}\frac{1}{x}=-\infty</math> and <math>\lim_{x\rightarrow 0^+}\frac{1}{x}=\infty</math>. Now, assume that there is a function with two variables:<blockquote><math>z=f(x,y)</math></blockquote>If we want to take a limit, for example, <math>\lim_{(x,y)\rightarrow(a,b)}f(x,y)</math>, not only do we need to consider the limit from the direction of the <math>x</math>-axis, we also need to consider the limit from all directions, which includes the <math>y</math>-axis, lines, curves, etc. Generally speaking, if there is one direction where the calculated limit is different from others, the limit does not exist. We will be discussing this in detail [[Calculus/Multivariable Calculus/Limits and Continuity|here]]. | ||
+ | |||
+ | == Differentiable functions == | ||
+ | [[File:Graph of a two-variable function.gif|thumb|307x307px|A two variable function <math>f(x,y)=(x^2+3y^2)^{1-x^2-y^2}</math>]] | ||
+ | When we expand our scope into the 3-dimensional world, we have significantly more situations to consider. For example, derivatives. In previous chapters, derivatives only have one direction (the <math>x</math>-axis) because there is only one variable.<blockquote><math>\frac{d(x^3+4x)}{dx}=3x^2+4</math></blockquote>When we have two or more variables, the rate of change can be calculated in different directions. For example, take a look at the image on the right. This is the graph of a two-variable function. Since there are two variables, the domain will be the whole <math>xy</math>-plane. We will graph the output <math>f(x,y)</math> on the <math>z</math>-axis. The equation for the function on the right is:<blockquote><math>f(x,y)=(x^2+3y^2)^{1-x^2-y^2}</math></blockquote>How can we calculate a derivative? The answer is to use partial derivatives. As the name suggests, it can only calculate a derivative "partially" because we can only calculate the rate of change of a graph in one direction. | ||
+ | |||
+ | === Partial derivatives === | ||
+ | Notations are important for partial derivatives.<blockquote><math>\frac{\partial}{\partial x}f(x,y)</math> means the derivative of <math>f(x,y)</math> in the <math>x</math>-axis direction, where we only view the <math>x</math> as a variable while <math>y</math> as a constant. | ||
+ | |||
+ | |||
+ | <math>\frac{\partial}{\partial y}f(x,y)</math> means the derivative of <math>f(x,y)</math> in the <math>y</math>-axis direction, where we only view the <math>y</math> as a variable while <math>x</math> as a constant.</blockquote>For simplicity, we will often use various standard abbreviations, so we can write most of the formulae on one line. This can make it easier to see the important details. | ||
+ | |||
+ | We can abbreviate partial differentials with a subscript, e.g.,<blockquote><math>f_x(x,y)= \frac{\partial f}{\partial x} \quad f_y(x,y)= \frac{\partial f}{\partial y} \quad f_{xy}=\frac{\partial^2f}{\partial x \partial y}=\frac{\partial^2f}{\partial y \partial x}=f_{yx}</math></blockquote>When we are using a subscript this way we will generally use the Heaviside ''D'' (which stands for "directional") rather than ∂,<blockquote><math>D_x h(x,y)= \frac{\partial h}{\partial x} | ||
+ | \quad D_x D_y h= D_y D_x h</math> | ||
+ | |||
+ | |||
+ | <math>D_{\mathbf{\hat{u}}}f(x,y)</math> means the derivative of <math>f</math> in the direction <math>\mathbf{\hat{u}}=\langle a,b\rangle</math></blockquote>If we are using subscripts to label the axes, ''x<sub>1</sub>, x<sub>2</sub>'' …, then, rather than having two layers of subscripts, we will use the number as the subscript.<blockquote><math>h_1 = D_1 h = \partial_1 h = \partial_{x_1}h = \frac{\partial h}{\partial x_1} | ||
+ | </math></blockquote>We can also use subscripts for the components of a vector function, <math>\mathbf{u}=\langle u_x, u_y, u_z \rangle \text{ or } \mathbf{u}=(u_1,u_2,...,u_n)</math> | ||
+ | |||
+ | If we are using subscripts for both the components of a vector and for partial derivatives we will separate them with a comma.<blockquote><math>u_{x,y}=\frac{\partial u_x}{\partial y}</math></blockquote>The most widely used notation is <math>f_x</math>. | ||
+ | |||
+ | We will use whichever notation best suits the equation we are working with. | ||
+ | |||
+ | === Directional derivatives=== | ||
+ | Normally, a partial derivative of a function with respect to one of its variables, say, ''x''<sub>''j''</sub>, takes the derivative of that "slice" of that function parallel to the ''x''<sub>''j''</sub>'th axis. | ||
+ | <!-- needs pic --> | ||
+ | |||
+ | More precisely, we can think of cutting a function '''''f'''''(''x''<sub>1</sub>,...,''x''<sub>''n''</sub>) in space along the ''x''<sub>''j''</sub>'th axis, with keeping everything but the ''x''<sub>''j''</sub> variable constant. | ||
+ | |||
+ | From the definition, we have the partial derivative at a point '''''p''''' of the function along this slice as | ||
+ | :<math>{\partial \mathbf{f} \over \partial x_j} = \lim_{t\rightarrow 0} {\mathbf{f}(\mathbf{p}+t\mathbf{e}_j) - \mathbf{f}(\mathbf{p}) \over t}</math> | ||
+ | |||
+ | provided this limit exists. | ||
+ | |||
+ | Instead of the basis vector, which corresponds to taking the derivative along that axis, we can pick a vector in any direction (which we usually take as being a unit vector), and we take the ''directional derivative'' of a function as | ||
+ | :<math>{\partial \mathbf{f} \over \partial \mathbf{d}} = \lim_{t\rightarrow 0} {\mathbf{f}(\mathbf{p}+t\mathbf{d}) - \mathbf{f}(\mathbf{p}) \over t}</math> | ||
+ | where '''''d''''' is the direction vector. | ||
+ | |||
+ | If we want to calculate directional derivatives, calculating them from the limit definition is rather painful, but, we have the following: if '''''f''''' : '''R'''<Sup>''n''</sup> → '''R''' is differentiable at a point '''''p''''', |'''''p'''''|=1, | ||
+ | : <math>{\partial \mathbf{f} \over \partial \mathbf{d}} = D_\mathbf{p} \mathbf{f}(\mathbf{d})</math> | ||
+ | |||
+ | There is a closely related formulation which we'll look at in the next section. | ||
+ | |||
+ | === Gradient vectors === | ||
+ | The partial derivatives of a scalar tell us how much it changes if we move along one of the axes. What if we move in a different direction? | ||
+ | |||
+ | We'll call the scalar ''f'', and consider what happens if we move an infintesimal direction '''''dr'''''=(''dx,dy,dz''), using the chain rule. | ||
+ | :<math>\mathbf{df}=dx\frac{\partial f}{\partial x} + | ||
+ | dy\frac{\partial f}{\partial y}+dz\frac{\partial f}{\partial z}</math> | ||
+ | |||
+ | This is the dot product of '''dr''' with a vector whose components are the partial derivatives of '''''f''''', called the gradient of '''''f''''' | ||
+ | |||
+ | <math>\operatorname{grad} \mathbf{f} = \nabla \mathbf{f} = | ||
+ | \left(\frac{\partial \mathbf{f}(\mathbf{p})}{\partial x_1},\cdots, | ||
+ | \frac{\partial \mathbf{f}(\mathbf{p})}{\partial x_n}\right)</math> | ||
+ | |||
+ | We can form directional derivatives at a point '''''p''''', in the direction '''''d''''' then by taking the dot product of the gradient with '''''d''''' | ||
+ | :<math>{\partial \mathbf{f}(\mathbf{p}) \over \partial \mathbf{d}} =\mathbf{d} \cdot \nabla \mathbf{f}(\mathbf{p})</math>. | ||
+ | |||
+ | Notice that grad ''f'' looks like a vector multiplied by a scalar. This particular combination of partial derivatives is commonplace, so we abbreviate it to | ||
+ | :<math>\nabla = \left( \frac{\partial }{\partial x}, | ||
+ | \frac{\partial }{\partial y}, \frac{\partial }{\partial z}\right) </math> | ||
+ | |||
+ | We can write the action of taking the gradient vector by writing this as an ''operator''. Recall that in the one-variable case we can write ''d''/''dx'' for the action of taking the derivative with respect to ''x''. This case is similar, but '''∇''' acts like a vector. | ||
+ | |||
+ | We can also write the action of taking the gradient vector as: | ||
+ | :<math>\nabla = \left( \frac{\partial }{\partial x_1}, | ||
+ | \frac{\partial }{\partial x_2}, \cdots \frac{\partial }{\partial x_n}\right) </math> | ||
+ | |||
+ | ==== Properties of the gradient vector ==== | ||
+ | ===== Geometry ===== | ||
+ | * Grad '''''f'''''('''''p''''') is a vector pointing in the direction of steepest slope of '''''f'''''. |grad '''''f'''''('''''p''''')| is the rate of change of that slope at that point. | ||
+ | |||
+ | For example, if we consider h(''x'', ''y'')=''x''<sup>2</sup>+''y''<sup>2</sup>. The level sets of ''h'' are concentric circles, centred on the origin, and | ||
+ | :<math> \nabla h = (h_x,h_y) = 2(x,y)= 2 \mathbf{r}</math> | ||
+ | grad ''h'' points directly away from the origin, at right angles to the contours. | ||
+ | |||
+ | * Along a level set, (∇'''''f''''')('''''p''''') is perpendicular to the level set {'''''x'''''|'''''f'''''('''''x''''')='''''f'''''('''''p''''') at '''''x'''''='''''p'''''}. | ||
+ | |||
+ | If '''dr''' points along the contours of ''f'', where the function is constant, then ''df'' will be zero. Since ''df'' is a dot product, that means that the two vectors, '''df''' and grad ''f'', must be at right angles, i.e. the gradient is at right angles to the contours. | ||
+ | |||
+ | ===== Algebraic properties ===== | ||
+ | Like ''d/dx'', ∇ is linear. For any pair of constants, ''a'' and ''b'', and any pair of scalar functions, ''f'' and ''g'' | ||
+ | :<math>\frac{d}{dx} (af+bg)= a\frac{d}{dx}f + b\frac{d}{dx}g | ||
+ | \quad \nabla (af+bg) = a \nabla f + b \nabla g</math> | ||
+ | |||
+ | Since it's a vector, we can try taking its dot and cross product with other vectors, and with itself. | ||
+ | |||
+ | |||
+ | ===Product and chain rules=== | ||
+ | |||
+ | Just as with ordinary differentiation, there are product rules for grad, div and curl. | ||
+ | |||
+ | *If ''g'' is a scalar and '''v''' is a vector, then | ||
+ | ::the divergence of ''g'''''v''' is | ||
+ | :<math>\nabla \cdot (g\mathbf{v})=g \nabla \cdot \mathbf{v} + (\mathbf{v} \cdot \nabla) g</math> | ||
+ | :: the curl of ''g'''''v''' is | ||
+ | :<math>\nabla \times (g\mathbf{v}) = g(\nabla \times \mathbf{v})+ | ||
+ | |||
+ | (\nabla g) \times \mathbf{v}</math> | ||
+ | *If ''u'' and ''v'' are both vectors then | ||
+ | ::the gradient of their dot product is | ||
+ | :<math>\nabla ( \mathbf{u} \cdot \mathbf{v} ) = | ||
+ | \mathbf{u} \times (\nabla \times \mathbf{v} ) + | ||
+ | \mathbf{v} \times (\nabla \times \mathbf{u} ) + | ||
+ | (\mathbf{u} \cdot \nabla) \mathbf{v} + (\mathbf{v} \cdot \nabla) \mathbf{u} | ||
+ | </math> | ||
+ | ::the divergence of their cross product is | ||
+ | :<math>\nabla \cdot ( \mathbf{u} \times \mathbf{v} ) = | ||
+ | \mathbf{v}\cdot ( \nabla \times \mathbf{u} ) - | ||
+ | \mathbf{u}\cdot ( \nabla \times \mathbf{v} )</math> | ||
+ | ::the curl of their cross product is | ||
+ | :<math>\nabla \times ( \mathbf{u} \times \mathbf{v} ) = | ||
+ | (\mathbf{v} \cdot \nabla ) \mathbf{u} - (\mathbf{u} \cdot \nabla) \mathbf{v} | ||
+ | + \mathbf{u}(\nabla \cdot \mathbf{v}) - \mathbf{v}(\nabla \cdot \mathbf{u}) | ||
+ | </math> | ||
+ | |||
+ | <!-- Anything to be said about these formulae? --> | ||
+ | |||
+ | We can also write chain rules. In the general case, when both functions are vectors and the composition is defined, we can use the Jacobian defined earlier. | ||
+ | :<math> | ||
+ | \left. \nabla \mathbf{u}(\mathbf{v}) \right|_{\mathbf{r}}= | ||
+ | \mathbf{J}_{\mathbf{v}} \left. \nabla \mathbf{v} \right|_{\mathbf{r}} | ||
+ | </math> | ||
+ | where '''J'''<sub>'''u'''</sub> is the Jacobian of '''u''' at the point '''v'''. | ||
+ | |||
+ | Normally '''J''' is a matrix but if either the range or the domain of '''u''' is '''R'''<sup>1</sup> then it becomes a vector. In these special cases we can compactly write the chain rule using only vector notation. | ||
+ | |||
+ | *If ''g'' is a scalar function of a vector and ''h'' is a scalar function of ''g'' then | ||
+ | :<math>\nabla h(g) = \frac{dh}{dg} \nabla g</math> | ||
+ | *If ''g'' is a scalar function of a vector then | ||
+ | :<math>\nabla = (\nabla g) \frac{d}{dg}</math> | ||
+ | This substitution can be made in any of the equations containing '''∇''' | ||
+ | |||
+ | ==Integration== | ||
+ | We have already considered differentiation of functions of more than one variable, which leads us to consider how we can meaningfully look at integration. | ||
+ | |||
+ | In the single variable case, we interpret the definite integral of a function to mean the area under the function. There is a similar interpretation in the multiple variable case: for example, if we have a paraboloid in '''R'''<sup>3</sup>, we may want to look at the integral of that paraboloid over some region of the ''xy'' plane, which will be the ''volume'' under that curve and inside that region. | ||
+ | |||
+ | === Riemann sums === | ||
+ | When looking at these forms of integrals, we look at the Riemann sum. Recall in the one-variable case we divide the interval we are integrating over into rectangles and summing the areas of these rectangles as their widths get smaller and smaller. For the multiple-variable case, we need to do something similar, but the problem arises how to split up '''R'''<sup>2</sup>, or '''R'''<sup>3</sup>, for instance. | ||
+ | |||
+ | To do this, we extend the concept of the interval, and consider what we call a ''n''-interval. An ''n''-interval is a set of points in some rectangular region with sides of some fixed width in each dimension, that is, a set in the form {'''''x'''''∈'''R'''<sup>''n''</sup>|''a''<sub>i</sub> ≤ ''x''<sub>i</sub> ≤ ''b''<sub>i</sub> with ''i'' = 0,...,''n''}, and its area/size/volume (which we simply call its ''measure'' to avoid confusion) is the product of the lengths of all its sides. | ||
+ | |||
+ | So, an ''n''-interval in '''R'''<sup>2</sup> could be some rectangular partition of the plane, such as {(''x'',''y'') | ''x'' ∈ [0,1] and ''y'' ∈ [0, 2]|}. Its measure is 2. | ||
+ | |||
+ | If we are to consider the Riemann sum now in terms of sub-''n''-intervals of a region Ω, it is | ||
+ | : <math>\sum_{i; S_i \subset \Omega} f(x^*_i)m(S_i)</math> | ||
+ | where ''m''(''S''<sub>''i''</sub>) is the measure of the division of Ω into ''k'' sub-''n''-intervals ''S''<sub>''i''</sub>, and ''x''<sup>*</sup><sub>''i''</sub> is a point in ''S''<sub>''i''</sub>. The index is important - we only perform the sum where ''S''<sub>''i''</sub> falls completely within Ω - any ''S''<sub>i</sub> that is not completely contained in Ω we ignore. | ||
+ | |||
+ | As we take the limit as ''k'' goes to infinity, that is, we divide up Ω into finer and finer sub-''n''-intervals, and this sum is the same no matter how we divide up Ω, we get the ''integral'' of ''f'' over Ω which we write | ||
+ | : <math>\int_\Omega f</math> | ||
+ | For two dimensions, we may write | ||
+ | : <math>\int\int_\Omega f</math> | ||
+ | and likewise for ''n'' dimensions. | ||
+ | |||
+ | === Iterated integrals === | ||
+ | Thankfully, we need not always work with Riemann sums every time we want to calculate an integral in more than one variable. There are some results that make life a bit easier for us. | ||
+ | |||
+ | For '''R'''<sup>2</sup>, if we have some region bounded between two functions of the other variable (so two functions in the form ''f''(''x'') = ''y'', or ''f''(''y'') = ''x''), between a constant boundary (so, between ''x'' = ''a'' and ''x'' =''b'' or ''y'' = ''a'' and ''y'' = ''b''), we have | ||
+ | : <math>\int_a^b\,\int_{f(x)}^{g(x)} h(x,y)\,dy dx</math> | ||
+ | |||
+ | An important theorem (called ''Fubini's theorem'') assures us that this integral is the same as | ||
+ | : <math>\int\int_\Omega f</math>, | ||
+ | if f is continuous on the domain of integration. | ||
+ | |||
+ | |||
+ | |||
+ | ==Resources== | ||
* [https://tutorial.math.lamar.edu/classes/calciii/multivrblefcns.aspx Functions of Several Variables], Paul's Online Notes | * [https://tutorial.math.lamar.edu/classes/calciii/multivrblefcns.aspx Functions of Several Variables], Paul's Online Notes | ||
* [https://math.libretexts.org/Bookshelves/Calculus/Map%3A_Calculus__Early_Transcendentals_(Stewart)/14%3A_Partial_Derivatives/14.01%3A_Functions_of_Several_Variables Functions of Several Variables], Mathematics LibreTexts | * [https://math.libretexts.org/Bookshelves/Calculus/Map%3A_Calculus__Early_Transcendentals_(Stewart)/14%3A_Partial_Derivatives/14.01%3A_Functions_of_Several_Variables Functions of Several Variables], Mathematics LibreTexts | ||
+ | * [https://en.wikibooks.org/wiki/Calculus/Multivariable_calculus Multivariable Calculus], WikiBooks: Calculus | ||
+ | |||
+ | ==Licensing== | ||
+ | Content obtained and/or adapted from: | ||
+ | * [https://en.wikibooks.org/wiki/Calculus/Multivariable_calculus Multivariable Calculus, WikiBooks: Calculus] under a CC BY-SA license |
Latest revision as of 10:22, 2 November 2021
See also: Equations of Lines, Planes and Surfaces in Space
This chapter serves as an introduction to multivariable calculus. Multivariable calculus is more complicated than when we were dealing with single-variable functions because more variables means more situations to be concerned about. In the following chapters, we will be discussing limits, differentiation, and integration of multivariable functions, using single-variable calculus as our basis.
Topology in
In your previous study of calculus, we have looked at functions and their behavior. Most of these functions we have examined have been all in the form
and only occasional examination of functions of two variables. However, the study of functions of several variables is quite rich in itself, and has applications in several fields.
We write functions of vectors - many variables - as follows:
and for the function that maps a vector in to a vector in .
Before we can do calculus in , we must familiarize ourselves with the structure of . We need to know which properties of can be extended to . This page assumes at least some familiarity with basic linear algebra.
Lengths and distances
If we have a vector in we can calculate its length using the Pythagorean theorem. For instance, the length of the vector is
We can generalize this to . We define a vector's length, written , as the square root of the sum of the squares of each of its components. That is, if we have a vector ,
Now that we have established some concept of length, we can establish the distance between two vectors. We define this distance to be the length of the two vectors' difference. We write this distance , and it is
This distance function is sometimes referred to as a metric. Other metrics arise in different circumstances. The metric we have just defined is known as the Euclidean metric.
Open and closed balls
In , we have the concept of an interval, in that we choose a certain number of other points about some central point. For example, the interval is centered about the point 0, and includes points to the left and right of 0.
In and up, the idea is a little more difficult to carry on. For , we need to consider points to the left, right, above, and below a certain point. This may be fine, but for we need to include points in more directions.
We generalize the idea of the interval by considering all the points that are a given, fixed distance from a certain point - now we know how to calculate distances in , we can make our generalization as follows, by introducing the concept of an open ball and a closed ball respectively, which are analogous to the open and closed interval respectively.
- an open ball
- is a set in the form
- a closed ball
- is a set in the form
In , we have seen that the open ball is simply an open interval centered about the point . In this is a circle with no boundary, and in it is a sphere with no outer surface. (What would the closed ball be?)
Boundary points
If we have some area, say a field, then the common sense notion of the boundary is the points 'next to' both the inside and outside of the field. For a set, , we can define this rigorously by saying the boundary of the set contains all those points such that we can find points both inside and outside the set. We call the set of such points .
Typically, when it exists the dimension of is one lower than the dimension of . e.g. the boundary of a volume is a surface and the boundary of a surface is a curve.
This isn't always true; but it is true of all the sets we will be using.
A set is bounded if there is some positive number such that we can encompass this set by a closed ball about . --> if every point in it is within a finite distance of the origin, i.e there exists some such that is in S implies .
Limits
We will focus on the limits of two-variable functions while reviewing the limits of single-variable functions. Multivariable limits are significantly harder than single-variable limits because of different directions. Assume that there is a single-variable function:
In order to ensure that exists, we need to test it from two directions: one approaching from the left side () and the other approaching from the right side (). Recall that
exists when .
For example, does not exist because and . Now, assume that there is a function with two variables:
If we want to take a limit, for example, , not only do we need to consider the limit from the direction of the -axis, we also need to consider the limit from all directions, which includes the -axis, lines, curves, etc. Generally speaking, if there is one direction where the calculated limit is different from others, the limit does not exist. We will be discussing this in detail here.
Differentiable functions
When we expand our scope into the 3-dimensional world, we have significantly more situations to consider. For example, derivatives. In previous chapters, derivatives only have one direction (the -axis) because there is only one variable.
When we have two or more variables, the rate of change can be calculated in different directions. For example, take a look at the image on the right. This is the graph of a two-variable function. Since there are two variables, the domain will be the whole -plane. We will graph the output on the -axis. The equation for the function on the right is:
How can we calculate a derivative? The answer is to use partial derivatives. As the name suggests, it can only calculate a derivative "partially" because we can only calculate the rate of change of a graph in one direction.
Partial derivatives
Notations are important for partial derivatives.
means the derivative of in the -axis direction, where we only view the as a variable while as a constant.
means the derivative of in the -axis direction, where we only view the as a variable while as a constant.
For simplicity, we will often use various standard abbreviations, so we can write most of the formulae on one line. This can make it easier to see the important details. We can abbreviate partial differentials with a subscript, e.g.,
When we are using a subscript this way we will generally use the Heaviside D (which stands for "directional") rather than ∂,
means the derivative of in the direction
If we are using subscripts to label the axes, x1, x2 …, then, rather than having two layers of subscripts, we will use the number as the subscript.
We can also use subscripts for the components of a vector function, If we are using subscripts for both the components of a vector and for partial derivatives we will separate them with a comma.
The most widely used notation is .
We will use whichever notation best suits the equation we are working with.
Directional derivatives
Normally, a partial derivative of a function with respect to one of its variables, say, xj, takes the derivative of that "slice" of that function parallel to the xj'th axis.
More precisely, we can think of cutting a function f(x1,...,xn) in space along the xj'th axis, with keeping everything but the xj variable constant.
From the definition, we have the partial derivative at a point p of the function along this slice as
provided this limit exists.
Instead of the basis vector, which corresponds to taking the derivative along that axis, we can pick a vector in any direction (which we usually take as being a unit vector), and we take the directional derivative of a function as
where d is the direction vector.
If we want to calculate directional derivatives, calculating them from the limit definition is rather painful, but, we have the following: if f : Rn → R is differentiable at a point p, |p|=1,
There is a closely related formulation which we'll look at in the next section.
Gradient vectors
The partial derivatives of a scalar tell us how much it changes if we move along one of the axes. What if we move in a different direction?
We'll call the scalar f, and consider what happens if we move an infintesimal direction dr=(dx,dy,dz), using the chain rule.
This is the dot product of dr with a vector whose components are the partial derivatives of f, called the gradient of f
We can form directional derivatives at a point p, in the direction d then by taking the dot product of the gradient with d
- .
Notice that grad f looks like a vector multiplied by a scalar. This particular combination of partial derivatives is commonplace, so we abbreviate it to
We can write the action of taking the gradient vector by writing this as an operator. Recall that in the one-variable case we can write d/dx for the action of taking the derivative with respect to x. This case is similar, but ∇ acts like a vector.
We can also write the action of taking the gradient vector as:
Properties of the gradient vector
Geometry
- Grad f(p) is a vector pointing in the direction of steepest slope of f. |grad f(p)| is the rate of change of that slope at that point.
For example, if we consider h(x, y)=x2+y2. The level sets of h are concentric circles, centred on the origin, and
grad h points directly away from the origin, at right angles to the contours.
- Along a level set, (∇f)(p) is perpendicular to the level set {x|f(x)=f(p) at x=p}.
If dr points along the contours of f, where the function is constant, then df will be zero. Since df is a dot product, that means that the two vectors, df and grad f, must be at right angles, i.e. the gradient is at right angles to the contours.
Algebraic properties
Like d/dx, ∇ is linear. For any pair of constants, a and b, and any pair of scalar functions, f and g
Since it's a vector, we can try taking its dot and cross product with other vectors, and with itself.
Product and chain rules
Just as with ordinary differentiation, there are product rules for grad, div and curl.
- If g is a scalar and v is a vector, then
- the divergence of gv is
-
- the curl of gv is
- If u and v are both vectors then
- the gradient of their dot product is
-
- the divergence of their cross product is
-
- the curl of their cross product is
We can also write chain rules. In the general case, when both functions are vectors and the composition is defined, we can use the Jacobian defined earlier.
where Ju is the Jacobian of u at the point v.
Normally J is a matrix but if either the range or the domain of u is R1 then it becomes a vector. In these special cases we can compactly write the chain rule using only vector notation.
- If g is a scalar function of a vector and h is a scalar function of g then
- If g is a scalar function of a vector then
This substitution can be made in any of the equations containing ∇
Integration
We have already considered differentiation of functions of more than one variable, which leads us to consider how we can meaningfully look at integration.
In the single variable case, we interpret the definite integral of a function to mean the area under the function. There is a similar interpretation in the multiple variable case: for example, if we have a paraboloid in R3, we may want to look at the integral of that paraboloid over some region of the xy plane, which will be the volume under that curve and inside that region.
Riemann sums
When looking at these forms of integrals, we look at the Riemann sum. Recall in the one-variable case we divide the interval we are integrating over into rectangles and summing the areas of these rectangles as their widths get smaller and smaller. For the multiple-variable case, we need to do something similar, but the problem arises how to split up R2, or R3, for instance.
To do this, we extend the concept of the interval, and consider what we call a n-interval. An n-interval is a set of points in some rectangular region with sides of some fixed width in each dimension, that is, a set in the form {x∈Rn|ai ≤ xi ≤ bi with i = 0,...,n}, and its area/size/volume (which we simply call its measure to avoid confusion) is the product of the lengths of all its sides.
So, an n-interval in R2 could be some rectangular partition of the plane, such as {(x,y) | x ∈ [0,1] and y ∈ [0, 2]|}. Its measure is 2.
If we are to consider the Riemann sum now in terms of sub-n-intervals of a region Ω, it is
where m(Si) is the measure of the division of Ω into k sub-n-intervals Si, and x*i is a point in Si. The index is important - we only perform the sum where Si falls completely within Ω - any Si that is not completely contained in Ω we ignore.
As we take the limit as k goes to infinity, that is, we divide up Ω into finer and finer sub-n-intervals, and this sum is the same no matter how we divide up Ω, we get the integral of f over Ω which we write
For two dimensions, we may write
and likewise for n dimensions.
Iterated integrals
Thankfully, we need not always work with Riemann sums every time we want to calculate an integral in more than one variable. There are some results that make life a bit easier for us.
For R2, if we have some region bounded between two functions of the other variable (so two functions in the form f(x) = y, or f(y) = x), between a constant boundary (so, between x = a and x =b or y = a and y = b), we have
An important theorem (called Fubini's theorem) assures us that this integral is the same as
- ,
if f is continuous on the domain of integration.
Resources
- Functions of Several Variables, Paul's Online Notes
- Functions of Several Variables, Mathematics LibreTexts
- Multivariable Calculus, WikiBooks: Calculus
Licensing
Content obtained and/or adapted from:
- Multivariable Calculus, WikiBooks: Calculus under a CC BY-SA license