1

I started with

$\cos(q) = \cos(a+ib+jc+kd)$

$\cos(q) = \cos(a)\cos(ib+jc+kd)-\sin(a)\sin(ib+jc+kd)$

$\cos(q) = \cos(a)(\cos(ib)(\cos(jc)\cos(kd)-\sin(jc)\sin(kd))-\sin(ib)(\sin(jc)\cos(kd)+\cos(jc)\sin(kd)))-\sin(a)(\sin(ib)(\cos(jc)\cos(kd)-\sin(jc)\sin(kd))+\cos(ib)(\sin(jc)\cos(kd)+\cos(jc)\sin(kd)))$

$\cos(q) = \cos(a)(\cosh(b)(j\cosh(c)k\cosh(d)-j\sinh(c)k\sinh(d))-i\sinh(b)(j\sinh(c)k\cosh(d)+j\cosh(c)k\sinh(d)))-\sin(a)(i\sinh(b)(j\cosh(c)k\cosh(d)-j\sinh(c)k\sinh(d))+i\cosh(b)(j\sinh(c)k\cosh(d)+j\cosh(c)k\sinh(d)))$

then with the help of $i^2=j^2=k^2=ijk=-1$

I got to

$\cos(q) = \cos(a)(\cosh(b)(i\cosh(c)\cosh(d)-i\sinh(c)\sinh(d))-i\sinh(b)(i\sinh(c)\cosh(d)+i\cosh(c)\sinh(d)))-\sin(a)(i\sinh(b)(i\cosh(c)\cosh(d)-i\sinh(c)\sinh(d))+i\cosh(b)(-i\sinh(c)\cosh(d)+i\cosh(c)\sinh(d)))$

and finally to

$\cos(q) = i\cos(a)(\cosh(b)\cosh(c-d)+\sinh(b)\sinh(c+d))+\sin(a)\cosh(c-d)(\sinh(b)-\cosh(b))$

I'd like to know if it is correct, if it is a legitimate function, since I could't find a quaternionic trigonometric function anywhere on the internet. I found it strange since j and k don't appear in the end product.

P.S. I also tried expanding it with Taylor series but it found it cumbersome.

Brian Tung
  • 35,584

2 Answers2

2

$ \def\bb{\mathbb} \def\H#1{{\bb H}^{#1}} \def\C#1{{\bb C}^{#1}} \def\R#1{{\bb R}^{#1}} \def\s{\sigma} \def\g{\gamma} \def\l{\lambda} \def\o{{\tt1}} \def\bR#1{\Big[#1\Big]} \def\lR#1{\Big(#1\Big)} \def\BR#1{\left[#1\right]} \def\LR#1{\left(#1\right)} \def\op#1{\operatorname{#1}} \def\sign#1{\op{sign}\LR{#1}} \def\Imag#1{\op{\sf Imag}\LR{#1}} \def\Real#1{\op{\sf Real}\LR{#1}} \def\frob#1{\left\| #1 \right\|} \def\a{\frob{a_v}} \def\b{\frob{b_v}} \def\q{\quad} \def\qq{\qquad} \def\qif{\q\iff\q} \def\qiq{\q\implies\q} \def\mq#1{\left[\begin{array}{r|rrr}#1\end{array}\right]} \def\BEvec#1{\begin{Bmatrix}#1\end{Bmatrix}} \def\fracBR#1#2{\BR{\frac{#1}{#2}}} \def\fracLR#1#2{\LR{\frac{#1}{#2}}} $You asked specifically about the cosine, but here is a derivation that works for most of the functions that you are likely to encounter, i.e. real analytic functions.

Consider the following scalar, vector, and quaternion quantities $$\eqalign{ a_0 \in \R{1} \qq a_v &= \BEvec{a_1\\ a_2\\ a_3}\in\R{3} \qq a &= \{a_0,\: a_v\}\in\H{} \\ }$$

The quaternion $\,a\,$ can also be represented as a $\sf Complex$ matrix $$\eqalign{ A &= \mq{ \;a_0+ia_1 & \;a_2+ia_3 \\ \hline \;-a_2+ia_3 & \;a_0-ia_1 } }$$

The eigenvalues of $A$ are easy to calculate $$\eqalign{ 0 &= \det(\l I-A) \qiq \{ {\sf quadratic\ equation\ in\ }\l \} \\ \l &= a_0 \pm i\sqrt{a_1^2+a_2^2+a_3^2} \\ \l &= a_0 + i\a,\qq \l^* = a_0 - i\a \\\\ }$$

Consider a second quaternion given by $$\eqalign{ b &= f(a) \;=\; \{b_0,\: b_v\} \\ }$$ This quaternion also has a matrix form $\lR{B=f(A)}$ with eigenvalues $$\eqalign{ \mu &= b_0 + i\b }$$ These eigenvalues are related to those of $A$ via the same function $$\eqalign{ \mu &= f(\l) \;=\; \Real{f(\l)} + i\Imag{f(\l)} \\ }$$ Equating the real and imaginary parts yields $$\eqalign{ b_0 &= \Real{f(\l)} \;\equiv\; \fracBR{f(\l)+f(\l)^*}2 \\ \pm\b &= \Imag{f(\l)} \;\equiv\; \fracBR{f(\l)-f(\l)^*}{2i} \\ }$$ We have everything but the direction of $b_v$.

