Differentiate: r=r cos(theta)i+r sin(theta)j

  • Thread starter jrjack
  • Start date
  • #1
111
0

Homework Statement


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


https://goo.gl/photos/ZF8Kzn1MEwN69Ev19


Homework 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)

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?

or

[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?
 

Attachments

  • Figure 2.JPG
    Figure 2.JPG
    27.1 KB · Views: 851
Last edited:

Answers and Replies

  • #2
35,287
7,140

Homework Statement


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


https://goo.gl/photos/ZETafWTb2GyjchTBA
The link to the image is broken here.
jrjack said:

Homework 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)

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?

or

[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]
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.
jrjack said:
Did I combine the chain and product rules correctly?
 
  • #3
111
0
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?
 
  • #4
35,287
7,140
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?
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)##
 
  • #5
111
0
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]

gives:
[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]
and...
[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]
 
  • #6
35,287
7,140
Almost.
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]

gives:
[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]
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.
jrjack said:
and...
[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
111
0
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]
 
  • #8
111
0
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]
to:
[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.
 
Top