- #1
AlmostSwedish
- 7
- 0
Homework Statement
Find the partial derivative with regards to vector r1 for the expression:
theta = acos [tex]\frac{((r1-r2).(r3-r2))}{||r1-r2||*||r3-r2||}[/tex]
where "." is the dot product
r1,r2 and r3 are positions in 3D-space. The expression above comes from the definition of the dot product
Homework Equations
r0 = the vector (1,1,1)
r32 = r3-r2
r12 = r1-r2
The Attempt at a Solution
The expression can be rewritten by taking the cosinus of both sides.
Differentiating the left side gives -sin(theta) * [tex]\frac{d theta}{d r1}[/tex]
The right side can be written as f(r) = h(r)/k(r), and which gives the derivative of the form
(h' *k + h *k')/k^2 // Note that I use ' instead of d( )/d r1
h' becomes r0.r32
k' becomes ( || r32|| * (r0.r12) )/||r12||
This gives the right hand side of the equation according to
f ' (r) = [tex]\frac{(r0.r32)*||r12||*||r32||* - \frac{(r12.r32)*||r32||*(r0.r12)}{||r12||}}{(||r12||*||r32||)^2}[/tex]
Thus the original equation becomes
-sin(theta) * d theta/d r1 = f ' (r)
d theta/d r1 = f ' (r)/-sin(theta)
Or alternatively
[tex]\frac{d theta}{d r1}[/tex] = f ' (r)/sqrt(1-f(r)^2)
if we use the derivative of arcos directly. They give the same value.I've checked my expression for f ' (r) using numerical methods, and it is correct. However, the numerical methods give a different answer than the analytical expression for my final expression of [tex]\frac{d theta}{d r1}[/tex]
Can someone help me figure out what's wrong with my solution?
Thank you for your time!
Last edited: