# Essays/Christoffel/Christoffel01

### 1 Reference

'Tensor Analysis' by I. S. Sokolnikoff (Second Edition, 1964).

### 2 Software

```NB. ... execute (ijx) ...

9!:14 ''
j601/2006-11-17/17:05
```

### 3 Continuous Functions

There is a footnote on page 1 of the book 'Riemannian Geometry' by Luther Pfahler Eisenhart.

'When we consider any function, it is understood that it is real and continuous, as well as its derivatives of
such order as appear in the discussion, in the domain of the variables considered, unless stated otherwise.'

### 4 Verbs

```NB. ... script (ijs) ...

NB. ... identify coordinates ...
y1=:0{]
y2=:1{]
y3=:2{]
x1=:0{]
x2=:1{]
x3=:2{]

NB. ... open boxed elements ...
b0=:>@(0{])
b1=:>@(1{])
b2=:>@(2{])
b3=:>@(3{])

NB. ... tolerant 'set zero' (see 'Essays/Tolerant Comparison') ...
tsz=:\$@]\$[0:`(I.@([>!.0|@]))`]},@]
ts0=:(2^_44)&tsz
tz =:ts0@:

NB. ... tolerant 'equal'    (see 'Essays/Tolerant Comparison') ...
teq=:*./@,@((b0|@:-b1)<:!.0[*b0>.&:|b1)

NB. ... verbs useful for tolerant comparison ...
nzmin  =:<./@:|@((0<!.0|)#])@,
nzmax  =:>./@:|@((0<!.0|)#])@,
nzcount=:+/@(0<!.0|)@,

NB. ... trig verbs ...
sin   =:1&o.
cos   =:2&o.
arctan=:_3&o.

NB. ... axes sum ...
axs=:ts0@((b0|:b1)+/@(*"1)"1 _ b2|:b3)
```

### 5 Transformation of Coordinates (ISS Section 19)

##### 5.2 Example

I.S.S. Figure 13 on page 114 shows the transformation from Cartesian coordinates (y) to Spherical coordinates (x)
in Euclidean space.

 Figure 1: Spherical coordinates

```NB. ... script (ijs) ...

NB. ... equations to transform from Cartesian coordinates to Spherical coordinates ...
cx1=:%:@(*:@y1+*:@y2+*:@y3)"1
cx2=:arctan@(%:@(*:@y1+*:@y2)%y3)"1
cx3=:arctan@(y2%y1)"1
cxx=:(cx1,cx2,cx3)"1             NB. convert y coordinates to x coordinates

NB. ... equations to transform from Spherical coordinates to Cartesian coordinates ...
cy1=:(x1*sin@x2*cos@x3)"1
cy2=:(x1*sin@x2*sin@x3)"1
cy3=:(x1*cos@x2)"1
cyy=:(cy1,cy2,cy3)"1             NB. convert x coordinates to y coordinates

NB. ... from 'numeric' ...
steps=:{.+(1&{-{.)*(i.@>:%])@{:

NB. ... verbs to generate coordinates ...
s1=:steps@(0.5,10,19"_)
s2=:steps@((0.5p1%10),(0.5p1-0.5p1%10),19"_)
s3=:steps@((0.5p1%10),(0.5p1-0.5p1%10),19"_)

NB. ... generate coordinates ...
xpgen=:>@,@:(<"1)@(s1,"0 1/s2,"0/s3)
ypgen=:cyy@xpgen
```

### 6 First Derivatives of Transformation Equations

##### 6.2 Example

```NB. ... script (ijs) ...

dxdy0=:(sin@x2*cos@x3),(sin@x2*sin@x3),cos@x2
dxdy1=:((cos@x2*cos@x3)%x1),((cos@x2*sin@x3)%x1),-@(sin@x2%x1)
dxdy2=:-@(sin@x3%x1*sin@x2),(cos@x3%x1*sin@x2),0:
dxdy =:(3 3\$dxdy0,dxdy1,dxdy2)"1

dydx0=:(sin@x2*cos@x3),(x1*cos@x2*cos@x3),-@(x1*sin@x2*sin@x3)
dydx1=:(sin@x2*sin@x3),(x1*cos@x2*sin@x3),x1*sin@x2*cos@x3
dydx2=:cos@x2,-@(x1*sin@x2),0:
dydx =:(3 3\$dydx0,dydx1,dydx2)"1
```

### 7 Second Derivatives of Transformation Equations

##### 7.2 Example

```NB. ... script (ijs) ...

d2xdydx00=:0,(cos@x2*cos@x3),-@(sin@x2*sin@x3)
d2xdydx01=:0,(cos@x2*sin@x3),sin@x2*cos@x3
d2xdydx02=:0,-@(sin@x2),0:
d2xdydx10=:(-@((cos@x2*cos@x3)%*:@x1)),(-@((sin@x2*cos@x3)%x1)),-@((cos@x2*sin@x3)%x1)
d2xdydx11=:(-@((cos@x2*sin@x3)%*:@x1)),(-@((sin@x2*sin@x3)%x1)),(cos@x2*cos@x3)%x1
d2xdydx12=:(sin@x2%*:@x1),-@(cos@x2%x1),0:
d2xdydx20=:(sin@x3%(*:@x1)*sin@x2),((sin@x3*cos@x2)%x1**:@(sin@x2)),-@(cos@x3%x1*sin@x2)
d2xdydx21=:(-@(cos@x3%(*:@x1)*sin@x2)),(-@((cos@x3*cos@x2)%x1**:@(sin@x2))),(-@(sin@x3%x1*sin@x2))
d2xdydx22=:0,0,0:
d2xdydx0 =:d2xdydx00,d2xdydx01,d2xdydx02
d2xdydx1 =:d2xdydx10,d2xdydx11,d2xdydx12
d2xdydx2 =:d2xdydx20,d2xdydx21,d2xdydx22
d2xdydx  =:(3 3 3\$d2xdydx0,d2xdydx1,d2xdydx2)"1
```

```NB. ... script (ijs) ...

d2ydxdx00=:0,(cos@x2*cos@x3),-@(sin@x2*sin@x3)
d2ydxdx01=:(cos@x2*cos@x3),-@(x1*sin@x2*cos@x3),-@(x1*cos@x2*sin@x3)
d2ydxdx02=:(-@(sin@x2*sin@x3)),(-@(x1*cos@x2*sin@x3)),-@(x1*sin@x2*cos@x3)
d2ydxdx10=:0,(cos@x2*sin@x3),sin@x2*cos@x3
d2ydxdx11=:(cos@x2*sin@x3),-@(x1*sin@x2*sin@x3),x1*cos@x2*cos@x3
d2ydxdx12=:(sin@x2*cos@x3),(x1*cos@x2*cos@x3),-@(x1*sin@x2*sin@x3)
d2ydxdx20=:0,-@(sin@x2),0:
d2ydxdx21=:-@(sin@x2),-@(x1*cos@x2),0:
d2ydxdx22=:0,0,0:
d2ydxdx0 =:d2ydxdx00,d2ydxdx01,d2ydxdx02
d2ydxdx1 =:d2ydxdx10,d2ydxdx11,d2ydxdx12
d2ydxdx2 =:d2ydxdx20,d2ydxdx21,d2ydxdx22
d2ydxdx  =:(3 3 3\$d2ydxdx0,d2ydxdx1,d2ydxdx2)"1
```