# Test the Predefined Coordinate Systems in Both
in Frame and no Frame by Comparing to the Equations
that Define Them.

lmxchar:"["$rmxchar:"]"$

if get('ctensor,'version)=false then load(ctensorpatch);

get('ctensor,'version);

verbose:true;

ctrgsimp:true;

cframe_flag:true;

ratfac:true;

## Polar

### The first coframe is a coframe where the christoffel symbols are zero.
It is based on the jacobian of  transform equations to cartesian coordinates.

assume(r>=0,phi>-π,phi<=π);

ct_coordsys('polar);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Polar transform equations

list:[r*cos(phi),r*sin(phi),[r,phi]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(r>=0,phi>-π,phi<=π);

## Elliptic

assume(u>=0, v>=0, v<=2*π);

ct_coordsys('elliptic);

cmetric(true)$

lg:ev(lg,sinh(u)^2=-1+cosh(u)^2,sin(v)^2=1-cos(v)^2,expand);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Elliptic transform equations

list:[e*cosh(u)*cos(v),e*sinh(u)*sin(v),[u,v]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

lg:ev(lg,sinh(u)^2=-1+cosh(u)^2,sin(v)^2=1-cos(v)^2,expand);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=0, v>=0, v<=2*π);

## Confocalelliptic

assume(u>1,v>-1,v<1);

ct_coordsys('confocalelliptic);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Confocalelliptic transform equations

list:[e*u*v,e*sqrt((u^2-1)*(1-v^2)),[u,v]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>1,v>-1,v<1);

## Bipolar

assume(u>=-π,u<=π);

ct_coordsys('bipolar);

cmetric(true)$

lg:ev(lg,sinh(v)^2=cosh(v)^2-1,sin(u)^2=1-cos(u)^2,factor);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Bipolar transform equations

list:[e*sinh(v)/(cosh(v)-cos(u)),e*sin(u)/(cosh(v)-cos(u)),[u,v]];

ct_coordsys(list);

fri:ev(fri,sinh(v)^2=cosh(v)^2-1,sin(u)^2=1-cos(u)^2,factor);

cmetric(true)$

lg:ev(lg,sinh(v)^2=cosh(v)^2-1,sin(u)^2=1-cos(u)^2,factor);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=-π,u<=π);

## Parabolic

ct_coordsys('parabolic);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Parabolic transform equations

list:[(u^2-v^2)/2,u*v,[u,v]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

christof(mcs);

## Polarcylindrical

assume(r>=0,theta>=-π,theta<=π);

ct_coordsys('polarcylindrical);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Polarcylindrical transform equations

list:[r*cos(theta),r*sin(theta),phi,[r,theta,phi]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(r>=0,theta>=-π,theta<=π);

## Ellipticcylindrical

assume(u>=0, v>=0, v<=2*π);

ct_coordsys('ellipticcylindrical);

cmetric(true)$

lg:ev(lg,sinh(u)^2=cosh(u)^2-1,sin(v)^2=1-cos(v)^2,expand);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Ellipticcylindrical transform equations

list:[e*cosh(u)*cos(v),e*sinh(u)*sin(v),z,[u,v,z]];

ct_coordsys(list);

cmetric(true)$

lg:ev(lg,sinh(u)^2=cosh(u)^2-1,sin(v)^2=1-cos(v)^2,expand);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=0, v>=0, v<=2*π);

## Confocalellipsoidal is now correct.
Radicals did not simplify correctly from previous form of 
sqrt(expression) to product of sqrt(), when there are differences that get a minus to swap operand of sqrt function.
sqrt((a^2-b^2)*(c^2-d^2)) is %i*%i*sqrt(b^2-a^2)*sqrt(d^2-c^2)  
gives      -sqrt(b^2-a^2)*sqrt(d^2-c^2)
and not +sqrt(b^2-a^2)*sqrt(d^2-c^2).

assume(u<g^2, g^2<v,  v<f^2, f^2<w, w<e^2);

ct_coordsys('confocalellipsoidal);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Confocalellipsoidal transform equations

list:[sqrt(e^2-u)*sqrt(e^2-v)*sqrt(e^2-w)/sqrt(f^2-e^2)/sqrt(g^2-e^2),
    sqrt(f^2-u)*sqrt(f^2-v)*sqrt(f^2-w)/sqrt(e^2-f^2)/sqrt(g^2-f^2),
    sqrt(g^2-u)*sqrt(g^2-v)*sqrt(g^2-w)/sqrt(e^2-g^2)/sqrt(f^2-g^2),[u,v,w]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u<g^2, g^2<v,  v<f^2, f^2<w, w<e^2);

## Bipolarcylindrical corrected

assume(u>=-π,u<=π);

ct_coordsys('bipolarcylindrical);

cmetric(true)$

lg:ev(lg,sin(u)^2=1-cos(u)^2,sinh(v)^2=cosh(v)^2-1,factor);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Bipolarcylindrical transform equations.

list:[e*sinh(v)/(cosh(v)-cos(u)),e*sin(u)/(cosh(v)-cos(u)),z,[u,v,z]];
ct_coordsys(list);

fri:ev(fri,sinh(v)^2=cosh(v)^2-1,sin(u)^2=1-cos(u)^2,factor);

cmetric(true)$

lg:ev(lg,sinh(v)^2=cosh(v)^2-1,sin(u)^2=1-cos(u)^2,factor);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=-π,u<=π);

## Paraboloidal corrected coordinate order

assume(theta>=0,theta<=2*π);

ct_coordsys('paraboloidal);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Paraboloidal transform equations.
This is corrected paraboloidal coordinates.

list:[(u^2-v^2)/2,u*v*cos(phi),u*v*sin(phi),[phi,u,v]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(theta>=0,theta<=2*π);

## Conical corrected!

assume(w>=0,u>c^2,u<b^2,v<c^2);

ct_coordsys('conical);

cmetric(true)$

christof(false);

for i thru dim do for j thru dim do for k thru dim do mcs[i,j,k]:radcan(mcs[i,j,k])$
listarray(mcs);

lg:radcan(lg);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Conical transform equations

list:[u*v*w/e/f,-((sqrt((f^2-e^2)*(u^2-e^2)*(e^2-v^2)))*w)/(e*(f^2-e^2)),(sqrt(((f^2-e^2)*(u^2-f^2))*(v^2-f^2))*w)/(f*(f^2-e^2)),[u,v,w]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(w>=0,u>c^2,u<b^2,v<c^2);

## Toroidal

assume(phi>=0,phi<2*π,u>-π,u<=π,v>=0);

ct_coordsys('toroidal);

cmetric(true)$

lg:ev(lg,sinh(v)^2=cosh(v)^2-1,sin(u)^2=1-cos(u)^2);

lg[1,1]:subst([cosh(v)^2=1+sinh(v)^2],lg[1,1])$lg:factor(lg);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Toroidal transform equations

list:[(e*cos(phi)*sinh(v))/(cosh(v)-cos(u)),(e*sin(phi)*sinh(v))/(cosh(v)-cos(u)),(e*sin(u))/(cosh(v)-cos(u)),[phi,u,v]];

ct_coordsys(list);

cmetric(true)$

lg:ev(lg,cosh(v)^2=sinh(v)^2+1,sin(phi)^2=1-cos(phi)^2);

lg:trigsimp(%)$lg[1,1]:subst([cosh(v)^2=1+sinh(v)^2],num(lg[1,1]))/denom(lg[1,1])$lg:factor(lg);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(phi>=0,phi<2*π,u>-π,u<=π,v>=0);

## Oblatespheroidal      

assume(u>=0,v>-π/2,v<=π/2,phi>=0,phi<2*π);

ct_coordsys('oblatespheroidal);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Oblatespheroidal transform equations

list:[e*cosh(u)*cos(v)*cos(phi),e*cosh(u)*cos(v)*sin(phi),e*sinh(u)*sin(v),[u,v,phi]];

ct_coordsys(list);

cmetric(true)$

lg:ev(lg,cos(v)^2=1-sin(v)^2, cosh(u)^2=sinh(u)^2+1,expand);

lg[3,3]:expand(subst([sin(v)^2=1-cos(v)^2, sinh(u)^2=cosh(u)^2-1],lg[3,3]))$
lg:factor(lg);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=0,v>-π/2,v<=π/2,phi>=0,phi<2*π);

## Oblatespheroidalsqrt corrected

assume(u>=1,v>-1,v<1,phi>=0,phi<2*π);

ct_coordsys('oblatespheroidalsqrt);

cmetric(true)$

christof(mcs);

### Oblatespheroidalsqrt (type a) transform equations is oblatespheroidal with this substitution cosh(x1)=u, cos(x2)=v, sinh(x1)= sqrt(u^2-1), and sin(x2)=sqrt(1-v^2), u>1 and -1<v<+1

list:[e*u*v*cos(phi),e*u*v*sin(phi),e*sqrt(u^2-1)*sqrt(1-v^2),[u,v,phi]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=1,v>-1,v<1,phi>=0,phi<2*π);

### Oblatespheroidalsqrt (type b) transform equations is oblatespheroidal with this substitution
sinh(x1)=u, sin(x2)=v, cosh(x1)= sqrt(1+u^2), and cos(x2)=sqrt(1-v^2)

assume(u>=0,v>-1,v<1,phi>=0,phi<2*π);

list:[e*sqrt(1+u^2)*sqrt(1-v^2)*cos(phi),e*sqrt(1+u^2)*sqrt(1-v^2)*sin(phi),e*u*v,[u,v,phi]];
ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=0,v>-1,v<1,phi>=0,phi<2*π);

## Prolatespheroidal

assume(u>=0,v>=0,v<π,phi>=0,phi<2*π);

ct_coordsys('prolatespheroidal);

cmetric(true)$

christof(mcs);

### Prolatespheroidal transform equations

list:[e*sinh(u)*sin(v)*cos(phi),e*sinh(u)*sin(v)*sin(phi),e*cosh(u)*cos(v),[u,v,phi]];

ct_coordsys(list);

cmetric(true)$

lg:ev(lg,cos(v)^2=1-sin(v)^2, cosh(u)^2=sinh(u)^2+1,expand,factor);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=0,v>=0,v<π,phi>=0,phi<2*π);

## Prolatespheroidalsqrt

assume(u>=1,v>-1,v<1,phi>=0,phi<2*π);

ct_coordsys('prolatespheroidalsqrt);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=1,v>-1,v<1,phi>=0,phi<2*π);

### Prolatespheroidalsqrt (type a) transform equations is prolatespheroidal with this substitution cosh(x1)=u, cos(x2)=v, sinh(x1)= sqrt(u^2-1), and sin(x2)=sqrt(1-v^2), u>1 and -1<v<+1

assume(u>=1,v>-1,v<1,phi>=0,phi<2*π);

list:[e*sqrt(u^2-1)*sqrt(1-v^2)*cos(phi),e*sqrt(u^2-1)*sqrt(1-v^2)*sin(phi),e*u*v,[u,v,phi]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=1,v>-1,v<1,phi>=0,phi<2*π);

### Prolatespheroidalsqrt (type b) transform equations
sinh(x1)=u, sin(x2)=v, cosh(x1)= sqrt(1+u^2), and cos(x2)=sqrt(1-v^2)

assume(u>=0,v>-1,v<1,phi>=0,phi<2*π);

list:[e*u*v*cos(phi),e*u*v*sin(phi),e*sqrt(u^2+1)*sqrt(1-v^2),[u,v,phi]];
ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

forget(u>=0,v>-1,v<1,phi>=0,phi<2*π);

## Spherical 3d with time

ct_coordsys('spherical,minkowski);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Transform lg with change in coordinates ct, r, theta, ph to the new coordinates t, r, theta, phi

list:[c*t,r,theta,phi,[t,r,theta,phi]];

lg:ctransformlist(lg,list);

### Transform fri with change in coordinates ct, r, theta, ph to the new coordinates t, r, theta, phi

fri:ctransformfrilist(fri,list);ct_coords:list[dim+1];

cmetric(true);

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Spherical transform equations with time

list:[c*t,r*sin(theta)*cos(phi),r*sin(theta)*sin(phi),r*cos(theta),[t,r,theta,phi]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

## Spherical4d

ct_coordsys('spherical4d);

cmetric(true)$

christof(mcs);

### Spherical4d transform equations

list:[r*sin(theta)*sin(eta)*sin(phi),r*sin(theta)*sin(eta)*cos(phi),r*sin(theta)*cos(eta),r*cos(theta),[r,theta,eta,phi]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Spherical5d transform equations

list:[r*sin(theta)*sin(zeta)*sin(eta)*sin(phi),r*sin(theta)*sin(zeta)*sin(eta)*cos(phi),r*sin(theta)*sin(zeta)*cos(eta),r*sin(theta)*cos(zeta),r*cos(theta),[r,theta,zeta,eta,phi]];

ct_coordsys(list);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

### Spherical6d transform equations with time

list:[r*sin(theta)*sin(epsilon)*sin(zeta)*sin(eta)*sin(phi),  r*sin(theta)*sin(epsilon)*sin(zeta)*sin(eta)*cos(phi),
    r*sin(theta)*sin(epsilon)*sin(zeta)*cos(eta),  r*sin(theta)*sin(epsilon)*cos(zeta),  r*sin(theta)*cos(epsilon),  r*cos(theta),[r,theta,epsilon,zeta,eta,phi]];

ct_coordsys(list,minkowski);

cmetric(true)$

christof(mcs);

fri:sqrt(lfg . lg);

cmetric(true);

christof(mcs);

verbose:true;

ctrgsimp:true;

cframe_flag:false;

ratfac:false;

## Repeat with cframe_flag = false

## Polar

ct_coordsys('polar);

cmetric(false);

christof(mcs);

### Polar transform equations

list:[r*cos(phi),r*sin(phi),[r,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Elliptic

ct_coordsys('elliptic);

cmetric(false);

christof(mcs);

### Elliptic transform equations

list:[e*cosh(u)*cos(v),e*sinh(u)*sin(v),[u,v]];

ct_coordsys(list);

lg:ratsimp(subst([sin(v)^2=1-cos(v)^2,sinh(u)^2=cosh(u)^2-1],lg));

cmetric(false);

christof(mcs);

## Confocalelliptic

ct_coordsys('confocalelliptic);

cmetric(false);

christof(mcs);

### Confocalelliptic transform equations

list:[e*u*v,e*sqrt((u^2-1)*(1-v^2)),[u,v]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Bipolar

ct_coordsys('bipolar);

lg:ev(lg,sinh(v)^2=cosh(v)^2-1,sin(u)^2=1-cos(u)^2,factor);

cmetric(false);

christof(mcs);

### Bipolar transform equations

ratfac:false;

list:[e*sinh(v)/(cosh(v)-cos(u)),e*sin(u)/(cosh(v)-cos(u)),[u,v]];

ct_coordsys(list);

lg:factor(lg);

cmetric(false);

christof(mcs);

ratfac:true;

## Parabolic

ct_coordsys('parabolic);

cmetric(false);

christof(mcs);

### Parabolic transform equations

list:[(u^2-v^2)/2,u*v,[u,v]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Polarcylindrical

ct_coordsys('polarcylindrical);

### Polarcylindrical transform equations

list:[r*cos(theta),r*sin(theta),phi,[r,theta,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Ellipticcylindrical

ct_coordsys('ellipticcylindrical);

cmetric(false);

christof(mcs);

### Ellipticcylindrical transform equations

list:[e*cosh(u)*cos(v),e*sinh(u)*sin(v),z,[u,v,z]];

ct_coordsys(list);

lg:ev(lg,cos(v)^2=1-sin(v)^2,cosh(u)^2=1+sinh(u)^2,ratsimp);

cmetric(false);

christof(mcs);

## Confocalellipsoidal is now correct.
Radicals did not simplify correctly from previous form

ct_coordsys('confocalellipsoidal);

lg:factor(lg);

cmetric(false);

christof(mcs);

### Confocalellipsoidal transform equations

list:[sqrt(e^2-u)*sqrt(e^2-v)*sqrt(e^2-w)/sqrt(f^2-e^2)/sqrt(g^2-e^2),
    sqrt(f^2-u)*sqrt(f^2-v)*sqrt(f^2-w)/sqrt(e^2-f^2)/sqrt(g^2-f^2),
    sqrt(g^2-u)*sqrt(g^2-v)*sqrt(g^2-w)/sqrt(e^2-g^2)/sqrt(f^2-g^2),[u,v,w]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Bipolarcylindrical corrected

ct_coordsys('bipolarcylindrical);

cmetric(false);

christof(mcs);

### Bipolarcylindrical transform equations.

list:[e*sinh(v)/(cosh(v)-cos(u)),e*sin(u)/(cosh(v)-cos(u)),z,[u,v,z]];
ct_coordsys(list);

lg:factor(subst([sin(u)^4=(1-cos(u)^2)^2,sinh(v)^4=(cosh(v)^2-1)^2,sin(u)^2=(1-cos(u)^2)^1,sinh(v)^2=(cosh(v)^2-1)^1],lg));

cmetric(false);

christof(mcs);

## Paraboloidal corrected

ct_coordsys('paraboloidal);

cmetric(false);

christof(mcs);

### Paraboloidal transform equations.
This is corrected paraboloidal coordinates.

list:[(u^2-v^2)/2,u*v*cos(phi),u*v*sin(phi),[phi,u,v]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Conical corrected!

ct_coordsys('conical);

lg:radcan(lg);

cmetric(false);

christof(mcs);

### Conical transform equations

list:[u*v*w/e/f,-((sqrt((f^2-e^2)*(u^2-e^2)*(e^2-v^2)))*w)/(e*(f^2-e^2)),(sqrt(((f^2-e^2)*(u^2-f^2))*(v^2-f^2))*w)/(f*(f^2-e^2)),[u,v,w]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Toroidal

ct_coordsys('toroidal);

cmetric(false);

christof(mcs);

### Toroidal transform equations

ratfac:false;

list:[(e*cos(phi)*sinh(v))/(cosh(v)-cos(u)),(e*sin(phi)*sinh(v))/(cosh(v)-cos(u)),(e*sin(u))/(cosh(v)-cos(u)),[phi,u,v]];

ct_coordsys(list);

lg:factorsum(lg);

cmetric(false);

christof(mcs);

## Oblatespheroidal      

ratfac:true;

ct_coordsys('oblatespheroidal);

cmetric(false);

christof(mcs);

### Oblatespheroidal transform equations

list:[e*cosh(u)*cos(v)*cos(phi),e*cosh(u)*cos(v)*sin(phi),e*sinh(u)*sin(v),[u,v,phi]];

ct_coordsys(list);

lg:expand(subst([cos(v)^2=1-sin(v)^2, cosh(u)^2=sinh(u)^2+1],lg))$
lg[3,3]:factor(subst([sin(v)^2=1-cos(v)^2, sinh(u)^2=cosh(u)^2-1],lg[3,3]))$
lg;

cmetric(false);

christof(mcs);

## Oblatespheroidalsqrt corrected

ct_coordsys('oblatespheroidalsqrt);

cmetric(false);

christof(mcs);

### Oblatespheroidalsqrt (type a) transform equations is oblatespheroidal with this substitution cosh(x1)=u, cos(x2)=v, sinh(x1)= sqrt(u^2-1), and sin(x2)=sqrt(1-v^2), u>1 and -1<v<+1

list:[e*u*v*cos(phi),e*u*v*sin(phi),e*sqrt(u^2-1)*sqrt(1-v^2),[u,v,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

### Oblatespheroidalsqrt (type b) transform equations is oblatespheroidal with this substitution
sinh(x1)=u, sin(x2)=v, cosh(x1)= sqrt(1+u^2), and cos(x2)=sqrt(1-v^2)

list:[e*sqrt(1+u^2)*sqrt(1-v^2)*cos(phi),e*sqrt(1+u^2)*sqrt(1-v^2)*sin(phi),e*u*v,[u,v,phi]];
ct_coordsys(list);

cmetric(false);

christof(mcs);

## Prolatespheroidal

ct_coordsys('prolatespheroidal);

cmetric(false);

christof(mcs);

### Prolatespheroidal transform equations

list:[e*sinh(u)*sin(v)*cos(phi),e*sinh(u)*sin(v)*sin(phi),e*cosh(u)*cos(v),[u,v,phi]];

ct_coordsys(list);

lg:expand(subst([cos(v)^2=1-sin(v)^2, cosh(u)^2=sinh(u)^2+1],lg))$
lg:factorout(lg,e);

cmetric(false);

christof(mcs);

## Prolatespheroidalsqrt

ct_coordsys('prolatespheroidalsqrt);

cmetric(false);

christof(mcs);

### Prolatespheroidalsqrt (type a) transform equations is prolatespheroidal with this substitution cosh(x1)=u, cos(x2)=v, sinh(x1)= sqrt(u^2-1), and sin(x2)=sqrt(1-v^2), u>1 and -1<v<+1

list:[e*sqrt(u^2-1)*sqrt(1-v^2)*cos(phi),e*sqrt(u^2-1)*sqrt(1-v^2)*sin(phi),e*u*v,[u,v,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

### Prolatespheroidalsqrt (type b) transform equations
sinh(x1)=u, sin(x2)=v, cosh(x1)= sqrt(1+u^2), and cos(x2)=sqrt(1-v^2)

list:[e*u*v*cos(phi),e*u*v*sin(phi),e*sqrt(u^2+1)*sqrt(1-v^2),[u,v,phi]];
ct_coordsys(list);

cmetric(false);

christof(mcs);

## Spherical 3d

ct_coordsys('spherical);

cmetric(false);

christof(mcs);

### Spherical transform equations

list:[r*sin(theta)*cos(phi),r*sin(theta)*sin(phi),r*cos(theta),[r,theta,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

## Spherical4d

ct_coordsys('spherical4d);

cmetric(false);

christof(mcs);

### Spherical4d transform equations

list:[r*sin(theta)*sin(eta)*sin(phi),r*sin(theta)*sin(eta)*cos(phi),r*sin(theta)*cos(eta),r*cos(theta),[r,theta,eta,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

### Spherical5d transform equations

list:[r*sin(theta)*sin(zeta)*sin(eta)*sin(phi),r*sin(theta)*sin(zeta)*sin(eta)*cos(phi),r*sin(theta)*sin(zeta)*cos(eta),r*sin(theta)*cos(zeta),r*cos(theta),[r,theta,zeta,eta,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);

### Spherical6d transform equations

list:[r*sin(theta)*sin(epsilon)*sin(zeta)*sin(eta)*sin(phi),  r*sin(theta)*sin(epsilon)*sin(zeta)*sin(eta)*cos(phi),
    r*sin(theta)*sin(epsilon)*sin(zeta)*cos(eta),  r*sin(theta)*sin(epsilon)*cos(zeta),  r*sin(theta)*cos(epsilon),  r*cos(theta),[r,theta,epsilon,zeta,eta,phi]];

ct_coordsys(list);

cmetric(false);

christof(mcs);