2D Coordinate system changing Copyright © 2004-2008 DigiArea Group . All rights reserved. Description: This worksheet illustrates how to use atlas package to solve problems in elementary differential geometry. As an example we discuss coordinate system changing from Cartesian to bipolar:
We construct Cartesian domain (C) with standard flat metric and bipolar domain (B). We map C into B and then calculate metric tensor field and connection induced on B by the mapping. We also obtain Laplace operator , Killing vector fields and geodesic lines tangent vector fields on the bipolar domain. We show by straight computations that geometry on domains C and B is just the same namely flat geometry of the plane. Solution: Load atlas package: restart: with(atlas): Redefine `atlas/simp` procedure to simplify the results: `atlas/simp`:=proc(a) factor(simplify(a,trig)) end: Cartesian domain Cartesian domain is 2-dimensional Euclidean (flat) space i.e. a plane with Cartesian coordinate system. To define the space we declare domain , forms , vectors , coframe , frame , flat metric and calculate connection (it equals zero of cause). Define Euclidean space as a manifold : Domain(C); 
Declare 1-forms for the space coframe: Forms(e[k]=1); ![{e[k]}](prod/atlas/examples/images/coordchange4.gif)
Declare vectors for the space frame: Vectors(E[j]); ![{E[j]}](prod/atlas/examples/images/coordchange5.gif)
Declare coframe on the space: Coframe(e[1]=d(x),e[2]=d(y)); ![[e[1] = d(x), e[2] = d(y)]](prod/atlas/examples/images/coordchange6.gif)
Declare frame on the space: Frame(E[k]); ![[E[1] = Diff(``,x), E[2] = Diff(``,y)]](prod/atlas/examples/images/coordchange7.gif)
Declare flat metric on the space: Metric(g=d(x)&.d(x)+d(y)&.d(y)); ![g = `&.`(e[1],e[1])+`&.`(e[2],e[2])](prod/atlas/examples/images/coordchange8.gif)
Calculate connection of the metric: Connection(omega); ![omega[i,j]](prod/atlas/examples/images/coordchange9.gif)
Bipolar domain Define new domain : Domain(B); 
Declare 1-forms for the domain coframe Forms(w[i]=1); ![{e[k], w[i]}](prod/atlas/examples/images/coordchange11.gif)
Declare vectors for the domain frame: Vectors(W[k]); ![{W[k]}](prod/atlas/examples/images/coordchange12.gif)
Declare coframe on the domain: Coframe(w[1]=d(u),w[2]=d(v)); ![[w[1] = d(u), w[2] = d(v)]](prod/atlas/examples/images/coordchange13.gif)
Declare frame of the domain: Frame(W[j]); ![[W[1] = Diff(``,u), W[2] = Diff(``,v)]](prod/atlas/examples/images/coordchange14.gif)
Declare mapping of the domain into : Mapping(pi,B,C,x=sinh(v)/(cosh(v)-cos(u)), y=sin(u)/(cosh(v)-cos(u))); 

