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: Differentiate: r=r cos(theta)i+r sin(theta)j

  1. Feb 5, 2017 #1
    1. The problem statement, all variables and given/known data
    This is a problem from Dynamics but I'm mostly having trouble with the calculus.

    Derive an expression for the position, velocity, and acceleration of a machine in terms of: [itex] r, \dot {r}, θ, \dot{θ}, \ddot{r}, \ddot{θ}, [/itex].

    r = length of the arm
    θ = angle of the arm to the positive x-axis
    [itex] \dot {r}[/itex] = derivative of r with respect to time
    [itex] \dot {θ}[/itex] = derivative of θ with respect to time
    [itex] \ddot {r}[/itex]= second derivative of r with respect to time
    [itex] \ddot {θ}[/itex] = second derivative of θ with respect to time


    2. Relevant equations
    [tex] x=r\cos(\theta); y=r\sin(\theta) [/tex]
    [tex] \vec{r} = r\cos (\theta) \hat{i} + r\sin (\theta) \hat{j} [/tex]

    I am having trouble combining the product rule and chain rule with multiple variables...
    And from there I get lost trying to find the second derivative...
    (I last took Calculus 2 about 5 years ago, and have had very little practice since)

    3. The attempt at a solution
    [tex] \dot{r} = \vec{v} = - \dot{r} \sin (\theta) \dot{\theta} \hat{i} + \dot{r} \cos (\theta) \dot{\theta} \hat{j} [/tex]

    Did I apply the chain rule correctly?


    [tex] \dot{r} = \vec{v} = (-r \sin (\theta) \dot{\theta} + \dot{r} \cos (\theta) \dot{\theta}) \hat{i} + (r \cos (\theta) \dot{\theta} - \dot{r} \sin (\theta) \dot{\theta}) \hat{j} [/tex]

    Did I combine the chain and product rules correctly?

    Attached Files:

    Last edited: Feb 5, 2017
  2. jcsd
  3. Feb 5, 2017 #2


    Staff: Mentor

    The link to the image is broken here.
    Neither attempt is correct. One thing that might be helpful is to recognize that ##\vec{r}## and r are different things.

    In your equations ##x=r\cos(\theta)## and ##y=r\sin(\theta)##, r is a scalar, where ##|\vec{r}| = r##. IOW, r the scalar is the magnitude or length of ##\vec{r}## the vector. Now in these equations is r a function t or is it just a number?

    Let's look at each component of ##\vec{r}##, starting with ##r\cos(\theta)##. What do you get for the derivative wrt t of this expression? Hint: ##\dot{r}## and ##\dot{\theta}## should not appear in the same term.

    Please use parentheses: stuff like ##\cos \theta \dot{\theta}## is hard to read.
  4. Feb 5, 2017 #3
    I get that [itex] r [/itex] is the magnitude of [itex] \vec{r} [/itex]
    Both [itex] r [/itex] and [itex]\theta [/itex] are functions of time.

    Let me start with only the x-side of the equation:
    [tex] x = r \cos (\theta) [/tex]
    Applying the product rule to [itex] r [/itex] and [itex] \cos(\theta) [/itex] yields:
    [tex] \dot{x} = r (-\sin)(\theta) + \dot{r} \cos (\theta) [/tex]
    And adding the chain rule to [itex] \cos (\theta) [/itex] gives:
    [tex] \dot{x} = r (-\sin)(\theta) \dot{\theta} + \dot{r} \cos (\theta) \dot{\theta} [/tex]

    Is that part correct?
  5. Feb 5, 2017 #4


    Staff: Mentor

    No. As I said before, you shouldn't have both ##\dot r## and ##\dot{\theta}## in the same term.
    Let's get rid of the dot notation, as that might be causing confusion. Also, don't write things like ##r (-\sin)(\theta)##. It should be written as ##r(-\sin(\theta))## or ##-r\sin(\theta)##.

    ##x = r \cos(\theta)##
    ##\frac{dx}{dt} = \frac d {dt}\left(r\cos(\theta)) \right) = \frac {dr}{dt} \cos(\theta) + r \cdot \frac d {dt}\left(\cos(\theta) \right)##
    Here I have used the product rule, and am getting ready to use the chain rule on the cosine factor on the right. Can you finish this off?

    When you do, apply the same thinking to ##y = r\sin(\theta)##
  6. Feb 5, 2017 #5
    Ok, so I don't need to chain rule the 1st cosine factor, and adding the chain rule on the cosine factor on the left: [itex] \cos(\theta) \cdot \frac{d\theta}{dt}[/itex]

    [tex] \frac{dx}{dt} = \frac d {dt}\left(r\cos(\theta)) \right) = \frac {dr}{dt} \cos(\theta) + r \cdot \left(\cos(\theta) \cdot \frac{d\theta}{dt} \right) [/tex]
    [tex] y=r \sin(\theta)[/tex]
    [tex] \frac{dy}{dt} = \frac d {dt}\left(r\sin(\theta)) \right) = \frac {dr}{dt} \sin(\theta) + r \cdot \left( \cos(\theta) \cdot \frac{d\theta}{dt} \right) [/tex]
  7. Feb 5, 2017 #6


    Staff: Mentor

    In parentheses at the right, above, it should be ##-\sin(\theta) \cdot \frac {d\theta}{dt}##

    I suspect you were more focussed on the LaTeX than on the math.

    The one below looks fine.
  8. Feb 5, 2017 #7
    Ah yes, it's been 5 years since I typed anything in LaTeX either, but I wrote it correctly on my paper. Now I need a refresher on getting the second derivative of the equation.
    I have:
    [tex] \vec{r} = r \cos(\theta) \hat{i} + r \sin(\theta) \hat{j}[/tex]
    [tex] \vec{v} = \left( -r \dot{\theta} \sin(\theta) + \dot{r} \cos(\theta) \right)\hat{i} + \left(r \dot{\theta} \cos(\theta) + \dot{r} \sin(\theta) \right) \hat{j} [/tex]
    Differentiating term by term and taking the first part: [itex] -r \dot{\theta} \sin(\theta) [/itex]
    or [itex] -r \frac{d\theta}{dt} \sin(\theta)[/itex]
    I am not exactly sure how to apply the product rule to 3 terms???
    Do I take 1st times d/dt of the second, times d/dt of the third ? plus d/dt of the 1st times the second and third variables?
    [tex] \frac{d^2\vec{r}}{dt^2} = -\left(r \frac{d^2\theta}{dt^2} \cos(\theta) \frac{d\theta}{dt} + \frac{dr}{dt} \sin(\theta) \frac{d\theta}{dt} \right)[/tex]
  9. Feb 5, 2017 #8
    A few Multiple function product rule refresher videos later...
    I believe the 1st term should go from:
    [tex] -r \frac{d\theta}{dt} \sin(\theta) [/tex]
    [tex] - \left( \frac{dr}{dt} \frac{d\theta}{dt} \sin(\theta) + r \frac{d}{dt}(\frac{d\theta}{dt} \sin (\theta)) \right) [/tex]
    [tex] - \left( \frac{dr}{dt} \frac{d\theta}{dt} \sin(\theta) + r ((\frac{d\theta}{dt})^2 \cos(\theta) + \frac{d^2\theta}{dt^2} \sin(\theta) \right) [/tex]

    3 terms left to go...if my thought process is correct on this 1st term.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted