# [Maxima] kdelta evaluation in ctensor?

karl karl.landsteiner at linuxmail.org
Fri Mar 26 05:49:49 CDT 2010

```Hi,

I am trying to compute the magnetic field using itensor and ctensor.
The problem i have, is that the itensor "kdelta" doesn't get evaluated.
This is somehow strange since itensor knows that
kdelta([1,2,3],[3,2,1]) = -1 etc...

here is my code:

dim:3;
imetric(g);
defcon(g);
decsym(FV,2,0,[anti(all)],[]);
components( FV([i,j] , [] ), V([j],[],i)-V([i],[],j)  ) ;
components( FV([],[i,j]), contract(g([],[i,k]) * g([],[j,l]) * FV([k,l],[]) ) );
components( tmp([i],[]) , 1/2*levi_civita([i,j,k],[]) * FV([],[j,k]) );
Beqn : ic_convert( bfield([i],[]) =
ishow(canform(rename(expand(ev(tmp([i],[]),kdelta)))) ) );
ct_coords:[x,y,z];
lg:ug:ident(3);
V[1]:vx;
V[2]:vy;
V[3]:vz;
depends([vx,vy,vz],ct_coords);
ev(Beqn);
bfield[1];

and the output is

(kdelta[3,3,1,1,2,3]*'diff(vz,z,1)+kdelta[2,3,1,1,2,3]*'diff(vz,y,1)+ ...

but what I want is

'diff(vz,y,1) - 'diff(vy,z,1)

how can I make ctensor evaluate the kdelta symbol explicitely?

```