< Return to Video

Divergence 3

  • 0:00 - 0:01
  • 0:01 - 0:03
    Now let's do a slightly fancier
    example, then we'll try to
  • 0:03 - 0:05
    analyze the vector field.
  • 0:05 - 0:08
    And hopefully this will
    make everything a little
  • 0:08 - 0:09
    bit more tangible.
  • 0:09 - 0:13
    So let's say that the velocity
    of the fluid, or the particles
  • 0:13 - 0:18
    in the fluid, at any given
    point in the x-y plane, let's
  • 0:18 - 0:28
    say in the x-direction, it is x
    squared, x squared minus 3x
  • 0:28 - 0:38
    plus 2 in the x-direction, plus
    y squared minus 3y plus
  • 0:38 - 0:40
    2 in the y-direction.
  • 0:40 - 0:44
    Make it simple so that we only
    have one thing to factor.
  • 0:44 - 0:46
    So let's just do
    the math first.
  • 0:46 - 0:52
    Let's figure out the divergence
    of our vector field, the
  • 0:52 - 0:54
    divergence of our field.
  • 0:54 - 0:56
    And going to show you a graph
    of this field soon, so we'll
  • 0:56 - 0:58
    get an intuition of what it
    actually looks like, instead of
  • 0:58 - 1:02
    my not-so-accurate drawings.
  • 1:02 - 1:03
    So what's the divergence?
  • 1:03 - 1:05
    We take the partial derivative
    of the x-component
  • 1:05 - 1:07
    with respect to x.
  • 1:07 - 1:09
    So that's just, there's only an
    x-variable here, so we don't
  • 1:09 - 1:12
    really have to worry about
    keeping y or z constant.
  • 1:12 - 1:14
    It's really just a derivative
    of this expression
  • 1:14 - 1:15
    with respect to x.
  • 1:15 - 1:20
    So it's 2x minus 3.
  • 1:20 - 1:23
    And then we add that to the
    partial derivative of the
  • 1:23 - 1:25
    y-component, or the y-function,
    with respect to y.
  • 1:25 - 1:28
    There's only y's in the
    y-component, so we just
  • 1:28 - 1:29
    take the derivative
    with respect to y.
  • 1:29 - 1:35
    So it's plus 2y minus 3.
  • 1:35 - 1:39
    Or we could just say that the
    divergence of v, at any point
  • 1:39 - 1:48
    xy, so this is a function of x
    and y, is 2x plus 2y minus 3.
  • 1:48 - 1:53
    Now before I show you the
    graph, let's analyze this
  • 1:53 - 1:54
    function a little bit.
  • 1:54 - 1:56
    First of all, let's just look
    at the original vector field,
  • 1:56 - 2:02
    and think about when does that
    vector field have some
  • 2:02 - 2:03
    interesting points?
  • 2:03 - 2:06
    Well, I think some interesting
    points are when either the x-
  • 2:06 - 2:08
    or the y-components
    are equal to 0.
  • 2:08 - 2:11
    So when is the
    x-component equal to 0?
  • 2:11 - 2:13
    Well, if we factor the
    x-component, that's the
  • 2:13 - 2:17
    same thing as, we could
    rewrite our vector field.
  • 2:17 - 2:23
    If we just factored that,
    that's x minus 1 times x minus
  • 2:23 - 2:30
    2i plus, and it's the same
    polynomial, just with y, for
  • 2:30 - 2:38
    the y-component, so y minus
    1 times y minus 2 times j.
  • 2:38 - 2:43
    So the x-component is 0 when x
    is equal to 1, these are just
  • 2:43 - 2:45
    the roots of this polynomial,
    when x is equal to
  • 2:45 - 2:47
    1 or 2, right?
  • 2:47 - 2:52
    And the y-component is 0
    when y is equal to 1 or 2.
  • 2:52 - 2:55
    And they're both equal to 0
    if we have any combination
  • 2:55 - 2:55
    of these points.
  • 2:55 - 3:02
    So the points where they're
    both equal to 0 are 1, 1, x's
  • 3:02 - 3:05
    is 1, y is 2, right, because
    then both components
  • 3:05 - 3:10
    are 0, 2, 1, or 2, 2.
  • 3:10 - 3:15
    So these are the points where
    the magnitude of the velocity
  • 3:15 - 3:17
    of our fluid, or the particles
    of the fluid, are 0.
  • 3:17 - 3:20
    And we'll see that on
    our graph in a second.
  • 3:20 - 3:22
    And let me ask
    another question.
  • 3:22 - 3:27
    At what points are, well, let's
    first decide, what point is
  • 3:27 - 3:29
    the divergence equal to 0?
  • 3:29 - 3:32
    Let's say, at what point is
    a divergence equal to 0.
  • 3:32 - 3:34
    Let me click clear
    up some space.
  • 3:34 - 3:36
    I think I can delete this.
  • 3:36 - 3:40
    We got our points, we figured
    out what coordinates are the
  • 3:40 - 3:43
    magnitude of the
    vector field 0.
  • 3:43 - 3:48
    So let's try to figure out,
    when is the divergence
  • 3:48 - 3:50
    equal to 0?
  • 3:50 - 3:51
    So this is divergence.
  • 3:51 - 3:58
    So if we set that equal
    to 0, 2x plus 2y, 2x
  • 3:58 - 3:59
    plus 2y, oh, sorry.
  • 3:59 - 4:01
    You know what, this is 2x
    minus 3 plus 2y minus 3.
  • 4:01 - 4:04
    So this is minus 6, right?
  • 4:04 - 4:06
    Minus 3 minus 3,
    that's minus 6.
  • 4:06 - 4:10
    That's my major flaw,
    adding and subtracting.
  • 4:10 - 4:12
    Anyway, so the divergence.
  • 4:12 - 4:15
    2x plus 2y, minus 6.
  • 4:15 - 4:17
    And we want to know,
    when does that equal 0?
  • 4:17 - 4:20
    So let's set it equal to 0.
  • 4:20 - 4:22
    And we can simplify
    this a little bit.
  • 4:22 - 4:26
    We can divide both sides of the
    equation by 2, and you get x
  • 4:26 - 4:29
    plus y minus 3 is equal to 0.
  • 4:29 - 4:33
    You get x plus y is equal to 3.
  • 4:33 - 4:35
    We could be finished there, or
    we could just put it in our
  • 4:35 - 4:40
    traditional mx plus b form,
    that's the way I find it
  • 4:40 - 4:41
    easier to visualize a line.
  • 4:41 - 4:46
    We could say y is
    equal to 3 minus x.
  • 4:46 - 4:51
    So along this line, the
    divergence of the vector fields
  • 4:51 - 4:56
    b is equal to 0, along the line
    y is equal to 3 minus x.
  • 4:56 - 4:59
    And if we're above that line,
    the divergence is going to be
  • 4:59 - 5:02
    positive, right, because if you
    just made this a greater than
  • 5:02 - 5:04
    sign, that would carry over.
  • 5:04 - 5:06
    You'd have y is
    greater than 3-x.
  • 5:06 - 5:14
    So y greater than 3-x, the
    divergence is positive.
  • 5:14 - 5:19
    And y is less than 3 minus x,
    the divergence is negative.
  • 5:19 - 5:22
    And you could just make this a
    less than sign then solve, and
  • 5:22 - 5:24
    you'll get y is less than 3-x,
    you want to know when the
  • 5:24 - 5:26
    divergence is negative.
  • 5:26 - 5:29
    So I think we've done all of
    the analyzing we can do.
  • 5:29 - 5:31
    So let's take a look at the
    graph and see if it if it's
  • 5:31 - 5:34
    consistent with our intuition
    of what a divergence is,
  • 5:34 - 5:35
    and the numbers we found.
  • 5:35 - 5:37
  • 5:37 - 5:39
    I hope you can see this.
  • 5:39 - 5:41
    So this is the vector field.
  • 5:41 - 5:46
    I don't have space to show it,
    but I think you remember, this
  • 5:46 - 5:48
    is, you know, x squared
    minus 3x plus 2.
  • 5:48 - 5:50
    This is the definition
    of our vector field.
  • 5:50 - 5:52
    Have it graphed here.
  • 5:52 - 5:55
    And we figured out, we just
    figured out when the
  • 5:55 - 5:57
    x-components and the
    y-components are equal to 0,
  • 5:57 - 5:59
    and then we said, when are
    both of them equal to 0?
  • 5:59 - 6:01
    And we said, oh, well
    at the point 1, 1.
  • 6:01 - 6:04
    Well, this is the point 1, 1,
    and we that the magnitudes of
  • 6:04 - 6:06
    the vectors are 0
    at that point.
  • 6:06 - 6:10
    And actually, I could
    zoom in a little bit.
  • 6:10 - 6:12
    Right around here, they're all
    pointing inwards,, but they get
  • 6:12 - 6:16
    smaller and smaller as you
    approach the point 1, 1, right?
  • 6:16 - 6:20
    We also said at the point
    1, 2. x is 1, y is 2.
  • 6:20 - 6:22
    And here, too, we see that
    the magnitude of the vectors
  • 6:22 - 6:25
    get very, very, very small.
  • 6:25 - 6:26
    We could zoom in again.
  • 6:26 - 6:29
    And we see, the magnitude
    gets very small.
  • 6:29 - 6:31
    The other point, 2, 1, once
    again, we see the magnitude
  • 6:31 - 6:33
    get small, and then 2, 2.
  • 6:33 - 6:36
    So that's consistent with what
    we found out, that the vector
  • 6:36 - 6:38
    field gets very small
    at this point.
  • 6:38 - 6:40
    And the other interesting
    thing we said, OK, when does
  • 6:40 - 6:42
    the divergence equal 0?
  • 6:42 - 6:46
    Well, the divergence equaled
    0 along the line y is
  • 6:46 - 6:49
    equal to 3 minus x.
  • 6:49 - 6:52
    So the line y is equal to 3
    minus x starts, the y-intercept
  • 6:52 - 6:56
    is going to be 3, and it's
    going to come down like this.
  • 6:56 - 6:56
    Right?
  • 6:56 - 6:59
    So anything along, at any
    point along that line,
  • 6:59 - 7:00
    the divergence is 0.
  • 7:00 - 7:03
    And if we actually look at
    the graph, it makes sense.
  • 7:03 - 7:07
    Because I can't draw on this
    graph, but if we drew a circle
  • 7:07 - 7:11
    right there, let's assume that
    that's on that, the line y is
  • 7:11 - 7:15
    equal to 3 minus x, we would
    see that in a given amount of
  • 7:15 - 7:18
    time, just as many particles
    are entering through the top
  • 7:18 - 7:21
    right as leaving through
    the bottom left, right?
  • 7:21 - 7:24
    A lot of entering through the
    top right and a lot of leaving
  • 7:24 - 7:24
    through the bottom left.
  • 7:24 - 7:27
    And the vectors, though,
    are about the same.
  • 7:27 - 7:32
    And if we go to the bottom, if
    we go here on the line, it
  • 7:32 - 7:36
    looks like maybe there are less
    entering, but there's
  • 7:36 - 7:37
    also less leaving.
  • 7:37 - 7:40
    I know it's hard to see, but
    anywhere along the line,
  • 7:40 - 7:41
    you see just as much
    entering as leaving.
  • 7:41 - 7:45
    And that's why the
    divergence is 0.
  • 7:45 - 7:48
    Now, let's look at some
    of the other points.
  • 7:48 - 7:51
    Up here, we figure the
    diverge is positive.
  • 7:51 - 7:52
    And does that make
    sense?
  • 7:52 - 7:53
    Let's pick an arbitrary point.
  • 7:53 - 7:57
    If we were to draw a circle
    around here, we see the vectors
  • 7:57 - 8:00
    on the left-hand side of that
    circle that you can't see,
  • 8:00 - 8:02
    because I can't draw
    on this graph.
  • 8:02 - 8:05
    But actually, let's
    just say the square.
  • 8:05 - 8:08
    Let's say the square
    is my region, right?
  • 8:08 - 8:09
    This one right here.
  • 8:09 - 8:12
    If that square is my region,
    we see the vectors on the
  • 8:12 - 8:16
    left-hand side are larger, than
    factors leaving are larger than
  • 8:16 - 8:19
    the vectors entering it, right?
  • 8:19 - 8:23
    So if, in a given amount of
    time, more is leaving than
  • 8:23 - 8:27
    entering, then I'm becoming
    less dense, or you could say
  • 8:27 - 8:29
    that the particles
    are diverging.
  • 8:29 - 8:32
    And that makes sense, because
    I have a positive divergence.
  • 8:32 - 8:35
    And if we go here, where the
    divergence is negative, let's
  • 8:35 - 8:37
    pick an arbitrary spot.
  • 8:37 - 8:40
    Let's say this
    square right here.
  • 8:40 - 8:44
    We see that the vectors
    entering it, the magnitude of
  • 8:44 - 8:47
    the vectors entering it, are
    larger than the magnitude of
  • 8:47 - 8:49
    the vectors exiting it.
  • 8:49 - 8:51
    So in any given amount of time,
    more is coming in than leaving.
  • 8:51 - 8:54
    So it's getting denser,
    or it's converging.
  • 8:54 - 8:57
    So negative divergence, you can
    view it as getting denser,
  • 8:57 - 8:59
    or it's actually converging.
  • 8:59 - 9:01
    Actually, something
    interesting is happening
  • 9:01 - 9:04
    at these two points.
  • 9:04 - 9:09
    So we said that at the point
    2, 1, we see that in the
  • 9:09 - 9:14
    y-direction it's actually
    converging, right?
  • 9:14 - 9:18
    Above y is equal to 1, the
    arrows are pointing down,
  • 9:18 - 9:21
    and below it the arrows
    are pointing up, right?
  • 9:21 - 9:23
    So in the y-direction, we're
    actually converging, or we
  • 9:23 - 9:24
    have a negative divergence.
  • 9:24 - 9:27
    Things are entering
    any given spot.
  • 9:27 - 9:31
    But in the x-direction, things
    are getting pushed out, right?
  • 9:31 - 9:34
    So the reason why the
    divergence is 0 here, you might
  • 9:34 - 9:38
    have particles entering above
    and below a certain space, but
  • 9:38 - 9:41
    you have just as many particles
    exiting to the left
  • 9:41 - 9:42
    and the right.
  • 9:42 - 9:44
    So it's kind of like particles
    are getting deflected out.
  • 9:44 - 9:49
    So on a net basis, between both
    dimensions, you have no
  • 9:49 - 9:52
    increase or decrease in density
    along that line y is
  • 9:52 - 9:54
    equal to 3 minus x.
  • 9:54 - 9:56
    And before I run out of time, I
    just want to give you that core
  • 9:56 - 10:01
    intuition again, of why the
    divergence is positive, and why
  • 10:01 - 10:05
    that means that things are
    flowing out, when the rate
  • 10:05 - 10:06
    of change is positive.
  • 10:06 - 10:08
    So we said the
    divergence is positive.
  • 10:08 - 10:09
    Let's say at the spot, right?
  • 10:09 - 10:12
    So it makes sense, if our
    partial derivatives are
  • 10:12 - 10:16
    positive, that means that the
    magnitude of our vector is
  • 10:16 - 10:19
    getting larger and larger for
    larger values of our
  • 10:19 - 10:21
    x's and y's, right?
  • 10:21 - 10:23
    So if the magnitude of our
    vectors are getting larger and
  • 10:23 - 10:26
    larger for larger values of x
    and y, the vectors on the
  • 10:26 - 10:28
    right are going to have
    a larger magnitude than
  • 10:28 - 10:29
    the factors on the left.
  • 10:29 - 10:31
    They're increasing
    in magnitude.
  • 10:31 - 10:34
    And so if I were to draw a
    boundary, more is going to
  • 10:34 - 10:36
    be coming out of the right
    than entering to the left.
  • 10:36 - 10:39
    And so you have a positive
    diverge, or you're
  • 10:39 - 10:41
    getting less dense.
  • 10:41 - 10:44
    Anyway, I hope I haven't
    confused you too much,
  • 10:44 - 10:46
    but I have run out
    of time once again.
  • 10:46 - 10:48
    I'll see you in the next video.
Title:
Divergence 3
Description:

Analyzing a vector field using its divergence.

more » « less
Video Language:
English
Duration:
10:48

English subtitles

Revisions