Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Changed post

  1. Aug 26, 2007 #1
    divergence question

    show that the divergence transforms as a vector under 2D rotations.

    I am so confused abouth what this question wants me to do. Obviously the divergence is not invariant under rotations. Consider the divergence of the function f(x,y) = x^2 * x-hat. The divergence is clearly different at (x,y) = (1,0) than at (x,y) = (-1,0). What can this possibly mean then?
    Last edited: Aug 26, 2007
  2. jcsd
  3. Aug 26, 2007 #2
    Yes, it is sort of strange, but think about as if you just threw a bunch of pine needles onto one spot in a pond. When the needles start to move they are diverging, if they move away then it would be positive divergence, and if they moved in it would be negative divergence. Now, if you stand at one spot on the pond and then move to another, the divergence of the needles (how much they are moving) will be the same.

    What you need to do is show that

    [tex]\nabla \cdot \mathbf{v} = \nabla \cdot \mathbf{v'}[/tex]

    You know from the rotation matrix that

    [tex]x' = xcos\theta + ysin\theta[/tex]
    [tex]y' = -xsin\theta + ycos\theta[/tex]

    You also know from the chain rule that

    [tex]\frac{\partial v}{\partial x'} = \frac{\partial v}{\partial x} \frac{\partial x}{\partial x'}[/tex]

    and the similar result for y'.

    "Solving" for x and y, and using the above will help you out.
  4. Aug 27, 2007 #3
    That statement just seems false to me. What about my example in the thread-opening post?

    Do you mean
    [tex]\frac{\partial v}{\partial x'} = \frac{\partial v}{\partial x} \frac{\partial x}{\partial x'} + \frac{\partial v}{\partial y} \frac{\partial y}{\partial x'} [/tex]
  5. Aug 27, 2007 #4
    I don't see what you mean in your opening post. Yes, the divergence is different at those points, but it will still transform as a scalar in two dimensions. The divergence is defined as how much the vector spreads out from a point in question.

    That's what I meant, don't really know why I missed it (lots of typing), sorry. So with the combination of the rotation transform and the partial equations you end up getting

    [tex]\frac{\partial v_x'}{\partial x'} = \frac{\partial v_x}{\partial x'}cos \theta + \frac{ \partial v_y}{\partial x'} sin \theta = (\frac{\partial v_x}{\partial x} \frac{\partial x}{\partial x'} + \frac{\partial v_x}{\partial y} \frac{\partial y}{\partial x'})cos \theta + ( \frac{\partial v_y}{\partial x} \frac{\partial x}{\partial x'} + \frac{\partial v_y}{\partial y} \frac{\partial y}{\partial x'}) sin \theta[/tex]

    and similar for v_y'.

    Have you already done the gradient transforming as a vector in two dimensions? If not it might be helpful. It might also be helpful to try some examples.
  6. Aug 28, 2007 #5
    Sorry, my initial post was wrong. The divergence transforms as a scalar and the gradiant transforms as a vector. I should have caught that earlier. I have done the gradiant as a vector already and that works fine:

    \frac{\partial f}{\partial x'} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial x'} + \frac{ \partial f}{\partial y} \frac{ \partial y}{\partial y'} = \frac{\partial f}{\partial x}cos \theta + \frac{ \partial f}{\partial y} sin \theta[/tex]

    Similar for df/dy'. I think it is the primed notation that is confusing me. x' is the transformed x but why are you transforming the function v_x as well? I thought we were working with the same function just with a transformation of its domain. Would it not make more sense to write v_x(x',y') instead of v_x'? Look at the equation above. There are no primed coordinates on the far RHS.

    You wrote:
    \frac{\partial v_x'}{\partial x'} = \frac{\partial v_x}{\partial x'}cos \theta + \frac{ \partial v_y}{\partial x'} sin \theta[/tex]

    Also, I do not see why you are using primed coordinates on the RHS of the above equation.
    Last edited: Aug 28, 2007
  7. Aug 28, 2007 #6
    Bars are more typical, and I did all my stuff on paper with bars, so I might have added or missed a prime at some point in translation, though I don't see any. I don't really know how to use bars in LaTeX, and primes are the next standard.

    You want
    [tex] \nabla \cdot \mathbf{v'} = (\frac{\partial}{\partial x'} + \frac{\partial}{\partial y'}) \cdot \mathbf{v'}[/tex]

    x' is the transformation of x, but the same principles work for transforming the divergence of v. Think of x as v_x, and y as v_y. So I have given the first primed partial with its transformation, you will need to figure out and add the other. Then you will have to start working towards showing that the original vector v, and the transformed vector v' have the same divergence.
  8. Aug 28, 2007 #7
    I am aware that you are using primes instead of bars.

    That is very confusing. Our original vector-valued function is v(x,y) = v_x(x,y) x-hat + v_y(x,y) y-hat. Its divergence is

    [tex] \frac{\partial{v_x(x,y)}}{\partial{x}} + \frac{\partial{v_y(x,y)}}{\partial{y}} [/tex]

    After we transform the coordinates, we get

    v(x',y') = v_x(x',y') x-hat + v_y(x',y') y-hat


    v(x',y') has divergence

    [tex] \partial{v_x(x',y')}/\partial{x'} + \partial{v_y(x',y')}/\partial{y'} [/tex]

    correct ?

    [tex] \partial{v_x(x',y')}/\partial{x'} + \partial{v_y(x',y')}/\partial{y'} [/tex]


    [tex] \frac{\partial{v_x(x',y')}}{\partial{x}} \frac{\partial{x}}{\partial{x'}} +
    \frac{\partial{v_y(x',y')}}{\partial{y}}\frac{\partial{y}}{\partial{y'}} +
    \frac{\partial{v_y(x',y')}}{\partial{x}} \frac{\partial{x}}{\partial{y'}}[/tex]

    I can find expressions for the second partial derivatives in each term but it does not produce the correct answer because I cannot get rid of the sines and cosines.
    Last edited: Aug 28, 2007
  9. Aug 28, 2007 #8
    Yes, it all looks good. I dropped the function of (x',y') because it is sort of implicit and a pain to write over and over again.

    Yes, when you plug it all in you should get a lot of sines and cosines with something to the effect of (sorry, I'm bound to make a LaTeX mistake):

    [tex] \nabla \cdot \mathbf{v'} = \frac{\partial v_x}{\partial x} cos^2 \theta + \frac{\partial v_x}{\partial y} sin \theta cos \theta + \frac{\partial v_y}{\partial x} sin \theta cos \theta + \frac{\partial v_y}{\partial y} sin^2 \theta + \frac{\partial v_x}{\partial x} sin^2 \theta - \frac{\partial v_y}{ \partial z} sin \theta cos \theta - \frac{\partial v_y}{\partial x} sin \theta cos \theta + \frac{\partial v_y}{\partial y} cos^2 \theta[/tex]

    Check it against what you have. It will simplify after some factoring and cancellation.
    Last edited: Aug 28, 2007
  10. Aug 28, 2007 #9
    I am sure this will elucidate the flaw in my logic:

    I got

    x = cos(theta)x' -sin(theta)y'
    y = sin(theta)x' + cos(theta)y'

    just by applying the inverse rotation matrix. Then

    [tex] \frac{\partial{x}}{\partial{x'}} = cos(\theta) [/tex]
    and similarly for the 3 other partials. Plugging that into the last equation of my previous post does not given me anything like what you posted. Indeed, none of the terms even have more than one sine or cosine term!!
    Last edited: Aug 28, 2007
  11. Aug 28, 2007 #10
    The inverse matrix will just switch a few signs around, but will ultimately give the same result. What did you get for your vector transformation of the gradient? Because you can basically just plug that in for your primed coordinates.

    So, maybe you were confused on where I actually got
    [tex]\frac{\partial v_x'}{\partial x'} = \frac{\partial v_x}{\partial x'}cos \theta + \frac{ \partial v_y}{\partial x'} sin \theta[/tex]

    it is merely that
    [tex] v_x (x',y') = v_x (x,y) cos\theta + v_y (x,y) sin \theta[/tex]

    [tex] \frac{\partial v_x (x',y')}{\partial x'} = \frac{\partial}{\partial x'} (v_x (x,y) cos\theta + v_y (x,y) sin \theta)[/tex]

    the same approach works for v_y (x',y').

    So get those two down, and do the chain rule stuff. Then look at the divergence so far, and see if there is anything in the divergence you have that relates to the gradient transform you did. Hopefully you will get on track.
  12. Aug 28, 2007 #11
    Are you using [tex] v_x(x',y') [/tex] interchangeably with [tex] v'_x [/tex]? If you are I understand completely now!!
    Last edited: Aug 28, 2007
  13. Aug 28, 2007 #12
    Yeah, I think it is annoying to write the function dependencies all the time.
  14. Aug 28, 2007 #13
    I see. Thanks.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook