exponential#
- Quaternion.exponential#
Exponential of Quaternion
The quaternion exponential works as in the ordinary case, defined with the absolute convergent power series:
\[e^{\mathbf{q}} = \sum_{k=0}^{\infty}\frac{\mathbf{q}^k}{k!}\]The exponential of a pure quaternion is, with the help of Euler formula and the series of \(\cos\theta\) and \(\sin\theta\), redefined as:
\[\begin{split}\begin{array}{rcl} e^{\mathbf{q}_v} &=& \sum_{k=0}^{\infty}\frac{\mathbf{q}_v^k}{k!} \\ e^{\mathbf{u}\theta} &=& \Big(1-\frac{\theta^2}{2!} + \frac{\theta^4}{4!}+\cdots\Big)+ \Big(\mathbf{u}\theta-\frac{\mathbf{u}\theta^3}{3!} + \frac{\mathbf{u}\theta^5}{5!}+\cdots\Big) \\ &=& \cos\theta + \mathbf{u}\sin\theta \\ &=& \begin{bmatrix}\cos\theta \\ \mathbf{u}\sin\theta \end{bmatrix} \end{array}\end{split}\]Letting \(\mathbf{q}_v = \mathbf{u}\theta\) with \(\theta=\|\mathbf{v}\|\) and \(\|\mathbf{u}\|=1\).
Since \(\|e^{\mathbf{q}_v}\|^2=\cos^2\theta+\sin^2\theta=1\), the exponential of a pure quaternion is always unitary. Therefore, if the quaternion is real, its exponential is the identity.
For general quaternions the exponential is defined using \(\mathbf{u}\theta=\mathbf{q}_v\) and the exponential of the pure quaternion:
\[\begin{split}\begin{array}{rcl} e^{\mathbf{q}} &=& e^{q_w+\mathbf{q}_v} = e^{q_w}e^{\mathbf{q}_v}\\ &=& e^{q_w} \begin{bmatrix} \cos\|\mathbf{q}_v\| \\ \frac{\mathbf{q}}{\|\mathbf{q}_v\|}\sin\|\mathbf{q}_v\| \end{bmatrix} \end{array}\end{split}\]- Returns:
exp – Exponential of quaternion.
- Return type:
numpy.ndarray
Examples
>>> q1 = Quaternion([0.0, -2.0, 3.0, -4.0]) >>> str(q1) '(0.0000 -0.3714i +0.5571j -0.7428k)' >>> q1.exponential [ 0.54030231 -0.31251448 0.46877172 -0.62502896] >>> q2 = Quaternion([1.0, -2.0, 3.0, -4.0]) >>> str(q2) '(0.1826 -0.3651i +0.5477j -0.7303k)' >>> q2.exponential [ 0.66541052 -0.37101103 0.55651655 -0.74202206]