1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
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: Change of Variable for a Vector from Rectangular to Cylindrical

  1. Sep 7, 2012 #1
    1. The problem statement, all variables and given/known data
    1.21 Express in cylindrical components: (a) the vector from C(3, 2,−7) to
    D(−1, −4, 2); (b) a unit vector at D directed toward C; (c) a unit vector at D
    directed toward the origin.

    I just want to know (a).

    And the solution from the book is attached, too.

    2. Relevant equations
    ρ = Sqrt(x^2+y^2)
    φ = Atan(y/x)
    z = z

    [tex]J(r,\phi, z)=\begin{bmatrix} {dx\over dr} & {dx\over d\phi} &{dx\over dz} \\ {dy\over dr} & {dy\over d\phi} & {dy\over dz} \\ {dz\over dr} & {dz\over d\phi} & {dz\over dz}\end{bmatrix}
    =\begin{bmatrix} {d(r\cos\phi)\over dr} & {d(r\cos\phi)\over d\phi} & {d(r\cos\phi)\over dz} \\ {d(r\sin\phi)\over dr} & {d(r\sin\phi)\over d\phi} & {d(r\sin\phi)\over dz} \\ {dz\over dr} & {dz\over d\phi} & {dz\over dz}\end{bmatrix}
    =\begin{bmatrix} \cos\phi & -r\sin\phi & 0 \\ \sin\phi & r\cos\phi & 0 \\ 0 & 0 & 1 \end{bmatrix}[/tex]
    3. The attempt at a solution
    I posted a rather detailed account of what I did, but apparently I took longer than 15 mins or whatever, and it all got erased.... I think the physics forum should look into away to prevent that!

    Anyway, I tried solving it and I got that the vector from C to D is D-C = (-4,-6,9)

    V_cd = -4 a_x - 6 a_y + 9 a_z

    So I found ρ = Sqrt(6^2+4^2) = Sqrt(52) = 7.2111
    And I found φ = Atan(-6/-4) = 56.3099
    And we add 180 to this to get φ = 236.3099 degrees

    When I tried finding each component, I got ρ = 7.2111, φ = 0, and z = 9

    ... In short, I'm very confused. I can't even get the component of ρ of V_cd, which I think should be rather easy.

    Also, I'm not even sure how to describe a position vector in cylindrical coordinates.

    Is it just r(ρ,φ,z) = ρ a_ρ + φ a_φ + z a_z, where φ is in radians?

    In that case, I'd get: V_cd = 7.2111 a_ρ + 4.124 a_φ + 9 a_z

    If I do it the other way, where I got each component by taking the dot product of V_cd with each unit vector in cylindrical coordinates (i.e. a_ρ, a_φ, a_z), I would get

    V_cd = 7.2111 a_ρ + 9 a_z

    And as you may note, neither is like the back of the book. :(

    Attached Files:

    Last edited: Sep 7, 2012
  2. jcsd
  3. Sep 8, 2012 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    The two of the unit vectors in cylindrical coordinates aren't constant, so you have a set of unit vectors ##\hat{a}_\rho##, ##\hat{a}_\phi##, and ##\hat{a}_z## for the point C, and another set for the point D. The vector ##\vec{V}_\text{CD}## has its tail at C and tip at D, so you want to express it in terms of the unit vectors for point C.

    What you found was how to write ##\vec{V}_\text{CD}## in terms of the unit vectors for (-4, -6, 9).
  4. Sep 8, 2012 #3
    I'm not sure what you're telling me. If I want the position vectors associated with C and D in terms of constant unit vectors, then I can only represent that in terms of a_x, a_y, and a_z. I can't make a_ρ, a_φ constant, because they're not -- by definition.

    So the only way to express the position vectors C and D (with no ambiguity) is in terms of a_x, a_y, a_z... or am I missing something?

    I managed to find the vector V_cd in rectangular coordinates. I'm pretty sure that one's correct, and I can find ρ, φ, and z, too. What doesn't make sense to me is how to get it in the form of the bases (the unit vectors). Say, I know ρ, φ, z - what do I do next?

    I'm beginning to think the answer in the back of the book is wrong. I've worked on this problem in multiple ways and have not been able to get what they got.

    Also, I now know (after reading online) that r(ρ,φ,z) = ρ a_ρ + φ a_φ + z a_z is incorrect because φ is an angle, which is not in units of length.

    The ρ component should definitely be ρ = Sqrt(4^2 + 6^2) = Sqrt(52), but they didn't even get that part right.
  5. Sep 8, 2012 #4


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    I've attached a picture for an example in two dimensions using polar coordinates.

    The vector r goes from the origin to some point in the plane. The vector ar is the unit radial vector. In terms of ar, you always have r=r ar, where r=|r|. There's never a component in the aθ direction because that unit vector is always perpendicular to r.

    The vector V, the way I drew it here, is equal to V=ar+aθ.

    In your problem, VCD should be in the role of V in my example. (The point C would be the green dot, and the point D would be at the tip of the blue vector.) But you're calculating its components as if it were in the role of r. When you do that, you always get that it's just some multiple of ar, which is essentially what you're finding (if we neglect the z-component).

    Attached Files:

  6. Sep 8, 2012 #5
    Wow. Thanks a lot!! I finally get it.

    So my biggest problem was φ, because this determined a different a_ρ and a_φ.

    The value of φ associated with point C is φ_c = Atan(2/3) = 33.69 degrees

    ρ component of V_cd = (-4 a_x -6 a_y + 9 a_z) dot a_ρ
    = -4*cos(φ_c) - 6*sin(φ_c) + 9*0
    = -6.6564
    φ component of V_cd = (-4 a_x -6 a_y + 9 a_z) dot a_φ
    =4*sin(φ_c) - 6*cos(φ_c) + 9*0
    z component of V_cd = z = 9

    So the final answer is V_cd = -6.6564 a_ρ - 2.7735 a_φ + 9 a_z.
    Just like the book said!

    haha. I've spent so many hours on this one problem, but I'm sure it'll help me with future ones.

    Thanks for your help again, Vela!
  7. Sep 8, 2012 #6


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You're welcome. This is one of those things that makes perfect sense once you get it, but until then, it can be terribly confusing.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook