Ask Your Question

Performant Data's profile - activity

2023-02-18 20:56:37 +0200 received badge  Notable Question (source)
2022-04-15 06:19:15 +0200 received badge  Popular Question (source)
2021-06-10 11:51:31 +0200 received badge  Nice Question (source)
2021-06-10 09:38:07 +0200 marked best answer solving for the center of the real quaternions

I'm trying out Sage on quaternions, on the problem of finding the center of the real Hamiltonian quaternions $\mathbb{H}$. So what I tried was:

Q.<i,j,k> = QuaternionAlgebra(SR, -1, -1)

a1, b1, c1, d1 = SR.var('a1, b1, c1, d1', domain = RR)
a2, b2, c2, d2 = SR.var('a2, b2, c2, d2', domain = RR)

q1 = a1 + b1*i + c1*j + d1*k
q2 = a2 + b2*i + c2*j + d2*k

solve(q1*q2 - q2*q1, a1, b1, c1, d1)

which rewarded me with:

TypeError                                 Traceback (most recent call last)
<ipython-input-6-8a6c0ff8f7d0> in <module>()
      9 q2 = a2 + b2*i + c2*j + d2*k
     10 
---> 11 solve(q1*q2 - q2*q1, [a1, b1, c1, d1])

/home/sage/sage/local/lib/python3.7/site-packages/sage/symbolic/relation.py in solve(f, *args, **kwds)
   1045 
   1046     if not isinstance(f, (list, tuple)):
-> 1047         raise TypeError("The first argument must be a symbolic expression or a list of symbolic expressions.")
   1048 
   1049     # f is a list of such expressions or equations

TypeError: The first argument must be a symbolic expression or a list of symbolic expressions.

Well, OK, that's not a symbolic expression:

sage: type(q1*q2 - q2*q1)
<class 'sage.algebras.quatalg.quaternion_algebra_element.QuaternionAlgebraElement_generic'>

At least this looks right:

sage: q1*q2 - q2*q1
((c1 - d1)*(c2 + d2) - (c1 + d1)*(c2 - d2))*i + (2*b2*d1 - 2*b1*d2)*j + (-(a2 + b2)*(c1 + d1) + (a2 - b2)*(c1 + d1) + (a1 + b1)*(c2 + d2) - (a1 - b1)*(c2 + d2) + 2*b2*d1 - 2*b1*d2)*k

I can figure out the answer from the last line, but was hoping for something like $b_1 = c_1 = d_1 = 0$. Not sure how this works.

update: Updated to Sage 9.1.

2021-06-10 09:38:07 +0200 received badge  Scholar (source)
2021-06-10 08:52:20 +0200 commented answer solving for the center of the real quaternions

OK. I still feel like I'm missing how to express that I'm not interested in an answer based on specific a2, b2, c2, d2,

2021-06-10 08:42:01 +0200 commented question solving for the center of the real quaternions

@FrédéricC: Sage 8.6. Looks like I should upgrade by running the Docker image. OK, yeah, I get that response now with t

2021-06-10 08:41:10 +0200 received badge  Editor (source)
2021-06-10 08:41:10 +0200 edited question solving for the center of the real quaternions

solving for the center of the real quaternions I'm trying out Sage on quaternions, on the problem of finding the center

2021-06-10 08:29:07 +0200 commented question solving for the center of the real quaternions

@FrédéricC: Sage 8.6. Looks like I should upgrade by running the Docker image. OK, yeah, I get that response now with t

2021-06-10 07:57:02 +0200 commented question solving for the center of the real quaternions

@FrédéricC: Sage 8.6. Looks like I should upgrade by running the Docker image.

2021-06-10 05:24:33 +0200 commented question solving for the center of the real quaternions

@FrédéricC: Sage 8.6. Looks like I should upgrade to Debian bullseye at least.

2021-06-10 05:18:03 +0200 commented question solving for the center of the real quaternions

@FrédéricC: Sage 8.6

2021-06-09 06:29:44 +0200 asked a question solving for the center of the real quaternions

solving for the center of the real quaternions I'm trying out Sage on quaternions, on the problem of finding the center

2021-03-24 18:03:09 +0200 commented answer how to define symbolic function on functions?

I looked over your symbolic computation link but don't see anything there relevant to my question.

2021-03-24 03:08:54 +0200 commented answer how to define symbolic function on functions?

Thanks, I'll have a look. But what I really want to know is why I got the above results.

2021-03-24 03:08:20 +0200 received badge  Supporter (source)
2021-03-24 01:27:48 +0200 received badge  Student (source)
2021-03-24 01:27:22 +0200 asked a question how to define symbolic function on functions?

how to define symbolic function on functions? I recently started using Sage in earnest, and was trying to define a funct