You are on page 1of 17
3: GRAD, DIV AND CURL 3.1 Gradient 3.1.1 Basies ‘The three-dimensional version of (2.4) is a Laer Tod 5 which can be written in vector form as F = View = &VS G1) where w-[Z22] (3.2) is called “grad f”, the gradient off This vector contains all the information about the rate of change of fin any direction, We saw in IA that if we want to know the rate of change in a particular direction, which we can describe by a unit vector n, we can derive it if we know Vf. Ifwe move a short distance ds in the n-direction, then & = bn > F = FV = osn-Vi so that GL Wy a In other words, (1-V) is an operator which when applied to a scalar field, gives the rate of change in the direction n. Now this idea applies to vector fields as well. If we have a vector field u, then each separate component is a scalar field, whose rate of change in direction n can be calculated using (a-V). So the rate of change of the vector is given by (n-V)u. fev = (0.7 )( Ub + Uy pe Ue k) = (BU ue) + (4 Yuy)j + (4.942) k => X — Component of nvu A.V (x - compet 4) IB vector calculus/TH/JW 1 Mich 13 G3) We have actually met an example of this in section 2.3.1, where we derived the acceleration of a particle in a fluid flow. For the case when the flow is steady, so that all particles are following streamlines, then this becomes Steady => uvu= [ulesVu Wo , - = [yl of ge olay mith distance. es cf. fe ="ve" Za wells fam ling. 3.1.2 Contour lines and surfaces One way to visualise a scalar function is via its contours: contour lines for a 2D function and contour surfaces for a 3D function. (Contours are probably most familiar from topographic maps.) By definition, the function fis constant along a contour line ot surface. So choose a unit vector n which is tangential to a contour, then it must be the case that 0 fe mat otf hog This result has a simple geometrical interpretation: the vector Vf is perpendicular to the vector #. In other words, Vf is always normal to the contour lines or surfaces. Can now do Ex 1 04 af 3.1.3 Gradient in polar co-ordinate systems When problems have cylindrical or spherical symmetry, or something approximating it, they are generally easier to set up in cylindrical or spherical polar co-ordinates. We saw in 2.4, that any vector can be written in terms of its components in these systems Egg. cylindrical polars = Wp ly tUgeg ture, Now V isa vector. So what does it look like when we use these co-ordinates ? As an example, we will consider only the eg component of Vf IB vector calculus/TH/JW 2 Mich 13 for ony f, Sr iw O- dindion 2 $= 0.Vf Ss Sf=SrVE = pS eo. OF 2 e0.0f= +o 2 Similarly for the other components Vf = 22 + %t2 +e.90 ee PR Ne Sez Ex Pobre DAebak In a similar vein, what would u- Vu look like in cylindrical polars ? wV = U2 + Ug 2 +Uy 2 Cap - 20 * Oe So that even (Uph + we2 + He? \(up ¢ e (“re pe RY (“ey + wo so + &) eee ke 4d = Have to be a bit careful here as ¢,, and eg are functions of 0 To keep the algebra a bit easier while still demonstrating the point, let us restrict ourselves to the 2-D case (everything independent of z and w. = 0). (, 2, "2 (,. 2#e , "a 2Mp 4 oe = fy, te . Mo oue p 06 lHoep+uoea) ("a * p60 ("a t 5 pmb dp uy #uOue 2 = w.Vup — Ye Can now do Ex I Q5, e& 7 IB vector calculus/TH/JW 3 Mich 13 3.1.4 Taylor expansion in 3D Another interpretation. of (3.1) is that it is the first term of a Taylor expansion in three dimensions: Sf = &.V$ SE+ 8) = fO+V where Vf is evaluated at the original point r, More conveniently for this purpose, write this, as: S04) = fO+E-VS~ Now it is easier to see how the higher terms in the Taylor series would be expected to go, by analogy with the ordinary 1-dimensional version: SEH) * (OE VP+EG-VWE-V)S EVE WE WF + G4) 3.2 Divergence and curl Now to introduce the two kinds of “vector derivative” which we can calculate if we have a vector field variable, rather than the scalar field considered in the previous section which led to the notion of grad. These are two important additions to your mathematical tool kit: we first treat them in a rather formal, algebraic way to establish the rules. We will then look at some physical applications to show examples of what they mean in particular physical situations, and why they might be useful quantities to know about. Back in the first lecture I made a claim: that we can treat V as a vector operator, with “components” (224) That makes it seem plausible that we could combine V with a ox Oya vector field w in the only ways we know to combine two vectors: either (1) with a dot product, to get 7 #1262) ag +s +m) He Sey val uslistis, a scalar quantity called the divergence of u, or div u; and = G.5) (2) with a cross product, to get i ok Vxu = |o/ax d/ay Ol Uy My Uy a vector quantity called the cur! of u, or curl u. IB vector calculus/TH/JW 4 Mich 13 Expanding the determinant in the usual way gives the formula: Vx u =i B - x) -(S-% - D4 ew x De Kk (Qs — Aan + k ( ae a) (3.6) Notice that for the particular case of a 2D vector field u = (uy(x,»), wy(x,»), 0), only the & component of Vxu is non-zero. Example: Find the divergence and curl of the vector field w =(— y,x,0) (whose field lines were calculated in section 2.2). uy = —y, ty = x V.u = 2(4)+2(x) = 0 1% 94 ij ' xa = la 4 = t(°)-j(°) ax % ox . 24.) - “y 2 ° +k B+ Be) 2 (If this vector field is thought of as a fluid velocity field, the physical interpretation of these ‘wo results will become clear in section 3.4.) Can now do Ex I Q8 3.3. What does it mean to treat V as a vector? But does it really make sense to treat V as a vector in this rather hand-waving way? To understand the answer to that we need to back off a bit, and think about exactly what we mean bya vector. The first notion of a vector is as an “arrow”, something that has a magnitude and a direction (and which also obeys the parallelogram rule for addition). We may choose to represent a vector via its components with respect to a particular Cartesian coordinate system, but in some sense the “arrow” has to be independent of how we choose to orientate our coordinates. IB vector calculus/TH/SW 5 Mich 13 ‘The algebraic expression of this independence was covered in the Part IA course. Suppose we have a vector @ with components (a, 4,43) with respect to a particular coordinate system. Now suppose we change our mind, and rotate our coordinate axes to new orientations. The vector a now has a new set of components which will be different from the old ones, but we should be able to calculate these new values if we know the old ones and we know how we have rotated our axes. If the new components are (aj, 23, a), then ai 4 a) | = R\a ay 1B GB.7) where R is the rotation matrix describing the axis rotation. This matrix is built up from the three old unit vectors expressed via their components in the new axes: ttt R= liye bud ; ___—-emperts im nay axes satisfies the useful relation Ro=R, (3.8) So that x= Rx and x = Rixt These results can be turned round to give the mathematician’s formal definition of a vector: ‘A vector (in 3 dimensions) is a quantity that has three components in any particular coordinate system, and if a coordinate rotation is performed, then the new components are given by eq. 3.7). This is the expression in terms of components of the idea that the “arrow” stays still while you rotate the coordinate axes. ‘Now we can show that the scalar product really is a scalar quantity, independent of the choice of coordinate axes, Suppose we have two vectors a and b, with components (a, a), a3) and (61.52.63) with respect to one coordinate systems, and (aj,a),a3) and (bj, 55,05) with respect to the rotated coordinates. Then the new value i [aj a a ]) 65 | = (Ra)' (RB) = a'R'RE bs 3.9) A similar approach can be used to show that the cross product ax really is a vector, in the sense of the definition we have just given. IB vector calculus/TH/JW 6 Mich 13 Now what about grad? Can we show that V/ is a vector for any scalar field 2 Consider two coordinate systems (x,y,z) and (x',y’,2') related by a rotation matrix R. So for example x= Ryx+ Ry + Ri3z = Ryyx' + Roy’ + Raz" Y= Rox Rogy + Rosz Y= Rinx’ + Roay' + Roz" 2 = Ryyxt R32y + Ry3z 2 = Ry3x' + Ro3y' + R332" From this it follows that % _ Rk, WR. WLR x 4 2 > £ Donde x 2X, YP %, FA*B aa and that x = Ry, de G.11) ef Now a typical component of Vin the new coordinate system is <> By the chain rule F _ Fe Fy He ex Gx Gx! Oy Ox’ Oz x’ xr xf of = ZR, R R ae Rt Ri +S Ris with similar expressions for af /@y', f /dz'. These are exactly the right results to show that Vf satisfies eq. (3.7). So Vf really is a proper vector. Combining this calculation with (3.9), it follows that V- really is a scalar (independent of dinate system) fe tor field uz coordinate system) for any vector field u: Vu 2, Dy uy . PK Om, dx, ut @ % TS = VE Slee) i 7 ig f But by the chain rule _ ow oa * aya and so IB vector calculus/TH/JW 7 Mich 13 The same approach can be used (slightly more long-windedly) to show the Vxu is a true vector, 3.4 Application: fluid flow ‘The most intuitively appealing physical examples of both divergence and curl come from fluid dynamics. (1) Mass conservation. One important law for any fluid flow is the conservation of mass. The natural way to describe this conservation law involves divergence of the velocity flow field w. Picture a very small cuboid region, aligned with the coordinate axes, with the flow passing through it: Volume flow rate through this one face is |ulGrazcos@ = u-5A = Sporn, IB vector calculus/TH/JW 8 Mich 13 Now consider the pair of parallel faces: > F The difference of volume flow rate across the two (“out-in”) is, Seluterdenr-mennat ~ ote SxS S2=8v ee ee MW ox Now add in similar contributions from the ‘other two pairs of parallel faces: the total volume flow rate out of the volume is vr [4 a ey If the flow is incompressible, then the net volume flow rate must be zero, and so the flow must satisfy v- =0 (incompressible flow) (3.12) If the fluid is compressible, with density p(x,y,z,t), then for each face of the cuboid we need to consider mass flow rate rather than volume flow rate, and we can conclude that the net ‘mass flow rate out of the volume is 6VV-(pu). This must match the rate of decrease of mass within the volume, and so the flow must satisfy A (mass in CV) = rte flosy im = — rete flows at It ol A (psv) = - Vs) Sv v-(ou) = -2 (3.13) IB vector calculus/TH/JW 9 Mich 13 (2) General flow in a small region (not examinable) The previous example shows the physical interpretation of divergence in the context of fluid flow. To get a related interpretation of curl, we need to consider a slightly more complicated analysis, one that brings together a number of concepts from earlier maths courses. Choose some particular point in a flow field, with position vector rp and velocity u(r). We now ask what can be said about the flow at a nearby point, with position vector ro + 3r. Stee rulingo Litirtime Sp? Using the Taylor expansion from section 3.1.4: uleo +8) (ro) + 6r-Vu So the relative motion Gu, (ex du, lay Ou, /dz Tar u(tg +&)-ulrg) ~ | duy/ex Guy /dy Guy /r| dy (3.14) Guz /éx du, lay Ou, 1 | de ie. u(to+&)~ulro) = Ag Now we can decompose 4 into symmetric and skew-symmetric parts (skew-symmetric = anti- symmetric = changes sign on taking the transpose): pita lena) (3.15) Syumcdic anti symmabic (tea) = F(A+A) — symnsbic - 4 (A-A*) aut Sy mnatice [rae jaaaf = ¢ IB vector calculus/TH/JW 10 Mich 13 " S e = = H ! yt () The symmetric part, > (A+A ) Recall that any symmetric matrix has real eigenvalues, associated with eigenvectors that are mutually orthogonal. If we use these eigenvector directions as new coordinate axes, then the symmetric matrix takes the simple diagonal form , 4 0 0 Wy Oo 9 0 4% 0 = Ox 1 0 0 4 ° My, o ‘J Qu: ° Oo Ay where 2; are the three eigenvalues. This matrix describes a flow in which a blob of fluid that ‘was initially a sphere would deform into an ellipsoid: stretching along axes with a positive Aj, and shrinking along axes with a negative 4;. If the sum of the three 4;'s is not zero, then the volume of this deforming ellipsoid will be changing. But the three 2,’s are simply the diagonal terms of the matrix from (3.14), expressed in the new eigenvector coordinate directions. So the sum 2 Oty | Oy Atha thy = Sere which is our result from the previous section: the divergence of the velocity field (which is, remember, independent of which coordinate system we use to evaluat describes the rate of change of volume of a fluid element. it 2) The skew-symmetric pat (A- A We can choose to write any skew-symmetric matrix in the form 0 -Q; Q, 7 2, 0 -2 -2, Q 0 with some values }, 29,3. The contribution to the relative flow u (ro +) —u(rg) (3.14) from this matrix takes the form of a cross product 0 =O; Q) Jae Qn 6 - 236) } 2, 0 -Q ||6 | = | Q36-O)% | = Qx& — B.16) -2, 2 0 fle 267 -Qy de regia hoody (stato, Q, (eu, /@y —éuy /2)/2 ] : =~ where Q = | Q,] = | (Qu, /az-du, /ax)/2 | = zee (3.17) Qs (ou, (ax du, fay)/2 IB vector calculus/TH/JW WW Mich 13 Thu -0 9 No nit spin of 2 te lines mane with fd Yr Any Tine rey HE Gut 21 lines have. tpt & ppaite At" The curl of the Sctocty field'is known as the vorticity. ‘The flow (3.16), dened 604 crose product with the relative position vector, simply describes a rigid body rotation with angular velocity Q. So the curl of the velocity field, the vorticity, reveals whether the local flow has any component of rigid body rotation. In other words, if you float a small piece of paper in the flow, will it rotate? This is what is illustrated by the “curl detectors” option of the web demo referred to in the example sheet: www-falstad.com, then choose “Math and physics applets” and scroll down to find “2D vector fields applet”. 3.5 Div and curl in polar coordinates For some problems it is convenient to work in polar coordinates rather than Cartesians. Just like grad, div and curl can all be expressed in terms of derivatives using other coordinate systems, and in particular we will often want cylindrical or spherical polar coordinates. The formulae are all given in the Maths Data Book. Eg. Cylindrical polars Ig grad f= Vf=e,L+ ot, pp 00 mie Formulae for div and curl can be derived by extensive use of the chain rule plus some trigonometry, using the geometrical definitions of polar coordinates and their associated unit vectors. However, this is laborious and not that illuminating. There is a much simpler way, which we will come to in a later section. Before doing that, however, we will try and allay fears that there is anything wrong with treating del as a vector operator and just following our instincts. According to the Data Book div in cylindrical polar co-ordinates is given by ‘The term we might not have been expecting, comes from the fact that the base vectors are a function of position. In particular, ey and eg depend on @ and these must be differentiated as well, ven = (ep Sri 2ve, 2) ipey supey tice Pap pao az ne IB vector calculus/TH/JW 12 Mich 13 This dependence leads to extra terms For the moment, we will simply believe all of the other results from the Data Book, and do an example. Example: for the “bathplug vortex”. u = Xe, ? Find div and curl In Cartesians to y e =k -4 ij 4 ee 7 Try | ep Sey ~ Easier in cylindrical polars _ nd 7K u= Ute = Ets Us= & -_ - ? P Qu A = LQ (pu) + 1 Que 4 “Oa Via é 30 ? OF - O + ° +o 20 TF rreompateedele flue IB vector calculus/TH/JW 13 Mich 13 [fe Pe & 1 t fe Le cul us Vxu= +)/dp 0/20 o/e:| = + 2 Ply pug Wz r ¥ 35 ae ° K oO No nt lszal (tition (pach os Sop asin y) Can now do Ex 1 Q9 WW Oo 36 Some properties of vector derivatives 3.6.1 Product rules There are versions of the familiar “product rule” for all the vector derivatives considered here. The trick for proving any of these is to write out the expression in Cartesian coordinates, then use the normal product rule on the individual partial derivatives that appear. Examples: ‘Suppose we have a scalar field ¢ and a vector field u. Vu) = Fm) + Su) + Slous) = Bug + Bry + We + OMe 4 Os + om ax ay Ww =(V¢).u 4+ ¢Uy (oe u.v¢+ Vu) « Vx(éu) = ? Lok at 2- cempone ct (ve), = Blt) -2 4%) g (Vx 4), + (Vexv), IB vector calculus/TH/IW 14 Mich 13 Also true for y and z components. Dx @u) = 9Vxu +(V9)xu G.19) ‘The Data Book lists these and other related identities. In some of them, the patterns are obvious and one even recognises some rules for repeated vector products Vx (Vxw=V (Vu) - Vu cf. @xlexs) =ba.c-cha 3.6.2. Vector second derivatives There are various legal ways in which grad, div and curl can be combined to make second derivatives. Three of these are important. (i) Fora scalar field ¢, V¢ is a vector so we can form its divergence: 24 oy 2, a v.(v¢)= v9 = 28 28,29 (3.20) a ay? & is a combination which crops up in the governing equation for many physical quantities, such as electric field potential or the Earth’s gravitational field. The operator V? is so important that it has been given its own name: the Laplacian, after the mathematician Laplace. Ina similar way, we can take the curl of Vg: Lyi k - fou Dx? = a4 o . § (8, - Sy) Ox MY de ap BW 2 ,+ ( & oe Soe + ¢ dy + & " © @.21) IB vector calculus/TH/JW 15 Mich 13 (iii) If wis a vector field, then V xu is another vector field, and we can take its divergence: 2, 2 uy au. au, 8 2, Sz Oy Puy Pu; Pty Puy _g 62) Gxdy Gxdz Oydz Oyox Ozdx dady 3.7 Solenoidal and irrotational fields, scalar and vector potentials The last two results from 3.6.2 lead to an important idea, which often simplifies the process of solving the equations to find a particular vector field (such as a static electric or magnetis field), We have seen that V-(Vxu)=0 and Vx(V¢)=0, for any vector field u or scalar field g. Both of these results can be turned around: if'a vector field B satisfies CNapubressilo! 623) (Sotencidal ) then there exists another vector field A such that B=VxA; (3.24) if vector field E satisfies - irretattionl VxE=0 & (3.25) (consenrative ) then there exists a scalar field ¢ such that E=V6. (3.26) All these quantities have names. A field satisfying (3.23) is called a solenoidal or incompressible field. ‘The vector field A in equation (3.24) is then called the vector potential for B. The variable names have been chosen deliberately: a static magnetic field B does indeed satisfy (3.23), and the vector potential is usually called 4. A field satisfying (3.25) is called an irrotational field, and the scalar field ¢ from (3.26) is called the scalar potential for E, Again, the choice of variables is deliberate: a static electric field £ satisfies (3.25). ‘There is an important class of applications that involve vector fields that are both solenoidal and irrotational. The usual approach to such problems is to introduce a scalar potential, as in (3.26), then substitute into (3.23) to deduce that V-V¢ = V6 = 0. IB vector calculus/TH/JW 16 Mich 13 This partial differential equation, called Laplace's equation, can be solved with suitable boundary conditions, then the vector field reconstructed from (3.26). Electrostatic fields, gravitational fields and inviscid, incompressible fluid flow are all examples of problems of this kind, governed by Laplace’s equation, and there are many others. We will do some examples of such problems in the final section of this course. This represents a tremendous simplification for these problems. For inviscid incompressible fluid flow, for example, we start with 4 unknowns: 3 velocity components and pressure. Bemouilli applied along streamlines means that, if we know the velocity components, the pressure is easy. We have now reduced this to one unknown: ¢. We then have w = V¢ , and p from Bemouilli. Can now finish Ex 1 IB vector calculus/TH/JW 7 Mich 13

You might also like