If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Multivariable calculus>Unit 2

Lesson 9: Divergence

# Divergence formula, part 2

Here we finish the line of reasoning which leads to the formula for divergence in two dimensions. Created by Grant Sanderson.

## Want to join the conversation?

• Since the i component in the vector V (P(x,y)) clearly from its notation depends on both x and y, why one get its partial derivative with respect to x?
• Firstly I think this is a fantastic question as it seems rather unintuitive, maybe even arbitrary, that you take the partial of P with respect to only one of its variables - it seems like we are leaving out information about how the P component changes with respect to our other variable.

The way I have rationalized it is as follows, and it relies on the understanding that we are working with vector valued functions (meaning we are getting a vector from this function): P(x,y) represents the contribution of the vector in the x direction. That is all it is. Sure, maybe it has a bunch of y terms in it. In fact, it could be P(x,y) = y^2 (and thus ∂P/∂x will be 0) [here I will assume V(x,y)* = (P(x,y), 0 )]. But all you and I care about is how this *x-component changes in the x-direction. That is critical to us to understand if there is any divergence related to the x-component.

Importantly, think about what it would mean if we took ∂P/∂y and found 2y. This means along the vertical, every time we go up one notch, the length of the vector is twice as long as the one before it. But what information does this tell us about the divergence. As I see it, it tells us nothing valuable, but it may help to examine a few different scenarios. So, if I am at y = 1 and the vector is length 2 in the x direction, and then at y = 2 the vector length is 4, this doesn't tell me if the vectors around these points are expanding or contracting. In all of these cases, along the line y=1, y=2, these vector lengths could be constant, thereby, having a divergence of 0 or they could vary wildly, and have a divergence that approaches infinity In fact, in the case of V = (P(x,y), 0 ), the divergence is 0. And so while I might calculate a positive ∂P/∂y, knowing how the x-component changes with respect to the "y" component does not give me information about the divergence, as we have seen above, regardless of ∂P/∂y, both a divergence of 0 or infinity/-infinity are possible, and thus this isn't terribly useful for trying to figure out if our function diverges.
• Intuitively speaking, if the partial derivative of Q(x,y) with respect to y is negative, shouldn't that lead to divergence as well? That corresponds, if I understand it correctly, to a "negative increase" of the y component, that is, the y component gets larger in magnitude downwards. So if we imagine a fluid flowing in that point, it flows more and more away from the point, no matter if the partial derivative is positive or negative?
• Oh yes, I love this question because I got tricked too at first.

Here's my humble opinion: say if the partial of q in respect to y is positive at point s, an increase of y will make q more positive (pointing away from s) and a decrease of y will make q more negative (pointing away from s).

In contrast, if the derivative is negative, an increase of y will make q, here is the catch, more negative (pointing towards s) and a decrease of a y will make q more positive (also pointing towards s as well)!

Therefore, if the derivative is negative at a point, things converge towards it.
• Hi every one,
Why the formula just accounts for partial derivative with respect to one component? for example we can compute the partial derivative of p(x,y) with respect to y too, as the y is changing the output first component i.e p too.
• But that doesn't really give us information on the divergence. Imagine for a second that you had a vector valued function whose y component was 0 (i.e. horizontal vectors). What if as your y input increased, the x component got larger (i.e. dP/dy > 0)? That would mean the particles at higher levels of y are moving to the right faster (or to the left slower) than the particles below them. But, this doesn't tell us anything about the divergence! So in this case, we don't really care about dP/dy for divergence. Similar arguments can be made in other scenarios.
• Is there a possibility that the vector v has 3 inputs P(x,y), Q(x,y) and R(x,y)? If that is possible, what would be the div function?
(1 vote)
• This does work for a three-dimensional vector field, but each of your component functions P, Q and R would have to take in 3 inputs (since the input would then be a point in three-dimensional space), so they would look like P(x, y, z), Q(x, y, z) and R(x, y, z).
• Still don't understand why there is no dP/dy component in the divergence formula. Do P and x need to be aligned in some sense? Could someone explain? Thanks.
• In the formula for divergence, what does the value we get (dP/dx + dQ/dy) represent? e.g What does it mean if we get a "divergence of 1?"