1. Not finding help here? Sign up for a free 30min 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!

Chain Rule in 2 variables

  1. Oct 7, 2012 #1

    CAF123

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    Given that [tex] f(x,y) = g(r,\theta), [/tex] where [itex] x = r\cos\theta [/itex] and [itex] y = r\sin\theta, [/itex] find formulae for [itex] \frac{∂f}{∂x} [/itex] and [itex] \frac{∂f}{∂y} [/itex] expressed entirely in terms of [itex] r, \theta, \frac{∂g}{∂r} , \frac{∂g}{∂\theta} [/itex].

    3. The attempt at a solution
    I said [tex] \frac{∂f}{∂x} = \frac{∂g}{∂x} = \frac{∂g}{∂r}\frac{∂r}{∂x} + \frac{∂g}{∂\theta}\frac{∂\theta}{∂x}. [/tex]
    Rearranging x = rcos(θ) to r = x/(cos(θ) gave [itex] \frac{∂r}{∂x} = \sec\theta [/itex] and [itex] \frac{∂\theta}{∂x} = -\frac{1}{r\sin\theta} [/itex]
    Can someone tell me if this is correct?
    I used a similar method for [itex] \frac{∂f}{∂y} = \frac{∂g}{∂y} [/itex]
    Many thanks
     
  2. jcsd
  3. Oct 7, 2012 #2
    You need to express r and theta in terms of x and y, and then find their derivatives.
     
  4. Oct 7, 2012 #3

    CAF123

    User Avatar
    Gold Member

    I expressed r = x/cosθ, found [itex] \frac{∂r}{∂x} [/itex] and then r = y/sinθ and found [itex] \frac{∂r}{∂y} [/itex] Is this not correct?
     
  5. Oct 7, 2012 #4
    In r = x/cosθ, θ is also a function of x. Ditto for r = y/sinθ. You need to express r and θ as explicit functions of x and y to obtain their derivatives. Or use the implicit function theorem if you have it.
     
  6. Oct 7, 2012 #5

    CAF123

    User Avatar
    Gold Member

    I don't see how it is possible to write r as a function of x and y explicitly;
    If r = x/cosθ and θ = arcsin(y/r) then r = x/cos(arcsin(y/r))
     
  7. Oct 7, 2012 #6
    Consider x^2 + y^2.
     
  8. Oct 7, 2012 #7

    CAF123

    User Avatar
    Gold Member

    Thanks. I got [itex] \frac{∂r}{∂x} = \cosθ [/itex] and [itex] \frac{∂r}{∂y} = \sin\theta [/itex]
    How do you obtain theta as a function of x and y?
     
  9. Oct 7, 2012 #8
    Given x = rcosθ and y = rsinθ, surely you can exclude r and thus get θ as a function of x and y.
     
  10. Oct 7, 2012 #9

    CAF123

    User Avatar
    Gold Member

    Yes, of course, sorry I have been looking at this problem for quite a while now and I think I am just overlooking simple things at times.
    So, [itex] \frac{∂θ}{∂x} = -\frac{\sin\theta}{r} [/itex] and [itex] \frac{∂θ}{∂y} = \frac{\cos\theta}{r} [/itex]
    Bringing this all together: [tex] \frac{∂f}{∂x} = \frac{∂g}{∂r}(\cos\theta) + \frac{∂g}{∂\theta}(-\sin\theta/r) [/tex]
    And; [tex] \frac{∂f}{∂y} = \frac{∂g}{∂r}(\sin\theta) + \frac{∂g}{∂\theta}((\cos\theta)/r) [/tex]
    Ok now?
    Just to check a couple of things: was the reason I was wrong first was because x is a function of theta but theta also depends on y? and similarly for r? Was my error in forgetting that theta also had a y dependence?
     
  11. Oct 7, 2012 #10
    I think you should pause here for a second. ## r ## and ## \theta ## are known as polar coordinates; you have been given the representation of Cartesian coordinates in polar coordinates, and you have found (although not written here) the representation of polar coordinates in Cartesian coordinates. This all is worth committing to memory, you are going to encounter polar coordinates many, many times and you should know how to transform to and fro.

    Looks good to me.

    I would say this was because ## \theta ## depends on x and y.
     
  12. Oct 7, 2012 #11

    CAF123

    User Avatar
    Gold Member

    Thanks for all your help and advice.
     
  13. Oct 7, 2012 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    [tex] r = \sqrt{x^2+y^2}, \; \tan(\theta) = y/x.[/tex]

    RGV
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook