Given two angles $\alpha$ and $\gamma$ such that $$ \cos(\alpha) = v\cdot v' $$ and $$\cos(\gamma) = f\cdot f',$$ where all the vectors above are unit vectors in $\mathbb R ^3$, what is the simplified form of $\cos(\alpha + \gamma)$ in terms of the vectors $v$, $v'$, $f$ and $f'$, when $f\perp v$ and $f'\perp v'$?
I have found one, but I'm not sure it's the simplest. Please reply if you find a simpler one. What I have is the following:
Using a popular trigonometry identity $$ \cos(\alpha+\gamma) = \cos(\alpha)\cos(\gamma) - \sin(\alpha)\sin(\gamma) $$ and by using the definition of the two angels, we find: $$ \cos(\alpha+\gamma) = (v\cdot v') (f\cdot f') - \text{sgn}(v, v')\text{sgn}(f, f')|v\times v'||f\times f'|. $$
Where the $\text{sgn}$ function is a function that returns 1 if the two vectors are canonically oriented, and -1 otherwise. This does not take into account the fact that $f\perp v$ and $f'\perp v'$, which is why I believe that maybe there's a simpler form, and I don't know how to check the orientation of the two vectors.
Edit: I realised that I had to introduce the $\text{sgn}$ functions in order to get the right answer.
Edit: I added that the vectors are unit. Thank you for reminding me Christian.
The answer can be found in this article http://scitation.aip.org/content/aip/journal/jcp/140/13/10.1063/1.4870088, in equation (B3).
If $u$,$u'$ are two vectors such that $f\times v = u$ and $f'\times v' = u'$, then $$ \cos(\alpha+\gamma) = \frac{f\cdot f'+v\cdot v'}{1+u\cdot u'}\,. $$ the article above quotes the following article for a derivation of this result http://onlinelibrary.wiley.com/doi/10.1002/bip.360340313/