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

I Jacobian directional derivative

  1. Mar 16, 2016 #1

    For a sphere:

    x = r*cos(a)*sin(o)
    y = r*sin(a)
    z = -r*cos(a)*cos(o)

    where r is radius, a is latitude and o is longitude, the directional derivative (dx,dy,dz) is the jacobian multiplied by a unit vector (vx,vy,vz), right? So i get:

    dx = cos(a)*sin(o)*vx - r*sin(a)*sin(o)*vy + r*cos(a)*cos(o)*vz
    dy = sin(a)*vx + r*cos(a)*vy
    dz = -cos(a)*cos(o)*vx + r*sin(a)*cos(o)*vy + r*cos(a)*sin(o)*vz

    Is this correct?

    When I visualize this with a computer program I assume x to the right, y upwards and z into the screen.
    I use (vx,vy,vz) := (0, cos(v), sin(v)) for an increasing angle variable v to get a unit length vector where vx = 0 because as I understand (vx,vy,vz) should be a vector in (r,a,o) space and r is not changing.

    Then (dx,dy,dz) is pointing out from some point p on the sphere and rotate in a plane (seemingly) tangent to the sphere. When p is close to the poles, the length of (dx,dy,dz) seems to change as v goes from 0 to 2*pi, otherwise it looks like the length is more constant during a revolution around p.

    Can someone expain if this is correct behaviour?
    Last edited: Mar 16, 2016
  2. jcsd
  3. Mar 16, 2016 #2


    Staff: Mentor

  4. Mar 16, 2016 #3
    Does it really matter? The math is still the same, just with different expressions.
    The aim of my question is to get intuition about jacobians and directional derivatives.
  5. Mar 16, 2016 #4


    Staff: Mentor

    I was thinking that the signs would be wrong and hence the directions so to me I'd want it to be correct.

    My vector analysis is a bit rusty. I've been trying to figure out how to best answer your question but no luck yet. However, a math mentor should see this and comment shortly.
  6. Mar 16, 2016 #5
    thanks jedishrfu
  7. Mar 16, 2016 #6


    Staff: Mentor

    Can you explain better what you trying to do?

    This article in wikipedia discusses use of the jacobian as a generalization of the gradient of a vector function.

  8. Mar 16, 2016 #7
    I'm wondering how to picture it.

    First, what space is the unit vector (vx,vy,vz) in? Since the number of columns in the jacobian and hence the number of dimensions in the unit vector comes from (r,a,o) space, i'm assuming it's a vector in that space.

    Second, how does my choice of (vx,vy,vz) change (dx,dy,dz)? If (vx,vy,vz) is a vector in (r,a,o) space, does it make sense to think of it as (r,a,o) space or should I think of it as a new space with the same number of dimensions?
    Does (dx,dy,dz) have the same direction as (vx,vy,vz)?
    Last edited: Mar 16, 2016
  9. Mar 16, 2016 #8
    I'm puzzled by the original question. Normally a directional derivative is taken of some real-valued function on some space. I am not seeing a real-valued function anywhere.
  10. Mar 16, 2016 #9


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    I'll take a stab at it. This is much easier to keep track of if you stay with right hand systems and stick to some standard direction conventions. But I'll try to use your definitions. (vx,vy,vz) is in the "locally-level" coordinate system. It's called that because the XYll plane is tangent to the surface of the Earth at that latitude & longitude. (0,0,0)ll is the point on the surface of the Earth at that latitude & longitude. Yll points toward the North Pole (increasing latitude) and Xll points East (increasing longitude), and Zll points up from the center of the Earth. (This is a right-hand system, so I haven't checked the signs in your equations).

    Then the (x,y,z) if your equations are in what is called the "Earth Centered, Earth Fixed" coordinate system. (0,0,0)ecef is at the center of the Earth. Yecef points to the North Pole. Xecef points to the intersection of the Equator and the Prime Meridian. Zecef points to a location in the Atlantic Ocean (I think).

    I'm not sure if I got the details right, but I hope this gives you the idea.
    Last edited: Mar 16, 2016
  11. Mar 17, 2016 #10
    FactChecker - Can I express it like this?
    (vx,vy,vz) are coordinates in a cartesian coordinate system C placed inside the destination space.
    C is placed at the point that we want to derivate on the surface and is rotated so that it's x-axis vector aims in the destination space direction where the first coordinate of the source space increases from that point, and similar for the other axes?
    Was is possible to understand that?

    zinq - I think both dx, dy and dz are directional derivatives, if I've understood correctly.
  12. Mar 17, 2016 #11


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    This looks wrong to me. Since (x,y,z) is scaled by multiplier r, my immediate reaction is that (dx,dy,dz) should also be scaled by the multiplier r. Your equations don't have that. Your first term in each equation needs 'r*'. There may be other problems. You should check those calculations.

    See the last section of http://www.moog-crossbow.com/Literature/Application_Notes_Papers/Datum_Transformations_of_Inertial_Reference_Frames.pdf [Broken] . That is going from ECEF to the LL system, so you need to take the inverse of the transformation matrix.
    Last edited by a moderator: May 7, 2017
  13. Mar 17, 2016 #12
    For the first row of the jacobian:
    In the first column i derivate r*cos(a)*sin(o) wrt r which gets me cos(a)*sin(o)
    In the second column i derivate r*cos(a)*sin(o) wrt a which gets me -r*sin(a)*sin(o)
    In the third column i derivate r*cos(a)*sin(o) wrt o which gets me r*cos(a)*cos(o)

    Is that wrong?
  14. Mar 17, 2016 #13


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    Oh. Sorry. You are doing something different from what I was thinking. Then I think you should be using (dr, da, do) instead of (vx, vy, vz).
  15. Mar 17, 2016 #14

    Yeah, maybe it got confusing with (dx, dy, dz), but it does have with delta to do.
    But just to be clear, with (dr, da, do) you still mean a unit vector, right?
  16. Mar 17, 2016 #15


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    It's a good idea to use a unit vector to visualize it, but that is not necessary. It should convert any velocity vector in the (r,a,o) coordinate system to the (x,y,z) coordinate system.
  17. Mar 17, 2016 #16

    But for the directional derivative to get the correct amount of slope in the direction of (vx,vy,vz) it would need to have a length of one?
    Did you agree with my description above, about a coordinate system C placed inside the destination space?
    In that case, my next question is how to get the direction of maximum slope in the point
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Jacobian directional derivative
  1. Derivation of Jacobian (Replies: 0)