Now we can calculate metric induced on the domain by the mapping. Metric(G = g &/ pi); ![G = 1/(cosh(v)-cos(u))^2*`&.`(w[2],w[2])+1/(cosh(v)-cos(u))^2*`&.`(w[1],w[1])](prod/atlas/examples/images/coordchange18.gif)
Calculate connection : Connection(Gamma); ![Gamma[i,j]](prod/atlas/examples/images/coordchange19.gif)
Let us see the result: eval(Gamma); ![TABLE([(1, 2) = -1/(cosh(v)-cos(u))*sinh(v)*w[1]+sin(u)/(cosh(v)-cos(u))*w[2], (2, 2) = -1/(cosh(v)-cos(u))*sin(u)*w[1]-1/(cosh(v)-cos(u))*sinh(v)*w[2], (2, 1) = 1/(cosh(v)-cos(u))*sinh(v)*w[1]-sin(u)/...](prod/atlas/examples/images/coordchange23.gif)
Connection is not equal to zero. Nevertheless the domain has flat metric . To verify this fact we compute curvature 2-forms : Curvature(Phi); ![Phi[i,j]](prod/atlas/examples/images/coordchange24.gif)
Obvious result: eval(Phi); ![TABLE([(1, 2) = 0, (2, 2) = 0, (2, 1) = 0, (1, 1) = 0])](prod/atlas/examples/images/coordchange25.gif)
Calculations in B domain Declare abstract functions on B domain: Functions(f=f(u,v),h=h(u,v)); 
Calculate gradient of a function: 'grad(f)'=grad(f); ![grad(f) = Diff(f,u)*(cosh(v)-cos(u))^2*W[1]+Diff(f,v)*(cosh(v)-cos(u))^2*W[2]](prod/atlas/examples/images/coordchange27.gif)
Divergence of the frame vector fields: 'div(W[1])'=div(W[1]); 'div(W[2])'=div(W[2]); ![div(W[1]) = -2*sin(u)/(cosh(v)-cos(u))](prod/atlas/examples/images/coordchange28.gif)
![div(W[2]) = -2*sinh(v)/(cosh(v)-cos(u))](prod/atlas/examples/images/coordchange29.gif)
The divergences are not equal zero. Thus coordinate lines on the bipolar domain "have sources and drains" (see graph paper above). To calculate Laplace operator one can use grad and div operators: Delta(f)=div(grad(f)); 
Verify that there are no Killing vector fields among frame vector fields: 'L[W[j]](G)'=L[W[j]](G); ![L[W[j]](G) = -2/(cosh(v)-cos(u))^3*(sinh(v)*delta[2,j]+sin(u)*delta[1,j])*`&.`(w[2],w[2])-2/(cosh(v)-cos(u))^3*(sinh(v)*delta[2,j]+sin(u)*delta[1,j])*`&.`(w[1],w[1])](prod/atlas/examples/images/coordchange31.gif)
How to calculate Killing vector fields in bipolar domain? To do this we can use condition for Killing vector field X. Construct vector field X as a linear combination of frame vector fields: X:=f*W[1]+h*W[2]; ![X := f*W[1]+h*W[2]](prod/atlas/examples/images/coordchange33.gif)
Calculate corresponding Lie derivative: 'L[X](G)'=collect(L[X](G),`&.`);  = (1/(cosh(v)-cos(u))^2*Diff(f,v)+1/(cosh(v)-cos(u))^2*Diff(h,u))*`&.`(w[2],w[1])+(1/(cosh(v)-cos(u))^2*Diff(f,v)+1/(cosh(v)-cos(u))^2*Diff(h,u))*`&.`(w[1],w[2])+(-2*f/(cosh(v)-cos(u))^3*sin(u)...](prod/atlas/examples/images/coordchange36.gif)
We have to solve corresponding PDE system ( ) and find functions f and h. But ... But it is obvious that vector fields are Killing ones in Cartesian domain. Thus these vectors are Killing ones on B domain also. It means that we have to express fields by frame vector fields on B. First of all we find the expressions for corresponding 1-forms using restriction of the mapping . e1:=e[1] &/ pi; e2:=e[2] &/ pi; ![e1 := -sinh(v)/(cosh(v)-cos(u))^2*sin(u)*w[1]-(cosh(v)*cos(u)-1)/(cosh(v)-cos(u))^2*w[2]](prod/atlas/examples/images/coordchange42.gif)
![e2 := (cosh(v)*cos(u)-1)/(cosh(v)-cos(u))^2*w[1]-sinh(v)/(cosh(v)-cos(u))^2*sin(u)*w[2]](prod/atlas/examples/images/coordchange43.gif)
After that we use dual operator to convert 1-forms into corresponding vector fields ("rising indexes"): E1:=dual(e1); E2:=dual(e2); ![E1 := -sinh(v)*sin(u)*W[1]-(cosh(v)*cos(u)-1)*W[2]](prod/atlas/examples/images/coordchange44.gif)
![E2 := (cosh(v)*cos(u)-1)*W[1]-sinh(v)*sin(u)*W[2]](prod/atlas/examples/images/coordchange45.gif)
Verify the result: 'L[E1](G)'=simplify(L[E1](G)); 'L[E2](G)'=simplify(L[E2](G));  = 0](prod/atlas/examples/images/coordchange46.gif)
 = 0](prod/atlas/examples/images/coordchange47.gif)
By the way there are "no sources and drains" for these vector fields (just straight lines; see graph paper above): 'div(E1)'=div(E1); 'div(E2)'=div(E2); 

How to calculate geodesic lines? To do this we can use condition for tangent vectors X of a geodesic line. Calculate corresponding covariant derivative: 'cov(X,X)'=collect(cov(X,X),[W[1],W[2]]); 
We have to solve corresponding PDE system ( ) and find functions f and h. But ... But the obvious result is as follows: 'cov(E1,E1)'=simplify(cov(E1,E1)); 'cov(E2,E2)'=simplify(cov(E2,E2)); 

Nothing surprising about it really. Vector fields E1, E2 are tangent ones of straight lines on the plane (just expressed by frame vectors of B domain). We are on the plane anyway (but with different coordinate system) thus the geometry on B is the same as on C. |