Ask Your Question
1

exp of quaternion

asked 3 years ago

Andr gravatar image

updated 3 years ago

I try

Q.<i,j,k> = QuaternionAlgebra(SR, -1, -1)
exp(x+i*x+j*x+k*x)

I get

TypeError: cannot coerce arguments: no canonical coercion from Quaternion Algebra (-1, -1) with base ring Symbolic Ring to Symbolic Ring

what means "-1,-1"? How to expand as demoivre() this?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 3 years ago

You can construct very general quaternion algebras in Sage, and the command QuaternionAlgebra(QQ, 2, 3) would construct an algebra with base field the rationals, with elements i and j such that i^2=2 and j^2=3. You've constructed a quaternion algebra over the "symbolic ring" SR with elements i and j such that i^2 = j^2 = -1.

Maybe because they are constructible in such generality, exponentials are not implemented for them. You can just use the formula on the wikipedia page (https://en.wikipedia.org/wiki/Quatern...). General quaternion algebras have their own wikipedia page, too: https://en.wikipedia.org/wiki/Quatern....

Preview: (hide)
link
0

answered 3 years ago

AlanTStafford gravatar image

I have used quaternions a few times perhaps here notebooks could provide some guidance.

http://alan.atstafford.co.uk/Penrose/...

http://alan.atstafford.co.uk/Twistor....

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 3 years ago

Seen: 378 times

Last updated: Apr 23 '22