Differention of vectors in the scalar/dot product definition

AlmostSwedish
Messages
7
Reaction score
0

Homework Statement



Ok, so I need to differentiate the following

theta = arccos(((r1-r2).(r3-r2))/(||r1-r2||*||r3-r2||))

With regards to r1, r2 and r3
r1, r2 and r3 are three dimensional vectors. "." is the scalar/dot product and * is ordinary multiplication.

Homework Equations



Definition of scalar product: a.b = ||a||*||b||*cos(theta)
Where theta is the angle between the vectors

The Attempt at a Solution



So I figured the chain rule be a good first attemt. The formula looks like this:

theta = f(R) = g(h(R)/k(R))

where I used simply used R instead of r1,r2,r3.
The derivatives then look like

f ' = g'(R)*(h'*k - h*k')

I know that g' = -1/sqrt(1-(h(R)/k(R))2)
The problem is that I'm unsure of how do differentiate the expressions for h and k. The approach I used was as to look at them as function of ordinary variables.
Differentiate with regards to r1:

h' = r0.(r3-r2)
where r0 = (1,1,1) and is the differentiation of r1 with regard to itself (Is this correct?)

In the same way; k' = ||r3-r2||

The expressions for the derivatives with regard to r3 are the same, just replace r1 with r3 (and vice versa)

For the differentiation with regards to r2:

h' = - r0.(r3-r2) - r0.(r1-r2)

k' = - ||r3-r2|| - ||r1-r2||So naturally, my question is if this is correct (and I assume it is not, for I have never done anything like this before)? If not, where did I go wrong?

Thank you for your help.
 
Last edited:
Physics news on Phys.org
AlmostSwedish said:

Homework Statement



Ok, so I need to differentiate the following

theta = arccos(((r1-r2).(r3-r2))/(||r1-r2||*||r3-r2||))

With regards to r1, r2 and r3
r1, r2 and r3 are three dimensional vectors. "." is the scalar/dot product and * is ordinary multiplication.


Homework Equations



Definition of scalar product: a.b = ||a||*||b||*cos(theta)
Where theta is the angle between the vectors

The Attempt at a Solution



So I figured the chain rule be a good first attemt. The formula looks like this:

theta = f(R) = g(h(R)/k(R))

where I used simply used R instead of r1,r2,r3.
The derivatives then look like

f ' = g'(R)*(h'*k - h*k')

I know that g' = -1/sqrt(1-(h(R)/k(R))2)
The problem is that I'm unsure of how do differentiate the expressions for h and k. The approach I used was as to look at them as function of ordinary variables.
Differentiate with regards to r1:

h' = r0.(r3-r2)
where r0 = (1,1,1) and is the differentiation of r1 with regard to itself (Is this correct?)

In the same way; k' = ||r3-r2||

The expressions for the derivatives with regard to r3 are the same, just replace r1 with r3 (and vice versa)

For the differentiation with regards to r2:

h' = - r0.(r3-r2) - r0.(r1-r2)

k' = - ||r3-r2|| - ||r1-r2||


So naturally, my question is if this is correct (and I assume it is not, for I have never done anything like this before)? If not, where did I go wrong?

Thank you for your help.

What derivative are you trying to find? I'm going to guess that you want
\frac{d \theta}{dt}
 
No the derivatives I'm tying to find are:

\frac{d \theta}{dr1}

\frac{d \theta}{dr2}

\frac{d \theta}{dr3}

I'm sorry I didn't make myself clear in the original post. I used the " ' " just for convinience.
 
These are all partial deriviatives.

You could make life a little simpler by rewriting you equation as
cos(theta) = ((r1-r2).(r3-r2))/(||r1-r2||*||r3-r2||)

Now take the partial of both sides with respect to r_1. You'll need to know how to differentiate a dot product, and you should rewrite the norms as square roots of dot products; || r || = sqrt(r . r).

Then take the partial of both sides with respect to r_2.
take the partial of both sides with respect to r_3.
 
Mark44 said:
These are all partial deriviatives.

You could make life a little simpler by rewriting you equation as
cos(theta) = ((r1-r2).(r3-r2))/(||r1-r2||*||r3-r2||)

Now take the partial of both sides with respect to r_1. You'll need to know how to differentiate a dot product, and you should rewrite the norms as square roots of dot products; || r || = sqrt(r . r).

Then take the partial of both sides with respect to r_2.
take the partial of both sides with respect to r_3.

Thanks for your reply.

I don't really see why I would want move the cosine to the left side since I want an expression for the derivatives of just theta anyway.

The main problem that I've had is that I don't know how to differentiate a dot product, so if you could just show a quick example I would be most grateful.
 
diferentiating a dot product
\frac{d}{dt} r_1(t) \bullet r_2(t) =\frac{d r_1(t)}{dt} \bullet r_2(t)+r_1(t) \bullet \frac{dr_2(t)}{dt}
 
the fact that you have unit vectors in your dot product could also be useful...
 
AlmostSwedish said:
I don't really see why I would want move the cosine to the left side since I want an expression for the derivatives of just theta anyway.
\frac{\partial (cos(\theta))}{\partial r_1} = -sin(\theta)\frac{\partial \theta}{\partial r_1}

And after you have taken the same partial of the right side of your equation (which will be much easier to do with the arccos gone), then divide both sides of the equation by -sin(\theta).
 
Back
Top