Semyon,
Several comments:
1. I recommend using imetric(g) instead of imetric:g; the former also sets
up the contraction properties of the metric, whereas the latter only assigns
the metric tensor.
2. Before using coeff, you need to expand the expression in question. I
don't think coeff can deal with unexpanded expressions.
3. Before attempting to expand an expression containing symbols like ichr2,
you need to evaluate those symbols as they also contain implicit
dependencies on h. Afterwards, you need to evaluate g again.
4. Make sure you specify the components for both the covariant and
contravariant forms of the metric tensor to ensure that g is expanded
properly in all cases.
In view of these three points, try:
load(itensor);
components(g([i,j],[]),g0([i,j],[])+h*g1([i,j],[])+h^2*g2([i,j],[]));
components(g([],[i,j]),g0([],[i,j])+h*g1([],[i,j])+h^2*g2([],[i,j]));
imetric(g);
ishow(ichr2([i,j],[k]))$
ishow(coeff(expand(%),h,2))$
ishow(icurvature([i,j,k],[l]))$
%,ichr2$
%,g$
coeff(expand(%),h,2)$
nterms(%);
Your final expression is not very manageable of course, with 216 terms.
Still, perhaps this is what you were looking for. You might consider
attempting to set up symmetry properties for g0, g1, g2 using decsym, and
then simplifying with canform, but it seems it only eliminates a small
number of terms.
Viktor
-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Semyon Glazyrin
Sent: Monday, May 04, 2009 10:02 AM
To: maxima at math.utexas.edu
Subject: General Relativity calculations
Hello!
I'd like to do the following computations. There is a mertic, which
has power series of h - constant scalar:
g_{ik}=g0_{ik}+h*g1_{ik}+h^2*g2_{ik}
and I want to calculate some expression by this metric, for example
Riemann tensor and obtain expressions in front of h^n. But I fail in
doing this even for Christoffel symbol
Code:
load(itensor)$
components(g([i,j],[]),g0([i,j],[])+h*g1([i,j],[])+h^2*g2([i,j],[]))$
imetric:g$
ishow(ichr2([i,j],[k]));
ishow(coeff(%,h,2));
ishow(icurvature([i,j,k],[l]));
ishow(coeff(%,h,2));
answer for coeff in ichr2 is 0.
What is the problem? I should use another function instead coeff?
And why icurvature does not substitute Christoffel symbols?
Semyon.
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima