Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

solve maxima?

The following in Jupyter (and sage cloud) produces the wrong output. I do have an (extremely similar) maxima batch file that works fine. I sort of presume that maxima "solve" is not really called. If needed I can provide all files and stuff; either link or inline. Or if the correct way to use maxima/solve isn't obvious I can shorten up the generation of the solve argument by direct assignment. The last commented line is to prove that simpler problems yield the correct same answers in sagemath and maxima; when sagemath feels like. jupyter:


%display latex
var('A B C D M r')
T =matrix([[A,B],[C,D]]);
m=1-2M/r
G =matrix([[-m,0],[0,1/m]])
k = T.transpose()
GT
eq1=k[0,0];
eq2=k[0,1];
eq3=k[1,0];
eq4=k[1,1];
eqd=A
D-BC-1
eqd
sol=solve([eq1+m==0,eq3-sqrt(2
M/r)==0,eq4-1==0,eqd==0],[A,B,C,D]);
sol

-comment---solve([eq1+m==0,eq3-sqrt(2*M/r)==0],[A,B])


Produces:
$\newcommand{\Bold}[1]{\mathbf{#1}}\left[-B C + A D - 1 = 0, A^{2} {\left(\frac{2 \cdot M}{r} - 1\right)} - \frac{C^{2}}{\frac{2 \cdot M}{r} - 1} - \frac{2 \, M}{r} + 1 = 0, A B {\left(\frac{2 \cdot M}{r} - 1\right)} - \frac{C D}{\frac{2 \cdot M}{r} - 1} - \sqrt{2} \sqrt{\frac{M}{r}} = 0, B^{2} {\left(\frac{2 \, M}{r} - 1\right)} - \frac{D^{2}}{\frac{2 \, M}{r} - 1} - 1 = 0\right]$

Whereas : a maxima script produces

${\left[ \left[ A=-1 , B={{\sqrt{2} \cdot r \cdot \sqrt{{{M}\over{r}}}}\over{r-2\cdot M}} , C=0 , D=-1 \right] , \left[ A=1 , B=-{{\sqrt{2} \cdot r \cdot \sqrt{{{M}\over{r}}}}\over{r-2\cdot M}}, C=0 , D=1 \right] \right] }$