quaternion-base logarithm of a quaternion: formula

49 Views Asked by At

Suppose you have two quaternion:

$$q_1=(a_1, \vec{v_1})=a_1+b_1i+c_1j+d_1k$$ $$q_2=(a_2, \vec{v_2})=a_2+b_2i+c_2j+d_2k$$

I want to compute the logarithm base $q_1$ of $q_2$: $\log_{q_1}q_2$.

In analogy with complex numbers, the following should be true:

$$\log_{q_1}q_2 = \frac{\log q_2}{\log q_1}=\log q_2\frac{\overline{\log q_1}}{\big|\log q_1\big|^2}$$

Expanding the logarithm of the quaternion, the final formula should be:

$$\log_{q_1}q_2 = \frac{\log|q_2|+\frac{\vec{v_2}}{|\vec{v_2}|} arcos(\frac{a_2}{|q_2|})}{\log|q_1|+\frac{\vec{v_1}}{|\vec{v_1}|} arcos(\frac{a_1}{|q_1|})}=\left(\log|q_2|+\frac{\vec{v_2}}{|\vec{v_2}|} arcos(\frac{a_2}{|q_2|})\right) \left(\frac{\log|q_1|-\frac{\vec{v_1}}{|\vec{v_1}|} arcos(\frac{a_1}{|q_1|})}{\bigg|\log|q_1|+\frac{\vec{v_1}}{|\vec{v_1}|} arcos(\frac{a_1}{|q_1|})\bigg|^2}\right)$$

where $|q|=\sqrt{a^2+b^2+c^2+d^2}$, and $|\vec{v}|=\sqrt{b^2+c^2+d^2}$.

Could someone give me confirmation if this is correct?