One consequence of the Cayley-Hamilton theorem is that the function of an $n\times n$ matrix can be reduced to a polynomial of degree $(n-1),\,$ therefore $$ f(A) = \rho_0 I + \rho_1 A $$ Apply this polynomial to the quaternion form $$\eqalign{ b &= \;\rho_0 + \rho_1 a \;\;\equiv\; f(a) \\ &= \big\{ \rho_0+\rho_1 a_0,\;\: \rho_1 a_v \big\} \\ }$$ This tells us that $b_v$ is parallel to $a_v$

Putting all of the pieces together $$\eqalign{ f(a) &= \BEvec{ \Real{f(\l)},& \Imag{f(\l)}\BR{\dfrac{a_v}{\a}} } }$$ Let's apply this to your specific problem $$\eqalign{ \cos(\l) &= \cos(a_0+i\a) \\ &= \cos(a_0)\cosh(\a) \;-\; i\sin(a_0)\sinh(\a) \\ \cos(a) &= \BEvec{ \cos(a_0)\cosh(\a),& -\sin(a_0)\sinh(\a)\BR{\dfrac{a_v}{\a}} } }$$

greg
  • 40,033
  • Greg, is it correct that if $f:U\to\Bbb C$ is any holomorphic function on an open set $U$ of $\Bbb C$ it results that $$f(q)!=!!\left(!!\dfrac{f(q_0!+!i|v|)!+!f(q_0!−!i|v|)}2;,\dfrac{f(q_0!+!i|v|)!−!f(q_0!-!i|v|)}{2i}\cdot\dfrac v{|v|}!!\right)$$ where $q=(q_0,q_1,q_2,q_3)$ is a quaternion and $v=(q_1,q_2,q_3);?$ – Angelo Aug 11 '24 at 06:45
  • What about if $\frac{f(q_0+i|v|)+f(q_0−i|v|)}2;$ or $\frac{f(q_0+i|v|)−f(q_0−i|v|)}{2i};$ are not real numbers? Which quaternion would $f(q)$ be? In general what does iq represent if $i$ is the imaginary unit of complex numbers and $q$ is a quaternion? – Angelo Aug 11 '24 at 06:51
  • Greg, is it correct that if $f:U\to\Bbb C$ is a holomorphic function on an open set $U$ of $\Bbb C$ such that all coefficients of its power series $f(z)=\sum\limits_{n=0}^{\infty}c_nz^n$ are real numbers, it results that$$f(q)=\left(\mathrm{Re}[f(q_0+i|v|)],\mathrm{Im}[f(q_0+i|v|)]\frac v{|v|}\right)$$ where $q=(q_0,q_1,q_2,q_3)$ is a quaternion, $v=(q_1,q_2,q_3)$ and $\mathrm{Re}(z)$, $\mathrm{Im}(z)$ represent respectively the real part and the imaginary part of a complex number $z;?$ – Angelo Aug 11 '24 at 06:52
  • @Angelo The answer is "yes" to all of your questions. The expression in your last comment is a nice way to summarize the situation. – greg Aug 11 '24 at 13:16
  • Greg, could you tell me what it happens if $\frac{f(q_0+i|v|)+f(q_0-i|v|)}2;$ or $\frac{f(q_0+i|v|)-f(q_0-i|v|)}{2i};$ are not real numbers? In this case $f(q)=(z_0,z_1,z_2,z_3)$ where $z_i$ are complex numbers and consequently $f(q)$ would not be a quaternion. Please could you study this case? – Angelo Aug 11 '24 at 16:50
  • Greg, please could you read my last comment and give me an explanation about what it happens if $\frac{f(q_0+i|v|)+f(q_0-i|v|)}2;$ or/and $\frac{f(q_0+i|v|)-f(q_0-i|v|)}2;$ are complex numbers ? – Angelo Aug 12 '24 at 22:48
  • @Angelo Sorry, but I don't know how to work with anything other than a real analytic function of a quaternion. Worse, I don't know how one might sensibly define the product of a quaternion and a complex number. I'm sure mathematicians somewhere have written about these things, but I'm not even sure what the proper search terms would be. – greg Aug 12 '24 at 23:30
  • Greg, if you work with analytic functions which have all coefficients real in their power series, could you write it at the beginning of your answer instead of writing that the method works for any function ? – Angelo Aug 12 '24 at 23:36
  • @Angelo Done. Also Google turned up this paper which seems to be what you're asking about. – greg Aug 12 '24 at 23:50
1

Given $q=a+bi+cj+dk=(a,\vec{v})$, we define:

$$ \cos(q)=\left(\cos(a)\cosh(|\vec{v}|), -\sin(a)\sinh(|\vec{v}|)\frac{\vec{v}}{|\vec{v}|}\right) $$

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

Example: $$q=1+i+2j+k$$

$$\cos(q)=\left(\cos(1)\cosh(\sqrt6), \frac{-\sin(1)\sinh(\sqrt6)}{\sqrt6}\space(i+2j+k)\right)$$

Tommaso
  • 259