Vector,Grad,Div,Curl

Embed Size (px)

Citation preview

  • 8/10/2019 Vector,Grad,Div,Curl

    1/20

    Vectors, Gradient, Divergence and Curl.

    1 Introduction

    A vector is determined by its length and direction. They are usually denoted

    with letters with arrows on the top aor in bold letter a. We will use arrows.

    a

    Two vectors are equal if they have the same length and the same direction:

    vw

    v= w

    If we are given two points in the space (p1

    , p2

    , p3) and (q

    1, q

    2, q

    3) then we can

    compute the vector that goes from p to q as follows:

    pq= [q1 p1, q2 p2, q3 p3]

    For example if you are given the point p = (1, 0, 1) and q = (3, 2, 4) then the

    vector joining p and q is:

    pq= [3 1, 2 0, 4 1] = [2, 2, 3].

    The three principal directions (unitary vectors, vectors of length one) in the space

    are

    i= [1, 0, 0],

    j = [0, 1, 0]

    1

  • 8/10/2019 Vector,Grad,Div,Curl

    2/20

    and

    k= [0, 0, 1]

    i j

    k

    The length of a vector with coordinates [a1, a2, a3] is

    |a| =

    a21+a22+a

    23

    The sum of two vectors a = [a1, a2, a3] andb= [b1, b2, b3] is obtained by adding

    the corresponding componentsa+ b= [a1+b1, a2+b2, a3+b3].

    We have some properties:

    1. Commutative: a+ b= b+ a

    2. Associative: a+ (b+ c) = (a+ b) + c

    3. There exists0 such that:

    a+ 0 = 0 + a=a

    and

    a a= 0

    We can multiply a vector by a real number, often called scalar R:

    a= [a1, a2, a3] = [a1, a2a3]

    And we have some properties:

    2

  • 8/10/2019 Vector,Grad,Div,Curl

    3/20

    1. Distributive 1: (a+ b) =a+b

    2. Distributive 2: (+ )a= a+a

    3. 1a=a, (1)a= a, and 0a= 0.

    Example 1 Ifa= [1, 2, 3] andb= [0, 1, 0], then compute|3a b|:

    3a b = 3[1, 2, 3] [0, 1, 0]= [3, 6, 9 [0, 1, 0]= [3, 5, 9]

    Then:

    |3a b| =

    32 + 52 + 92 =

    115.

    1.1 Inner product (dot product)

    The inner product of the vectors a and b is a scalar (real number) defined as

    follows:

    a b= |a||b| cos ,

    where is the angle between a andb. Ifa= [a1, a2, a3] andb = [b1, b2, b3], then

    the inner product is:

    a b= a1b1+a2b2+a3b3.

    Observe that

    |a|

    =

    a

    a= a21+a22+a

    23,

    and then we can compute the angle between aandbwith the formula:

    cos = ab

    |a||b|=

    a1b1+a2b2+a3b3a21+a

    22+a

    23

    b21+b

    22+b

    23

    .

    Two vectors are orthogonalif and only if its inner product is 0:

    ais orthogonal tob a b= 0

    3

  • 8/10/2019 Vector,Grad,Div,Curl

    4/20

    The inner product has some properties:

    1. Commutative: a b= b a

    2. Distributive: (a+b) c= a c+b c

    3. a aanda a= 0 if and only ifa= 0.

    Recall that there are two important inequalities with vectors:

    Cauchy-Schwarz:|a b| |a||b|

    Triangle Inequality:|a+ b| |a| + |b|

    1.2 Vector product (cross-product)

    It is denoted by v= a b and it is a vector with length

    |v| = |a b| = |a||b| sin ,

    where is the angle betweena andb,and the direction ofv is perpendicular to

    both a and b and such a,b, v, in this order, form a right-handed triple. (This

    means that the determinant ofa,b, v is positive).

    Geometrically speaking|a b| is the area of the parallelogram with sides aandb.

    a

    b

    |a b|

    And we have some properties:

    4

  • 8/10/2019 Vector,Grad,Div,Curl

    5/20

    1. If R then (a b) = (a) b=a (b)

    2. Distributives: a (b+ c) =a b+ a c and (a+ b) c=a c+ b c

    3. Anticommutative: a b= b a

    Remark: The vector product is NOT associative. Thus, in general:

    a (b c) = (a b) c

    Let us see this with an example:

    a= [1, 0, 0],b= [1, 0, 0], c= [0, 1, 0]

    Then

    b c= [0, 0, 1] a (b c) = [0, 1, 0],

    but

    a b= [1, 0, 0] [1, 0, 0] = [0, 0, 0] (a b) c= [0, 0, 0]

    1.3 Scalar triple product

    It is a scalar (real number) defined as follows:

    (ab c) =a (b c)

    (Notice that there are no commas in (ab c)). We have:

    (ab c) =a (

    b c) =

    a1 a2 a3

    b1 b2 b3

    c1 c2 c3

    It is an immediate consequence of the properties of the determinants that:

    a (b c) = (a b) c.

    Geometric interpretation: The absolute value of (ab c) is the volume of the

    parallelepiped (oblique box) witha,b andc as edges.

    5

  • 8/10/2019 Vector,Grad,Div,Curl

    6/20

    Example 2 Find the area of the parallelogram with vertices (2, 2, 0), (9, 2, 0),(10, 3, 0),(3, 3, 0).

    First, we need to find the vectors joining the vertices (2, 2, 0), (9, 2, 0) and

    (2, 2, 0), (3, 3, 0) ((10, 3, 0) is not needed!). We will denote bya the vector from

    (2, 2, 0) to (9, 2, 0) andbthe vector from (2, 2, 0) to (3, 3, 0). Then:

    a= [9 2, 2 2, 0 0] = [7, 0, 0]

    b= [3 2, 3 2, 0] = [1, 1, 0].

    We know that the area of the parallelogram with edges aandbis the module of

    its vector product:

    a b=

    i j k

    7 0 0

    1 1 0

    = 7k= [0, 0, 7],

    And therefore:

    |a b| = 7.

    Example 3 Find the area of the triangle with vertices (1, 0, 0), (0, 1, 0) and

    (0, 0, 1).

    To do this, we first compute the area of the the parallelogram that has as

    edges the vector joining (1, 0, 0), (0, 1, 0) and the vector joining (1, 0, 0), (0, 0, 1)

    and then we divide by 2.

    a= [0 1, 1 0, 0 0] = [1, 1, 0] and b= [0 1, 0 0, 1 0] = [1, 0, 1].

    Then:

    a b=

    i j k

    1 1 01 0 1

    = i+ j+ k= [1, 1, 1],

    so the area of the parallelogram is:

    |a b| =

    12 + 12 + 12 =

    3.

    6

  • 8/10/2019 Vector,Grad,Div,Curl

    7/20

    Hence the area of the triangle is

    3

    2 .

    Example 4 Find the volume of the parallelepiped determined by the vertices

    (1, 1, 1),(4, 7, 2),(3, 2, 1) and (5, 4, 3)

    The volume of the parallelepiped is the absolute value ofa (b c), wherea,bandcare the vectors joining the points (1, 1, 1) and (4, 7, 2), (1, 1, 1) and (3, 2, 1),

    and (1, 1, 1) and (5, 4, 3) respectively:

    a= [4

    1, 7

    1, 2

    1] = [3, 6, 1]

    b= [3 1, 2 1, 3 1] = [2, 1, 0]

    c= [5 1, 4 1, 3 1] = [4, 3, 2].

    Then:

    a (b c) =

    3 6 1

    2 1 0

    4 3 2

    = 16.

    Hence the volume is|a (b c)| = 16.

    2 Gradient of a Scalar Field

    A vector field Fis a function that takes any point in space and assign a vector

    to it:

    F: From points in the space To vectors in the space(x,y,z ) [F1(x,y,z ), F2(x,y,z ), F3(x,y,z )]

    Ascalar field fis a function that takes a point in space and assigns a number to

    it:

    f: From points in the space To real numbers(x,y,z ) f(x,y,z )

    7

  • 8/10/2019 Vector,Grad,Div,Curl

    8/20

    Example 5 The function

    f(x,y,z ) =xyz

    is a scalar field that assigns to the point in the space (x,y,z ) the real number

    xyzbut the function

    F(x,y,z ) = [ x

    x2 +y2 +z2,

    yx2 +y2 +z2

    , z

    x2 +y2 +z2]

    is a vector field that assigns to the point in the space ( x,y,z ) the unit position

    vector [ xx2 +y2 +z2

    , y

    x2 +y2 +z2, z

    x2 +y2 +z2] .

    Definition 1 The gradient of a given scalar fieldf(x,y,z ) is a vector field de-

    noted by grad f or fand it is defined as follows:

    f=

    f

    x, f

    y, f

    z

    =

    f

    xi+

    f

    yj+

    f

    zk

    This notation means that if we have a point in the space (x0, y0, z0) then

    f(x0, y0, z0) = fx

    |(x0,y0,z0)i+ fy |(x0,y0,z0)j+ fz|(x0,y0,z0)k

    We can think as a linear operator that acts on scalar fields giving vectors fields:

    : Smooth Scalar Fields Vector fieldsf f=

    fx

    ,fy

    ,fz

    From Vector Calculus we know that the partial derivatives fx

    ,fy

    ,fz

    give the

    rates of change of f(x,y,z ) in the directions ofi,j, k respectively. It seems

    natural to ask what is the rate of change in any other direction. This is what the

    directional derivatives represent.

    Suppose thatb= [b1, b2, b3] is a unit vector, thus it has length 1:

    |b| =

    b21+b22+b

    23= 1

    8

  • 8/10/2019 Vector,Grad,Div,Curl

    9/20

    Then the directional derivative off(x,y,z ) in the direction ofa unit vector bis:

    Dbf= b f, (1)

    where is the scalar product.Ifa = (a1, a2, a3) is a vector which is not unit then a unit vector with the

    same direction thanais a|a| :

    a

    |a|

    = 1

    |a|

    a21+a22+a

    23 =

    1

    |a| |a| = 1.

    We define the directional derivative off(x,y,z ) in the direction ofaas

    Daf= a

    |a|f. (2)

    Please note that equation (??) is equivalent to equation (??) when a is a unit

    vector. (The two definitions of directional derivative are the same.)

    Example 6 Given f(x,y,z ) = 2x2 + 3y2 +z2 and a = [1, 0,

    2], evaluate the

    directional derivative off in the direction ofaat the point (2, 1, 3).

    First we compute the gradient of f:

    f= [4x, 6y, 2z]

    Sinceais not a unit vector the directional derivative is:

    Daf= [1, 0, 2]12 + 02 + (2)2

    4x

    6y

    2z

    =[1, 0, 2]5

    4x

    6y

    2z

    = 15(4x 4z)

    And evaluating at the point (2, 1, 3) we get:

    Daf(2, 1, 3) =8 12

    5=

    45

    ,

    the minus sign indicates that the function fdecreases in the direction ofa.

    9

  • 8/10/2019 Vector,Grad,Div,Curl

    10/20

    Remark: If the gradient offat a point P is not zero f(P) = grad f(P) = 0,then it is a vector in the direction of maximum increase off at P.

    Definition 2 A surface is all points in(x,y,z ) R3 that verifiesf(x,y,z ) =c,for some smooth scalar fieldf and constantc.

    Consider the unit sphere in R3, S2:

    S2 = {(x,y,z ) R3 :x2 +y2 +z2 = 1}.

    In this case f(x,y,z ) =x2 +y2 +z2 and c= 1.

    The cone with center at (0, 0, 0) is another surface withf(x,y,z ) =x2+y2z2

    and c= 0:

    C= {(x,y,z ) R3 :x2 +y2 z2 = 0}.

    Theorem 1 Let f be differentiable and S ={(x,y,z ) : f(x,y,z ) = c} be asurface. Then the gradient of f, f at a point P of the surface S is a normal

    vector to S atP. (Provided f(P) = 0).

    Example 7 Find a unit normal vector of the cone of the revolution z2 = 4(x2 +

    y2) at the point P = (1, 0, 2).

    In this case:

    f(x,y,z ) = 4(x2 +y2) z2

    The theorem ensures that the gradient offat the point (1, 0, 2) is normal to the

    cone:

    f= [8x, 8y, 2z],

    and evaluating it at P

    f(1, 0, 2) = [8, 0, 4].

    10

  • 8/10/2019 Vector,Grad,Div,Curl

    11/20

    But we observe that f(1, 0, 2) is not unit vector, so we calculate the unit vectorin the direction of

    f(1, 0, 2):

    f(1, 0, 2)|f(1, 0, 2)| =

    [8, 0, 4]82 + (2)2

    =[8, 0, 4]

    80=

    [2, 0, 1]5

    And more examples (FOR YOU TO TRY):

    1. Find the directional derivative offatP in the direction ofain the following

    cases:

    f(x,y,z ) =x2 +y2 z, P = (1, 1, 2), a= [1, 1, 2]

    f(x,y,z ) =x2 +y2 +z2, P = (2, 2, 1), a= [1, 1, 0]

    f(x,y,z ) =xyz, P = (1, 1, 3), a= [1, 2, 2]

    2. Compute the normal to the surface:

    S= {(x,y,z ) R3 :ax+by+cz=d} for any P.

    S= {(x,y,z ) R3 :x2 + 3y2 +z2 = 28} and P = (4, 1, 3)

    S= {(x,y,z ) R3 :x2 +y2 = 25} and P = (4, 3, 8)

    Proposition 1 For allf, g smooth scalar fields, the operator verifies:

    1. (f g) =g f+fg,

    2.

    fn =nfn1

    f, for anyn

    N,

    3. ( fg ) = 1g2 (gf fg),

    4. 2(f g) =g 2f+ 2 fg+f2g.

    Proof:

    11

  • 8/10/2019 Vector,Grad,Div,Curl

    12/20

    1. By definition of the gradient:

    (f g) = [(f g)

    x ,(f g)

    y ,(f g)

    z ]

    = [ fx

    g+fgx

    ,fy

    g+fgy

    ,fz

    g+fgz

    ]

    using the product rule for partial derivatives

    = [ fx

    ,fy

    ,fz

    ]g+f[ gx

    ,gy

    , gz

    ]

    using linearity of vectors

    = g f+fg,

    2. It is a consequence of the chain rule for partial derivatives:

    fn = [ (fn)

    x ,

    (fn)y

    ,(fn)

    z ]

    = [nfn1fx

    , nfn1fy

    , nfn1fz

    ] =nfn1 f, for any n N,

    3. For (fg ) = 1g2 (gf fg), use part 1 with f and 1g and recall that

    x

    1g =

    1g2

    gx

    . (Similarly with the partial derivatives with respect to to y

    and z).

    4. Notice that

    2(f g) = (f g) = 2(f g)

    x2 +

    2(f g)

    y2 +

    2(f g)

    z2

    Furthermore:

    2(f g)

    x2 =

    x(f g)

    x=

    xf

    x

    g+fg

    x=

    2f

    x2g+ 2

    f

    x

    g

    x

    +fg

    x

    Similarly:

    2(f g)

    y2 =

    2f

    y2g+ 2

    f

    y

    g

    y+f

    g

    y

    and

    2(f g)

    z2 =

    2f

    z2g+ 2

    f

    z

    g

    z+f

    g

    z

    12

  • 8/10/2019 Vector,Grad,Div,Curl

    13/20

    The result follows on adding these three equations together and observing

    that

    2 = 2

    x2+

    2

    y2+

    2

    z2

    and

    f g= fx

    g

    x+

    f

    y

    g

    y+

    f

    z

    g

    z

    (Important) Remark: Some vector fields are gradients of scalar fields. This

    means that for a vector field Fwe can find a scalar field f called potential of F

    such thatF= f= [f

    x,f

    y,f

    z].

    In this case we say that F is a gradient field.

    In the exercises you will be given a vector field and you will be asked to find

    a potential for it:

    Example 8 Is F(x,y,z ) = [yz,xz,xy] a gradient field?

    If we find a scalar field f(x,y,z ) such that:

    F1(x,y,z ) =yz=f

    x (3)

    F2(x,y,z ) =xz=f

    y (4)

    and

    F3(x,y,z ) =xy = f

    z (5)

    then F is a gradient field.

    If we considery and zas constants and we integrate with respect to to x equation

    (??), we obtain: yzdx=

    f

    xdx (6)

    xyz+C(y, z) =f(x,y,z ) (7)

    13

  • 8/10/2019 Vector,Grad,Div,Curl

    14/20

    This means that if the potential function for F exists then it has the shape

    of xyz+ C(y, z) where C(y, z) is the constant of integration that we have to

    determine using equations (??) and (??). (The constant of integration must

    depend on y and zbecause to integrate with respect to x (??) we thought y and

    zas constants).

    We use now equation (??) to equate with the differential of equation (??)

    with respect to y:

    f

    y =

    y(xyz+C(y, z)) =xz

    or

    xz+

    yC(y, z) =xz,

    and we conclude that for this equality to hold we need

    yC(y, z) = 0

    That is, C(y, z) does not depend on yor C(y, z) could be written as C(z). Now

    we use equation (??) and we equate to the derivative with respect tozof equation

    (??):f

    z =

    y(xyz+C(z)) =xy

    or

    xy+

    zC(z) =xy,

    which implies that the constantC(z) does not depend onzso it is just a constant,

    Csay. We conclude that the potential for F is

    f(x,y,z ) =xyz+C,

    Cany constant in R.

    You can double check that f(x,y,z ) =xyz+Cverifies that F = f.

    14

  • 8/10/2019 Vector,Grad,Div,Curl

    15/20

    Example 9 Find a potential for F=

    x

    x2 +y2 +z2,

    yx2 +y2 +z2

    , zx2 +y2 +z2

    We need to find a scalar field f(x,y,z ) such that:

    F1(x,y,z ) = x

    x2 +y2 +z2 =

    f

    x (8)

    F2(x,y,z ) = y

    x2 +y2 +z2 =

    f

    y (9)

    and

    F3(x,y,z ) = z

    x2 +y2 +z2 =

    f

    z (10)

    Integrating with respect to x equation (??) we get that if the potential exists

    must it be as follows:

    f(x,y,z ) =1

    2ln(x2 +y2 +z2) +C(y, z). (11)

    Differentiating equation (??) with respect to y and equating to equation (??):

    y

    x

    2

    +y

    2

    +z

    2 +

    y

    C(y, z) = y

    x

    2

    +y

    2

    +z

    2

    which implies that the constant C(y, z) does not depend on y. Similarly dif-

    ferentiating equation (??) with respect to z and equating it to equation (??)

    we conclude that the constant does not depend on z either and therefore the

    potential is:

    f(x,y,z ) =1

    2ln(x2 +y2 +z2) +C, C R.

    Give a try to find a potential for:

    1. [3x, 5y, 4z]

    2. [4x3, 3y2, 6z]

    (The solutions are 32

    x2 + 52

    y2 2z2 +Cand x4 +y3 3z2 +C respectively).

    15

  • 8/10/2019 Vector,Grad,Div,Curl

    16/20

    The differential operator

    2f= f= 2

    fx2 +

    2

    fy2 +

    2

    fz2

    is called Laplace Operator.

    Notice

    : Smooth Scalar Fields Scalar Fieldsf f

    Example 10 Iff(x,y,z ) =x3 +y2 + 3xz5 then:

    fx

    = 3x2 + 3z5 2fx2

    = 6x

    f

    y = 2y

    2f

    y2 = 2

    f

    z = 15xz4

    2f

    z2 = 60xz3

    Hence:

    f= 6x+ 2 + 60xz3,

    for example:

    f(1, 1, 1) = 6 + 2 + 60 = 68.

    3 Divergence of a Vector Field

    The divergence of a vector field F = [F1, F2, F3] is a scalar field div Fdefined as

    follows:

    div F =F1

    x +

    F2

    y +

    F3

    z .

    We can understand the divergence as a differential operator acting on smooth

    vector fields that produces scalar fields:

    div: Smooth Vector Fields Scalar Vector FieldsF F1

    x + F2

    y + F3

    z

    16

  • 8/10/2019 Vector,Grad,Div,Curl

    17/20

    Sometimes div F is denoted by

    F= div F ,

    the dot is the scalar product dot because can be considered as the vector

    = [ x

    ,

    y,

    z],

    so we have:

    F= [

    x,

    y,

    z]

    [F1

    , F2

    , F3] =

    xF

    1+

    yF

    2+

    zF

    3,

    and the products x

    F1, y

    F2 and z

    F3 mean that we have to differentiate F1

    with respect to x, F2 with respect to y and F3 with respect to z:

    xF1 =

    F1

    x

    yF2 =

    F2

    y

    z

    F3=F3

    z

    Remark: Iff is a scalar field then we have:

    div (gradf) = f

    or equivalently

    f= f

    Example 11 Compute the divergence of the following vector field:

    F(x,y,z ) = [x3 +y3, 3x2, 3zy2].

    By definition:

    F = (x3 +y3)

    x +

    (3x2)

    y +

    (3zy2)

    z = 3x2 + 3y2

    17

  • 8/10/2019 Vector,Grad,Div,Curl

    18/20

    4 The Curl of a Vector Field

    The Curl of a vector field Fis another vector defined as the following determinant:

    curl F=

    i j k

    x

    y

    z

    F1 F2 F3

    =

    F3

    y F2

    z

    i+

    F1

    z F3

    x

    j+

    F2

    x F1

    y

    k

    Suppose that Frepresents the velocity of a rotating body then curl F has the

    direction of the axis of rotation and its module is twice the angular speed of the

    rotation.

    Definition 3 If the curl of a vector field is zero we say that the vector field is

    irrotational.

    Remark: The definition of irrotationalvector field F= [F1, F2, F3] is equivalent

    to have the following three conditions in the partial derivatives ofF1, F2 and F3:

    F2

    x =F1

    y

    F1

    z =

    F3

    x

    F3

    y =

    F2

    z

    These three equations can be a short way to prove that something is not irrota-

    tional without computing the whole determinant:

    Example 12 Consider F= [y,x, 0], with >0 since F2x = and F1y = then F is not irrotational.

    However if we compute the determinant we obtain curl F = [0, 0, 2] which

    means that the body rotates around the zaxis with angular speed .

    Lemma 1 Gradient fields are irrotationals. That is, if F = f for some smoothscalar fieldf thencurl F = 0.

    18

  • 8/10/2019 Vector,Grad,Div,Curl

    19/20

    Proof: Using the denition of curl:

    curl f = curl

    [ fx

    , fy

    , fz

    ]

    =

    i

    j

    k

    x

    y

    z

    fx

    fy

    fz

    =

    y

    fz

    z

    fy

    i+

    z

    fx

    x

    fz

    j+

    x

    fy

    y

    fx

    k

    = 2f

    yz 2f

    zyi+

    2f

    zx 2f

    xzj+

    2f

    xy 2f

    yxk,

    The result follows since the mixed partial derivatives of a smooth scalar field are

    equal.

    Example 13 The gravitational field p is the force of attraction between two

    particles at points P0 = (x0, y0, z0) and P = (x,y,z ). It is defined by

    p= cr3

    r= cr3

    [x x0, y y0, z z0]

    where r =

    (x x0)2 + (y y0)2 + (z z0)2 and it is an irrotational field be-cause the scalar field f(x,y,z ) = cr is a potential for it. (Check it!)

    Lemma 2 Let Fbe a smooth vector field then

    div (curl F) = 0

    Proof:

    div ( curl F) = x

    F3y

    F2z

    +

    y

    F1z

    F3x

    +

    z

    F2x

    F1y

    = 2F3

    xy

    2F2xz

    + 2F1

    yz

    2F3yx

    + 2F2

    zx

    2F1zy

    = 0

    Because if F is smooth then F1, F2, F3 are smooth (scalar fields) and the mixed

    second partial derivatives ofF1, F2, F3 are equal.

    19

  • 8/10/2019 Vector,Grad,Div,Curl

    20/20

    Example 14 Compute the curl of the following vector field F(x,y,z ) = [ex cos y, ex sin y, 0]

    curl F =

    i j k

    x

    y

    z

    ex cos y ex sin y 0

    = (ex sin y)

    xk+

    (ex cos y)z

    j (ex cos y)y

    k (ex sin y)z

    i

    = (ex sin y ex( sin y))k= [0, 0, 2ex sin y]

    20