Expression calculation

226 views
Skip to first unread message

郭弘

unread,
Nov 22, 2021, 12:30:16 AM11/22/21
to xAct Tensor Computer Algebra
Hello,

I am using xAct to calculate the spinning test particle around the Kerr black hole,  the problem I meet is that the command "Solve" does not work to calculate the expression:

In[83]:= normv = 
 v[a] v[-a] /. rot -> \[Chi] q^2 Mass^2 /. mass -> q Mass /. 
   u0^2 -> u3^2 + 1 // Simplify

Out[83]= (kinmass^2 (Mass^6 q^4 (-1 + 3 u3^2) \[Chi]^4 + 
   2 Mass^3 q^2 (1 + 3 u3^2) \[Chi]^2 r[]^3 - 
   r[]^6))/(-Mass^3 q^2 (1 + 3 u3^2) \[Chi]^2 + r[]^3)^2

In[84]:= 
kmasssquare = kinmass^2 /. First@Solve[normv == -1 , {kinmass}];

Out[84]= $Aborted

Here the command "Solve" runs but for a long time it does not stop and cannot give the output. I try the same code both in MacOS and Win 11, the mathematica version is 12.3.1 and the xAct version is 1.2.0. Both of them are invalid to give the output of the solution of the equation "normv==-1".  Here I upload the code, hope anyone can help me!

Thanks 
Hong
trouble.nb

郭弘

unread,
Nov 22, 2021, 8:19:45 AM11/22/21
to xAct Tensor Computer Algebra
I realize that this code can work in the mathematica of the version 11.3.0, but the version 12.3.1 does not work, is this any bug with the latest version of the mathematica between xAct?

best!
Hong

Thomas Bäckdahl

unread,
Nov 22, 2021, 8:48:48 AM11/22/21
to xa...@googlegroups.com
Hi!

This is a strange problem.
It seems to be a Mathematica problem when you use $Assumptions together with Solve and not an xAct problem
I was able to reproduce the problem with just these 3 lines of code in Mathematica 12.3
$Assumptions = r[] > 0;
normv = (kinmass^2*(Mass^6*q^4*(-1 + 3*u3^2)*\[Chi]^4 +
      2*Mass^3*q^2*(1 + 3*u3^2)*\[Chi]^2*r[]^3 -
      r[]^6))/(-(Mass^3*q^2*(1 + 3*u3^2)*\[Chi]^2) + r[]^3)^2

Solve[normv == -1 , {kinmass}]

If you use
$Assumptions = True;
instead, the answer is immediate.

One can even simplify your example to
$Assumptions = x > 0;
Solve[((-1 + 3 a^2 + 2 (1 + 3 a^2) x^3 - x^6) y^2)/(-1 - 3 a^2 + x^3)^2 == -1 , y]

I think you should report this to Wolfram. Perhaps José might have something more to say about this?

Regards
Thomas
--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xact/805b9ec4-f13a-4dc5-8ede-6a9e1cae8a85n%40googlegroups.com.

郭弘

unread,
Nov 22, 2021, 10:29:21 PM11/22/21
to xAct Tensor Computer Algebra
Thank you so much! I reproduced your results, it looks like the bug using Solve together with $Assumption in my code, it is quite werid that simple equation will work, like: 

$Assumption=x>0; 
Solve[x^2==1,x]

Maybe I need to write a email to Wolfram, thanks for your suggestion! At least, I can continue my work!

Best!
Hong
Reply all
Reply to author
Forward
0 new messages