giac c’est pas mal aussi
This commit is contained in:
1 parent
663014dd28
commit
e32232d381
7 files changed
+210
-122
No files matched your search
@@ -1,4 +1,4 @@
|
||||
%Met la dimention ici
|
||||
%Met la dimention ici
|
||||
n = 4;
|
||||
|
||||
x = sym("x", [1 n])
|
||||
@@ -43,7 +43,7 @@ Gamma
|
||||
gd = det(g)
|
||||
|
||||
|
||||
|
||||
3
|
||||
Ri = g;
|
||||
|
||||
for mu = 1:n
|
||||
|
||||
@@ -7591,8 +7591,8 @@ endobj
|
||||
<<
|
||||
/Title <FEFF005200E90073006F006C007500740069006F006E0020006400650020005300630068007700610072007A0073006300680069006C0064>
|
||||
/Creator (Typst 0.14.2)
|
||||
/ModDate (D:20260303145429Z)
|
||||
/CreationDate (D:20260303145429Z)
|
||||
/ModDate (D:20260317105857Z)
|
||||
/CreationDate (D:20260317105857Z)
|
||||
>>
|
||||
endobj
|
||||
|
||||
@@ -7603,7 +7603,7 @@ endobj
|
||||
/Subtype /XML
|
||||
>>
|
||||
stream
|
||||
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><dc:title><rdf:Alt><rdf:li xml:lang="x-default">Résolution de Schwarzschild</rdf:li></rdf:Alt></dc:title><xmp:CreatorTool>Typst 0.14.2</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-03-03T14:54:29+00:00</xmp:ModifyDate><xmp:CreateDate>2026-03-03T14:54:29+00:00</xmp:CreateDate><xmpTPg:NPages>17</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>OXf5+2ghPLD5FRIqhazhFA==</xmpMM:InstanceID><xmpMM:DocumentID>OXf5+2ghPLD5FRIqhazhFA==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
|
||||
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><dc:title><rdf:Alt><rdf:li xml:lang="x-default">Résolution de Schwarzschild</rdf:li></rdf:Alt></dc:title><xmp:CreatorTool>Typst 0.14.2</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-03-17T10:58:57+00:00</xmp:ModifyDate><xmp:CreateDate>2026-03-17T10:58:57+00:00</xmp:CreateDate><xmpTPg:NPages>17</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>QBOChv0zSZbfUWEq8SZemA==</xmpMM:InstanceID><xmpMM:DocumentID>QBOChv0zSZbfUWEq8SZemA==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
|
||||
endstream
|
||||
endobj
|
||||
|
||||
@@ -8173,7 +8173,7 @@ trailer
|
||||
/Size 541
|
||||
/Root 540 0 R
|
||||
/Info 538 0 R
|
||||
/ID [(OXf5+2ghPLD5FRIqhazhFA==) (OXf5+2ghPLD5FRIqhazhFA==)]
|
||||
/ID [(QBOChv0zSZbfUWEq8SZemA==) (QBOChv0zSZbfUWEq8SZemA==)]
|
||||
>>
|
||||
startxref
|
||||
274787
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
X := [t, r, theta, phi];
|
||||
|
||||
d := len(X);
|
||||
|
||||
g := [
|
||||
[1 - Rs/X[1],0, 0, 0],
|
||||
[0,-1/(1 - Rs/X[1]), 0, 0],
|
||||
[0,0,-X[1]^2, 0],
|
||||
[0, 0, 0, -X[1]^2 * sin(X[2])^2]
|
||||
];
|
||||
|
||||
ginv := g^-1;
|
||||
|
||||
G := makemat( matrix(d), 0, d)[0];
|
||||
|
||||
for ( j := 0; j < d; j++){
|
||||
for ( k := 0; k < d; k++){
|
||||
for( l:=0; l < d; l++){
|
||||
tmp := 0;
|
||||
for (m:=0; m < d; m++){
|
||||
tmp = tmp + 1/2 * ginv[j][m] * ( diff( g[k][m], X[l]) + diff( g[l][m], X[k]) - diff( g[k][l], X[m]))
|
||||
}
|
||||
G[j][k][l] := simplify(tmp)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
dg := det(g);
|
||||
|
||||
Ri := makemat(d);
|
||||
|
||||
for (j := 0; j < d; j++){
|
||||
for (k := 0; k < d; k++){
|
||||
tmp1 := 0;
|
||||
tmp2 := 0;
|
||||
tmp3 := 0;
|
||||
tmp4 := 0;
|
||||
for(a := 0; a < d; a++){
|
||||
tmp1 := tmp1 + diff( G[a][j][k], X[a]);
|
||||
tmp3 := tmp3 + G[a][j][k] * diff( ln( sqrt(-dg) ), X[a]);
|
||||
for ( b := 0; b < d; b++) {
|
||||
tmp2 := tmp2 + G[b][a][j] * G[a][b][k];
|
||||
}
|
||||
}
|
||||
Ri[j][k] := simplify( - diff( diff (ln(sqrt(-dg)), X[k]), X[j]) + tmp1 - tmp2 + tmp3)
|
||||
}
|
||||
};
|
||||
|
||||
R := 0;
|
||||
|
||||
for ( j := 0; j < d; j++){
|
||||
for( k := 0; k < d; k++){
|
||||
R = R + ginv[j][k] * Ri[j][k]
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
#include <giac/config.h>
|
||||
#include <giac/giac.h>
|
||||
using namespace std;
|
||||
using namespace giac;
|
||||
|
||||
int main()
|
||||
{
|
||||
context ct;
|
||||
gen e("x^2-1", &ct);
|
||||
e = eval(e, 1, &ct);
|
||||
cout << _factor(e, &ct) << endl;
|
||||
}
|
||||
Reference in new issue
Block a user