out bb11;
off nat;

%for all xxx let cos(xxx)**2 + sin(xxx)**2 = 1;
%for all xxx let sinh(xxx) = sqrt(cosh(xxx)**2 - 1);
%for all xxx let sinh(xxx)**2 = cosh(xxx)**2 - 1;
for all xxx let sinh(xxx)**2 + 1 = cosh(xxx)**2;
for all xxx let asinh(sinh(xxx)) = xxx;
for all xxx let sinh(asinh(xxx)) = xxx;

%------- a curve in normal parametrization ---------------

xs:=  asinh(s + cx);
us:=  cosh(asinh(s + cx))  + cu;



%------- tangent vector to the curve ---------------

ttx:=df(xs,s)/sqrt(df(xs,s)**2 + df(us,s)**2);
ttu:=df(us,s)/sqrt(df(xs,s)**2 + df(us,s)**2);

dtt:=sqrt( ttx**2 + ttu**2  );

%------- tangent curvature of the curve ---------------

kaptt:=sqrt( df(ttx,s)**2 + df(ttu,s)**2  );

kaptt:=sqrt( (( ttx*df(ttu,s) - df(ttx,s)*ttu  )/(dtt**3))**2 );


%------- normal vector to the curve ---------------
nnx:=df(ttx,s)/sqrt(df(ttx,s)**2 + df(ttu,s)**2);
nnu:=df(ttu,s)/sqrt(df(ttx,s)**2 + df(ttu,s)**2);


%***************************************************************
%                 x,u coordinates
%***************************************************************

s + cx:=sinh(x);

xs;
us;

ttx;
ttu;
kaptt;
nnx;
nnu;
kaptt;

%genx:=ttx*df(-kaptt,x)*nnx + (-(kaptt**2)/2)*ttx;
%genu:=ttx*df(-kaptt,x)*nnu + (-(kaptt**2)/2)*ttu;

genx:=a*sinh(x)/cosh(x);
genu:=1 + a*sinh(x)**2/cosh(x);

c1:=(1/cosh(x) + a)*sinh(x);
c2:=1/cosh(x);

genx:=c1*ttx + c2*nnx;
genu:=c1*ttu + c2*nnu;



eeex:=1;
eeeu:=ttu/ttx;


procedure agen(fff); rrr:=genx*df(fff,x) + genu*df(fff,u);
procedure att(fff); rrr:=ttx*df(fff,x) + ttu*df(fff,u);
procedure ann(fff); rrr:=nnx*df(fff,x) + nnu*df(fff,u);
procedure aeee(fff); rrr:=eeex*df(fff,x) + eeeu*df(fff,u);

%----------commutators----------------
agen(eeex) - aeee(genx);
agen(eeeu) - aeee(genu);

agen(ttx) - att(genx);
agen(ttu) - att(genu);

ann(ttx) - att(nnx);
ann(ttu) - att(nnu);
%---------- pde ----------------

agen(kaptt);
att(kaptt);

c1*att(kaptt);
c2*kaptt**2;
att(att(c2));


agen(kaptt) - c1*att(kaptt) - c2*kaptt**2 - att(att(c2));



shut bb11;
bye;
end;