Return to Video

Divergence 1

  • 0:00 - 0:02
  • 0:02 - 0:06
    Let's try to get our heads
    around the idea of divergence.
  • 0:06 - 0:08
    So first, like I did with
    gradients, I'll show you the
  • 0:08 - 0:10
    mechanics, which are actually
    pretty straightforward.
  • 0:10 - 0:12
    And then I'll try to
    give you the intuition.
  • 0:12 - 0:14
    And once you have the
    intuition, at first it
  • 0:14 - 0:17
    will seemed very, I don't
    know, unintuitive, maybe.
  • 0:17 - 0:19
    But it once you get it,
    you're like oh, that's it.
  • 0:19 - 0:21
    So let's see what
    divergence is.
  • 0:21 - 0:25
    Let's say I have
    a vector field.
  • 0:25 - 0:27
    And let's say this vector
    field, just for the purposes
  • 0:27 - 0:29
    of visualization it could be
    anything, but let's say it
  • 0:29 - 0:34
    represents the velocity of
    particles of fluid of any
  • 0:34 - 0:37
    point in two dimensions.
  • 0:37 - 0:40
    So it's going to be a
    two-dimensional vector field.
  • 0:40 - 0:45
    It's going to be a function of
    x and y, so the velocity at any
  • 0:45 - 0:50
    point-- it's a vector field --
    let's say it is, and I'm just
  • 0:50 - 0:52
    going to make up something.
  • 0:52 - 0:58
    Let's say it's x squared, yi.
  • 0:58 - 1:01
  • 1:01 - 1:04
    So at any point in the
    x-direction, at any point x
  • 1:04 - 1:07
    comma y, its velocity in the
    x-direction will
  • 1:07 - 1:08
    be x squared, y.
  • 1:08 - 1:11
    And then its velocity in the
    y-direction, I don't know
  • 1:11 - 1:14
    maybe it's just 3y, j.
  • 1:14 - 1:18
  • 1:18 - 1:19
    That's its velocity
    in the x-direction.
  • 1:19 - 1:20
    So its velocity in the
    x-direction is actually
  • 1:20 - 1:22
    a function of x and y.
  • 1:22 - 1:26
    its velocity in the y-direction
    is just a function of y.
  • 1:26 - 1:29
    So what is the divergence?
  • 1:29 - 1:31
    So a couple of ways
    we can write it.
  • 1:31 - 1:36
    The correct way to write
    it is the divergence of
  • 1:36 - 1:38
    our vector field, v.
  • 1:38 - 1:43
    But a common mnemonic to
    remember the operation of
  • 1:43 - 1:49
    diverge and is to write the
    upside down triangle, which was
  • 1:49 - 1:52
    the same notation we used for
    gradient, but take the dot
  • 1:52 - 1:56
    product of that and the vector.
  • 1:56 - 2:00
    And if you remember from the
    gradient discussion, we said
  • 2:00 - 2:04
    that you can view, although
    it's kind of an abuse of
  • 2:04 - 2:09
    notation, but you could view
    this upside down triangle as
  • 2:09 - 2:16
    being equal to the partial
    derivative with respect to x in
  • 2:16 - 2:20
    the x-direction plus the
    partial derivative with respect
  • 2:20 - 2:25
    to y in the y-direction,
    which is the j-unit vector.
  • 2:25 - 2:27
    And then if we went to three
    dimensions, the partial
  • 2:27 - 2:29
    derivative with respect to
    z and the k-direction,
  • 2:29 - 2:30
    et cetera, et cetera.
  • 2:30 - 2:33
    But we're dealing with a
    two-dimensional vector here,
  • 2:33 - 2:37
    so let's just stick with
    two dimensions, x and y.
  • 2:37 - 2:39
    So what would this
    turn out to be?
  • 2:39 - 2:46
    If you took the dot product of
    this, which is this upside down
  • 2:46 - 2:49
    triangle, with this vector
    field, what would you get?
  • 2:49 - 2:52
    Well, you would just get the
    partial derivative of the x
  • 2:52 - 2:56
    dimension with respect to x, so
    you would get-- it's actually
  • 2:56 - 2:58
    pretty straight forward to
    memorize; you might not even
  • 2:58 - 3:01
    need this mnemonic right here,
    this abuse of notation; you
  • 3:01 - 3:05
    might just know it off hand
    --the x component, you take the
  • 3:05 - 3:08
    partial derivative with respect
    to x, and the y component, you
  • 3:08 - 3:09
    take the partial derivative
    with respect to y.
  • 3:09 - 3:11
    But I'll show you why it
    looks like the dot product.
  • 3:11 - 3:14
    So if you took the dot product
    of that and that, it would be
  • 3:14 - 3:18
    the partial derivative with
    respect to x of that
  • 3:18 - 3:26
    expression, of x squared, y and
    then plus the partial
  • 3:26 - 3:33
    derivative with respect to y of
    that second expression, the y
  • 3:33 - 3:40
    component of 3y, and then
    you would evaluate it.
  • 3:40 - 3:43
    What's the partial derivative
    of this with respect to x?
  • 3:43 - 3:46
    We just pretended y is a
    constant, just a number, so
  • 3:46 - 3:49
    the derivative of this with
    respect to x, would be
  • 3:49 - 3:50
    2x times the constant.
  • 3:50 - 3:59
    So it'll be 2xy plus-- what's
    the partial derivative
  • 3:59 - 4:00
    of 3y with respect to y?
  • 4:00 - 4:02
    Well, there's nothing else to
    hold constant, so it's just
  • 4:02 - 4:04
    like taking the derivative
    with respect to y
  • 4:04 - 4:06
    --so it's 2y plus 3.
  • 4:06 - 4:11
    So this is the divergence
    at a point x, y.
  • 4:11 - 4:13
    You could almost view it
    as a function of x and y.
  • 4:13 - 4:16
    So you could almost say you
    know, that the divergence of
  • 4:16 - 4:20
    v-- I'm going to make up some
    notation here --as long as you
  • 4:20 - 4:23
    get the point across, you can
    say that the divergence
  • 4:23 - 4:25
    of v, that this is a
    function of x and y.
  • 4:25 - 4:29
    That we just have an expression
    that if you give me a point
  • 4:29 - 4:31
    anywhere in this vector
    field, I can tell you the
  • 4:31 - 4:33
    divergence at that point.
  • 4:33 - 4:37
    So I think you'll find that
    the computation of divergence
  • 4:37 - 4:38
    isn't too difficult.
  • 4:38 - 4:41
    You just take the partial
    derivative of the x component
  • 4:41 - 4:45
    with respect to x, and you add
    that to the partial derivative
  • 4:45 - 4:46
    to the y component
    with respect to y.
  • 4:46 - 4:48
    And if you had the z, you
    would do the same thing,
  • 4:48 - 4:51
    so on and so forth.
  • 4:51 - 4:53
    Actually, let me do just do one
    more just hit the point home,
  • 4:53 - 4:54
    and then we'll work
    on intuition.
  • 4:54 - 4:58
  • 4:58 - 5:02
    So if I said that I had, I
    don't know, let's say, my
  • 5:02 - 5:10
    vector field is cosine of yi
    plus-- so it's interesting; my
  • 5:10 - 5:15
    x-direction is dependent on
    my y-coordinate --plus, I
  • 5:15 - 5:20
    don't know, e to the xyj.
  • 5:20 - 5:25
  • 5:25 - 5:28
    So then oh, that's difficult
    because I have these
  • 5:28 - 5:28
    e's and these cosines.
  • 5:28 - 5:30
    But we'll see; if you just
    keep your head straight on
  • 5:30 - 5:32
    what's constant and what's
    not, it's not too bad.
  • 5:32 - 5:41
    So the divergence of v is equal
    to the partial derivative
  • 5:41 - 5:44
    of this expression
    with respect to x.
  • 5:44 - 5:46
    Well, what's the derivative
    of this with respect to x?
  • 5:46 - 5:49
    If y is just a constant,
    cosine of y is just a number.
  • 5:49 - 5:55
    So the derivative of this with
    respect to x is just 0 plus--
  • 5:55 - 5:57
    what's the derivative of
    this with respect to y?
  • 5:57 - 6:00
    Well, you could just do x,
    since it's a constant,
  • 6:00 - 6:01
    as the coefficient on y.
  • 6:01 - 6:06
    So the derivative of x, y
    with respect to y is just x.
  • 6:06 - 6:10
    And then the derivative of e
    to anything is e to anything.
  • 6:10 - 6:12
    I just did the chain rule.
  • 6:12 - 6:13
    e to the x, y.
  • 6:13 - 6:15
    And so that is the divergence.
  • 6:15 - 6:16
    So you could just ignore this.
  • 6:16 - 6:18
    It's x, e to the x, y.
  • 6:18 - 6:21
    One thing to immediately
    realize, even before we work on
  • 6:21 - 6:28
    the intuition, is when we did
    gradient I gave you a surface
  • 6:28 - 6:32
    and it gave us a vector field.
  • 6:32 - 6:37
    Or I gave you a scalar field
    and you got a vector field.
  • 6:37 - 6:39
    When you take the divergence of
    something, you're going in the
  • 6:39 - 6:41
    opposite direction,
    in some ways.
  • 6:41 - 6:43
    You start with the
    vector field, right?
  • 6:43 - 6:44
    And what's a factor field?
  • 6:44 - 6:47
    It's something that if you
    give me any point x and y,
  • 6:47 - 6:48
    I'll give you a vector.
  • 6:48 - 6:51
    So if you wanted to graph it,
    in the x, y plane you'd have a
  • 6:51 - 6:53
    bunch of vectors, and I'll show
    you how that looks in a second
  • 6:53 - 6:55
    when we go over to intuition.
  • 6:55 - 6:57
    Well, when you take the
    divergence of it, you get a
  • 6:57 - 6:59
    value for any point x, y.
  • 6:59 - 7:02
    So even though a vector field
    has all these vectors on it,
  • 7:02 - 7:05
    the divergence tells you an
    actual scalar number at
  • 7:05 - 7:08
    any point in the field.
  • 7:08 - 7:12
    So let's get a little bit
    of intuition of what a
  • 7:12 - 7:16
    divergence actually is.
  • 7:16 - 7:19
    Let me do it in one dimension.
  • 7:19 - 7:21
    Or we can even, let's do it
    in two dimensions, but I'll
  • 7:21 - 7:23
    make it constant in the y.
  • 7:23 - 7:25
    So let's say that my-- let me
    erase this; I'll probably
  • 7:25 - 7:28
    need some space.
  • 7:28 - 7:30
    OK, oh, I didn't want
    to do that dot.
  • 7:30 - 7:35
    OK let's say the velocity of
    fluid, or the particles in
  • 7:35 - 7:40
    fluid, at any point in the x, y
    plane, let's say it is equal to
  • 7:40 - 7:51
    5xi plus, I don't know, 0y--
    there's never any, sorry --0j,
  • 7:51 - 7:54
    right? j is the unit vector
    in the y-direction.
  • 7:54 - 7:56
    So there's never a y component
    to the velocity vector.
  • 7:56 - 7:57
    So what would that look like?
  • 7:57 - 8:00
    I don't need a computer
    to draw this.
  • 8:00 - 8:03
    I can handle this
    one myself I think.
  • 8:03 - 8:07
    So if that's the y-axis,
    that's my x-axis.
  • 8:07 - 8:10
  • 8:10 - 8:13
    So when x is equal-- I'll just
    sample some points and draw
  • 8:13 - 8:20
    some vectors --when x is equal
    to 1-- let's say x is 1 there
  • 8:20 - 8:23
    --what's the magnitude
    of this vector?
  • 8:23 - 8:27
    It'll be 5, right?
  • 8:27 - 8:30
    Actually, let me make this a
    different number, because
  • 8:30 - 8:31
    it'll make it hard to do.
  • 8:31 - 8:33
    Let's make this 1/2 x.
  • 8:33 - 8:37
    So when x is 1, the magnitude
    of my vector is 1/2.
  • 8:37 - 8:38
    Only in the x-direction.
  • 8:38 - 8:40
    It has no y component;
    ignore this right here.
  • 8:40 - 8:42
    It's 1/2xi plus 0j.
  • 8:42 - 8:45
    Or you could just say 1/2xi.
  • 8:45 - 8:47
    And when x is equal to 2-- I
    could have picked any points,
  • 8:47 - 8:49
    but I'm just picking the
    numbers that's easy to
  • 8:49 - 8:52
    calculate --when x is equal to
    2, what is the magnitude
  • 8:52 - 8:53
    of the vector?
  • 8:53 - 8:55
    It's 1/2 times 2, which is 1.
  • 8:55 - 8:57
    So it's going to
    be twice as big.
  • 8:57 - 9:03
  • 9:03 - 9:07
    And remember, if I have a
    particle right here in my
  • 9:07 - 9:11
    fluid, if this is a particle,
    its velocity in the x-direction
  • 9:11 - 9:14
    is going to be 1 meter
    per second to the right.
  • 9:14 - 9:18
    If I have a particle here, it's
    velocity in the x-direction
  • 9:18 - 9:20
    is going to be 1/2 a meter
    per second to the right.
  • 9:20 - 9:22
    Let's just do one more point.
  • 9:22 - 9:27
    So let's say that
    x is equal to 3.
  • 9:27 - 9:30
    What's my velocity
    to the right?
  • 9:30 - 9:31
    I'll do it in a different
    color just so that you
  • 9:31 - 9:32
    don't get confused.
  • 9:32 - 9:34
    There's going to be 3/2; it's
    going to be even longer.
  • 9:34 - 9:41
  • 9:41 - 9:44
    But the general idea here,
    and as we move up in x it
  • 9:44 - 9:45
    doesn't change much, right?
  • 9:45 - 9:47
    It doesn't change at all.
  • 9:47 - 9:49
    Our x value doesn't--
  • 9:49 - 9:50
    [COUGHS].
  • 9:50 - 9:54
    So for any y, the magnitude
    of the vector doesn't
  • 9:54 - 9:55
    change, right?
  • 9:55 - 9:58
    It's only dependent on x.
  • 9:58 - 10:01
    And then for example, here,
    it'll be even longer.
  • 10:01 - 10:04
    If we draw the vector here
    it'll be even longer, right?
  • 10:04 - 10:05
    If you do it here.
  • 10:05 - 10:06
    I think you get the point.
  • 10:06 - 10:09
    The further you go to the
    right, the faster the particles
  • 10:09 - 10:11
    are moving towards the right.
  • 10:11 - 10:14
    So now let's try to get a
    little bit of intuition.
  • 10:14 - 10:17
    Oh, I just realized that I ran
    out of time, so I will continue
  • 10:17 - 10:19
    this in the next video.
  • 10:19 - 10:20
Title:
Divergence 1
Description:

Introduction to the divergence of a vector field.

more » « less
Video Language:
English
Duration:
10:20
brettle edited English subtitles for Divergence 1
brettle edited English subtitles for Divergence 1
brettle edited English subtitles for Divergence 1
brettle edited English subtitles for Divergence 1
brettle edited English subtitles for Divergence 1
brettle edited English subtitles for Divergence 1
booksforlife edited English subtitles for Divergence 1
booksforlife edited English subtitles for Divergence 1
Show all

English subtitles

Revisions