{"id":834,"date":"2009-06-08T17:07:52","date_gmt":"2009-06-08T17:07:52","guid":{"rendered":"http:\/\/spinor.info\/weblog\/?p=834"},"modified":"2009-06-09T11:51:46","modified_gmt":"2009-06-09T11:51:46","slug":"maxima-examples","status":"publish","type":"post","link":"https:\/\/spinor.info\/weblog\/?p=834","title":{"rendered":"Maxima examples"},"content":{"rendered":"<p>Some moderately interesting Maxima examples.<\/p>\n<p>First, this is how we can prove that the covariant derivative of the metric vanishes (but only if the metric is symmetric!)<\/p>\n<pre style=\"padding-left: 30px;\">load(itensor);\r\nimetric(g);\r\nishow(covdiff(g([],[i,j]),k))$\r\n%,ichr2$\r\nishow(contract(canform(contract(canform(rename(expand(%)))))))$\r\nishow(covdiff(g([i,j],[]),k))$\r\n%,ichr2$\r\nishow(canform(contract(rename(expand(%)))))$\r\ndecsym(g,2,0,[sym(all)],[]);\r\ndecsym(g,0,2,[],[sym(all)]);\r\nishow(covdiff(g([],[i,j]),k))$\r\n%,ichr2$\r\nishow(contract(canform(contract(canform(rename(expand(%)))))))$\r\nishow(covdiff(g([i,j],[]),k))$\r\n%,ichr2$\r\nishow(canform(contract(rename(expand(%)))))$<\/pre>\n<p>Next, the equation of motion for a perfect fluid:<\/p>\n<pre style=\"padding-left: 30px;\">load(itensor);\r\nimetric(g);\r\ndecsym(g,2,0,[sym(all)],[]);\r\ndecsym(g,0,2,[],[sym(all)]);\r\ndefcon(v,v,u);\r\ncomponents(u([],[]),1);\r\ncomponents(T([],[i,j]),(rho([],[])+p([],[]))*v([],[i])*v([],[j])\r\n                        -p([],[])*g([],[i,j]));\r\nishow(covdiff(T([],[i,j]),i))$\r\nishow(canform(%))$\r\nishow(canform(rename(contract(expand(%)))))$\r\n%,ichr2$\r\ncanform(%)$\r\nishow(canform(rename(contract(expand(%)))))$<\/pre>\n<p>Finally, the equation of motion in the spherically symmetric, static case:<\/p>\n<pre style=\"padding-left: 30px;\">load(ctensor);\r\nload(itensor);\r\nK:J([i],[])=covdiff(T([i],[j]),j);\r\nE:ic_convert(K);\r\nct_coords:[t,r,u,v];\r\nlg:ident(4);\r\nlg[1,1]:B;\r\nlg[2,2]:-A;\r\nlg[3,3]:-r^2;\r\nlg[4,4]:-r^2*sin(u)^2;\r\ndepends([A,B,T,rho,p],[r]);\r\nderivabbrev:true;\r\ncmetric();\r\nchristof(mcs);\r\nJ:[0,0,0,0];\r\nev(E);\r\nT:ident(4);\r\nT[1,1]:rho;\r\nT[2,2]:T[3,3]:T[4,4]:p;\r\nJ,ev;<\/pre>\n<p>These examples are probably not profound enough to include with Maxima, but are useful to remember.<\/p>\n<fb:like href='https:\/\/spinor.info\/weblog\/?p=834' send='true' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida grande'><\/fb:like>","protected":false},"excerpt":{"rendered":"<p>Some moderately interesting Maxima examples. First, this is how we can prove that the covariant derivative of the metric vanishes (but only if the metric is symmetric!) load(itensor); imetric(g); ishow(covdiff(g([],[i,j]),k))$ %,ichr2$ ishow(contract(canform(contract(canform(rename(expand(%)))))))$ ishow(covdiff(g([i,j],[]),k))$ %,ichr2$ ishow(canform(contract(rename(expand(%)))))$ decsym(g,2,0,[sym(all)],[]); decsym(g,0,2,[],[sym(all)]); ishow(covdiff(g([],[i,j]),k))$ %,ichr2$ ishow(contract(canform(contract(canform(rename(expand(%)))))))$ ishow(covdiff(g([i,j],[]),k))$ %,ichr2$ ishow(canform(contract(rename(expand(%)))))$ Next, the equation of motion for a perfect fluid: load(itensor); imetric(g); decsym(g,2,0,[sym(all)],[]); <a href='https:\/\/spinor.info\/weblog\/?p=834' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,3],"tags":[],"class_list":["post-834","post","type-post","status-publish","format-standard","hentry","category-mathematics","category-physics","category-30-id","category-3-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=834"}],"version-history":[{"count":3,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/834\/revisions"}],"predecessor-version":[{"id":836,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/834\/revisions\/836"}],"wp:attachment":[{"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spinor.info\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}