 Lesson 6: Transformations - Maple Help

DifferentialGeometry Lessons

Lesson 6: Transformations Overview

In this lesson, you will learn to do the following:

 – Define a transformation between two manifolds.
 – Apply a transformation to a point.
 – Compose two transformations.
 – Find the inverse of a transformation.
 – Define the identity transformation.
 – Test for the equality of two transformations.
 – Compute the Jacobian of a transformation.
 – Find the flow of a vector field. Transformation, ApplyTransformation

 > with(DifferentialGeometry):
 > DGsetup([x, y], M):
 M > DGsetup([u, v], N):

To define a transformation from the manifold M to the manifold N, use the Transformation command.  The arguments are the domain frame name, the range frame name, and a list of equations defining the map, one equation for each coordinate in the range.

 N > phi := Transformation(M, N, [u = x^2 + y^2, v = 2*x*y]);
 ${\mathrm{φ}}{≔}\left[{u}{=}{{x}}^{{2}}{+}{{y}}^{{2}}{,}{v}{=}{2}{}{x}{}{y}\right]$ (2.1)

Like all objects in the DifferentialGeometry environment, a transformation has its own internal representation.  This internal representation of a transformation includes the Jacobian of the map.

 M > op(phi);
 $\left[\left[{"transformation"}{,}\left[\left[{M}{,}{0}\right]{,}\left[{N}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{cc}{2}{}{x}& {2}{}{y}\\ {2}{}{y}& {2}{}{x}\end{array}\right]\right]\right]{,}\left[\left[{{x}}^{{2}}{+}{{y}}^{{2}}{,}{u}\right]{,}\left[{2}{}{x}{}{y}{,}{v}\right]\right]\right]$ (2.2)

The data contained in this internal representation can be obtained using the DGinfo command. For example:

 M > Tools:-DGinfo(phi,"DomainFrame");
 ${M}$ (2.3)
 M > Tools:-DGinfo(phi, "RangeFrame");
 ${N}$ (2.4)
 M > Tools:-DGinfo(phi, "JacobianMatrix");
 $\left[\begin{array}{cc}{2}{}{x}& {2}{}{y}\\ {2}{}{y}& {2}{}{x}\end{array}\right]$ (2.5)

To apply the transformation to a point, use the ApplyTransformation command -- the second argument is the coordinates of a point in the domain frame.  Note that the active frame changes to the range space after the invocation of the ApplyTransformation command.

 ${M}$ (2.6)
 M > ApplyTransformation(phi, [3, 4]);
 $\left[{25}{,}{24}\right]$ (2.7)
 N > Tools:-DGinfo("CurrentFrame");
 ${N}$ (2.8)
 N > ApplyTransformation(phi, [x = a, y = b]);
 $\left[{u}{=}{{a}}^{{2}}{+}{{b}}^{{2}}{,}{v}{=}{2}{}{a}{}{b}\right]$ (2.9)

Note that a transformation can be defined from a coordinate system to itself.

 N > psi := Transformation(M, M,[x = 2*x + 3*y + 1, y = -x + 2*y + 3]);
 ${\mathrm{ψ}}{≔}\left[{x}{=}{2}{}{x}{+}{3}{}{y}{+}{1}{,}{y}{=}{-}{x}{+}{2}{}{y}{+}{3}\right]$ (2.10) Compose transformations

The composition of transformations is performed with the ComposeTransformations command.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y], M1):
 M1 > DGsetup([u, v], M2):
 M2 > DGsetup([r, s], M3):
 M3 > DGsetup([t], M4);
 ${\mathrm{frame name: M4}}$ (3.1)
 M4 > phi := Transformation(M1, M2, [u = 3*x, v = y/2]);
 ${\mathrm{φ}}{≔}\left[{u}{=}{3}{}{x}{,}{v}{=}\frac{{y}}{{2}}\right]$ (3.2)
 M1 > psi := Transformation(M2, M3, [r = u^2, s = 1/v]);
 ${\mathrm{ψ}}{≔}\left[{r}{=}{{u}}^{{2}}{,}{s}{=}\frac{{1}}{{v}}\right]$ (3.3)
 M2 > sigma := Transformation(M4, M1, [x = sin(t), y = cos(t)]);
 ${\mathrm{σ}}{≔}\left[{x}{=}{\mathrm{sin}}{}\left({t}\right){,}{y}{=}{\mathrm{cos}}{}\left({t}\right)\right]$ (3.4)
 M4 > ComposeTransformations(psi, phi);
 $\left[{r}{=}{9}{}{{x}}^{{2}}{,}{s}{=}\frac{{2}}{{y}}\right]$ (3.5)

More than two transformations can be composed with a single call to ComposeTransformation.

 M1 > ComposeTransformations(psi, phi, sigma);
 $\left[{r}{=}{9}{}{{\mathrm{sin}}{}\left({t}\right)}^{{2}}{,}{s}{=}\frac{{2}}{{\mathrm{cos}}{}\left({t}\right)}\right]$ (3.6) Find the inverse of a transformation

The DifferentialGeometry command InverseTransformation uses the Maple solve command to find the inverse of a transformation.  All possible inverse functions are calculated.  With one argument, the first solution is returned -- this may change from one Maple session to another.

With the second argument branch = "all",all solutions are returned.  With the second argument branch = [pt1, pt2], where pt1 is in the range and point pt2 is in the domain, InverseTransformation returns the inverse transformation which sends pt1 to pt2.

 M4 > with(DifferentialGeometry):
 M4 > DGsetup([x, y], M1):
 M1 > DGsetup([u, v], M2):

Define a transformation psi and calculate its inverse.

 M2 > psi := Transformation(M1, M2, [u = x^2 + y^2, v = 2*x*y]);
 ${\mathrm{ψ}}{≔}\left[{u}{=}{{x}}^{{2}}{+}{{y}}^{{2}}{,}{v}{=}{2}{}{x}{}{y}\right]$ (4.1)
 M1 > InverseTransformation(psi);
 $\left[{x}{=}\frac{{1}}{{2}}{}\frac{{v}}{{\mathrm{RootOf}}{}\left({-}{4}{}{u}{}{{\mathrm{_Z}}}^{{2}}{+}{{v}}^{{2}}{+}{4}{}{{\mathrm{_Z}}}^{{4}}\right)}{,}{y}{=}{\mathrm{RootOf}}{}\left({-}{4}{}{u}{}{{\mathrm{_Z}}}^{{2}}{+}{{v}}^{{2}}{+}{4}{}{{\mathrm{_Z}}}^{{4}}\right)\right]$ (4.2)

Set the Maple global variable _EnvExplicit to true to get explicit solutions.

 M2 > _EnvExplicit := true;
 ${\mathrm{_EnvExplicit}}{≔}{\mathrm{true}}$ (4.3)
 M2 > InverseTransformation(psi);
 $\left[{x}{=}\frac{{v}}{{2}{}\left(\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right)}{,}{y}{=}\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right]$ (4.4)
 M2 > InverseTransformation(psi, branch = "all");
 $\left[\left[{x}{=}\frac{{v}}{{2}{}\left(\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right)}{,}{y}{=}\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right]{,}\left[{x}{=}\frac{{v}}{{2}{}\left(\frac{\sqrt{{u}{+}{v}}}{{2}}{-}\frac{\sqrt{{u}{-}{v}}}{{2}}\right)}{,}{y}{=}\frac{\sqrt{{u}{+}{v}}}{{2}}{-}\frac{\sqrt{{u}{-}{v}}}{{2}}\right]{,}\left[{x}{=}\frac{{v}}{{2}{}\left({-}\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right)}{,}{y}{=}{-}\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right]{,}\left[{x}{=}\frac{{v}}{{2}{}\left({-}\frac{\sqrt{{u}{+}{v}}}{{2}}{-}\frac{\sqrt{{u}{-}{v}}}{{2}}\right)}{,}{y}{=}{-}\frac{\sqrt{{u}{+}{v}}}{{2}}{-}\frac{\sqrt{{u}{-}{v}}}{{2}}\right]\right]$ (4.5)
 M2 > InverseTransformation(psi, branch = [[2, 2], [1, 1]]);
 $\left[{x}{=}\frac{{v}}{{2}{}\left(\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right)}{,}{y}{=}\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right]$ (4.6)
 M1 > InverseTransformation(psi, branch = [[2, 2], [-1, -1]]);
 $\left[{x}{=}\frac{{v}}{{2}{}\left({-}\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right)}{,}{y}{=}{-}\frac{\sqrt{{u}{+}{v}}}{{2}}{+}\frac{\sqrt{{u}{-}{v}}}{{2}}\right]$ (4.7) Define the identity transformation.  Test if two transformations are equal.  DGequal

The commands IdentityTransformation and DGequal are found in the package Tools.

 M1 > with(DifferentialGeometry): with(Tools):
 M1 > DGsetup([x, y, z], E3):
 E3 > phi := IdentityTransformation();
 ${\mathrm{φ}}{≔}\left[{x}{=}{x}{,}{y}{=}{y}{,}{z}{=}{z}\right]$ (5.1)
 E3 > psi := Transformation(E3, E3, [x = x, y = y, z = z]);
 ${\mathrm{ψ}}{≔}\left[{x}{=}{x}{,}{y}{=}{y}{,}{z}{=}{z}\right]$ (5.2)
 E3 > DGequal(phi, psi);
 ${\mathrm{true}}$ (5.3) Find the Jacobian Matrix for a transformation

The command DGinfo/JacobianMatrix returns the Jacobian matrix of a transformation.

 E3 > with(DifferentialGeometry):
 E3 > DGsetup([x, y], M): DGsetup([u, v], N):
 N > psi := Transformation(M, N, [u = exp(x)*sin(y), v = exp(x)*cos(y)]):
 M > Tools:-DGinfo(psi, "JacobianMatrix");
 $\left[\begin{array}{cc}{{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({y}\right)& {{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({y}\right)\\ {{ⅇ}}^{{x}}{}{\mathrm{cos}}{}\left({y}\right)& {-}{{ⅇ}}^{{x}}{}{\mathrm{sin}}{}\left({y}\right)\end{array}\right]$ (6.1) Find the flow of a vector field. Find the infinitesimal transformations (vector fields) for a multi-parameter group of transformations.

The command Flow uses the Maple dsolve command to compute the flow of a vector field.  The command InfinitesimalTransformation is the inverse to the command Flow, it calculates the vector field defined by a r-parameter group of transformations.

 M > with(DifferentialGeometry):
 M > DGsetup([x, y], E2);
 ${\mathrm{frame name: E2}}$ (7.1)
 E2 > X := evalDG(-y*D_x + x*D_y);
 ${X}{≔}{-}{y}{}{\mathrm{D_x}}{+}{x}{}{\mathrm{D_y}}$ (7.2)
 E2 > Rot := Flow(X, theta);
 ${\mathrm{Rot}}{≔}\left[{x}{=}{-}{y}{}{\mathrm{sin}}{}\left({\mathrm{θ}}\right){+}{x}{}{\mathrm{cos}}{}\left({\mathrm{θ}}\right){,}{y}{=}{y}{}{\mathrm{cos}}{}\left({\mathrm{θ}}\right){+}{x}{}{\mathrm{sin}}{}\left({\mathrm{θ}}\right)\right]$ (7.3)
 E2 > Tx := Flow(D_x, a);
 ${\mathrm{Tx}}{≔}\left[{x}{=}{a}{+}{x}{,}{y}{=}{y}\right]$ (7.4)
 E2 > Ty := Flow(D_y, b);
 ${\mathrm{Ty}}{≔}\left[{x}{=}{x}{,}{y}{=}{b}{+}{y}\right]$ (7.5)

Composing these three transformations gives the group of Euclidean motions in the plane.

 E2 > psi := ComposeTransformations(Ty, Tx, Rot);
 ${\mathrm{ψ}}{≔}\left[{x}{=}{a}{-}{y}{}{\mathrm{sin}}{}\left({\mathrm{θ}}\right){+}{x}{}{\mathrm{cos}}{}\left({\mathrm{θ}}\right){,}{y}{=}{b}{+}{y}{}{\mathrm{cos}}{}\left({\mathrm{θ}}\right){+}{x}{}{\mathrm{sin}}{}\left({\mathrm{θ}}\right)\right]$ (7.6)

The command InfinitesimalTransformation is the inverse to the command Flow, it calculates the vector fields defined by an r-parameter group of transformations.

 E2 > InfinitesimalTransformation(psi, [theta, a, b]);
 $\left[{-}{y}{}{\mathrm{D_x}}{+}{x}{}{\mathrm{D_y}}{,}{\mathrm{D_x}}{,}{\mathrm{D_y}}\right]$ (7.7) Exercises Exercise 1

Check, by means of an example, the chain rule for the Jacobian of the composition of two maps. Solution

 E2 > with(DifferentialGeometry):
 E2 > DGsetup([x, y], E2):
 E2 > DGsetup([u, v, w], E3):
 E3 > DGsetup([p, q], M):
 M > phi := Transformation(E2, E3,[u = x*y, v = x*z, w = y*z]);
 ${\mathrm{φ}}{≔}\left[{u}{=}{x}{}{y}{,}{v}{=}{x}{}{z}{,}{w}{=}{y}{}{z}\right]$ (8.1.1.1)
 E2 > psi := Transformation(E3, M, [p = u/v, q = w/v]);
 ${\mathrm{ψ}}{≔}\left[{p}{=}\frac{{u}}{{v}}{,}{q}{=}\frac{{w}}{{v}}\right]$ (8.1.1.2)
 E3 > sigma := ComposeTransformations(psi, phi);
 ${\mathrm{σ}}{≔}\left[{p}{=}\frac{{y}}{{z}}{,}{q}{=}\frac{{y}}{{x}}\right]$ (8.1.1.3)
 E2 > J1 := Tools:-DGinfo(phi, "JacobianMatrix");
 ${\mathrm{J1}}{≔}\left[\begin{array}{cc}{y}& {x}\\ {z}& {0}\\ {0}& {z}\end{array}\right]$ (8.1.1.4)
 E2 > J2 := Tools:-DGinfo(psi, "JacobianMatrix");
 ${\mathrm{J2}}{≔}\left[\begin{array}{ccc}\frac{{1}}{{v}}& {-}\frac{{u}}{{{v}}^{{2}}}& {0}\\ {0}& {-}\frac{{w}}{{{v}}^{{2}}}& \frac{{1}}{{v}}\end{array}\right]$ (8.1.1.5)

To verify the chain rule, we have to evaluate this matrix at psi.  In the next lesson (Lesson 6), we shall see how to do this with the Pushforward command, but for now we just use the subs command.

 E2 > J2psi := map2(subs, {u = x*y, v = x*z, w = y*z}, J2);
 ${\mathrm{J2psi}}{≔}\left[\begin{array}{ccc}\frac{{1}}{{x}{}{z}}& {-}\frac{{y}}{{x}{}{{z}}^{{2}}}& {0}\\ {0}& {-}\frac{{y}}{{z}{}{{x}}^{{2}}}& \frac{{1}}{{x}{}{z}}\end{array}\right]$ (8.1.1.6)
 E2 > J3 := Tools:-DGinfo(sigma, "JacobianMatrix");
 ${\mathrm{J3}}{≔}\left[\begin{array}{cc}{0}& \frac{{1}}{{z}}\\ {-}\frac{{y}}{{{x}}^{{2}}}& \frac{{1}}{{x}}\end{array}\right]$ (8.1.1.7)
 E2 > evalm(J3 - J2psi &* J1);
 $\left[\begin{array}{rr}{0}& {0}\\ {0}& {0}\end{array}\right]$ (8.1.1.8) Exercise 2

 E2 > with(DifferentialGeometry):
 E2 > DGsetup([x,y], M2):
 M2 > DGsetup([u,v], N2):
 N2 > DGsetup([x, y, z], M3):
 M3 > DGsetup([t], R):

[i] At what points do the following maps fail to be a local diffeomorphism?

(a)

 R > phi1 := Transformation(M2, N2, [u = x/(1 + x^2 + y^2), v = y/(1 + x^2 + y^2)]);
 ${\mathrm{φ1}}{≔}\left[{u}{=}\frac{{x}}{{1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}}{,}{v}{=}\frac{{y}}{{1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}}\right]$ (8.2.1)

(b)

 M2 > phi2 := Transformation(M3, M3, [x = x + y + z, y = 1/2*(x^2 + y^2 + z^2), z = 1/3*(x^3 + y^3 + z^3)]);
 ${\mathrm{φ2}}{≔}\left[{x}{=}{x}{+}{y}{+}{z}{,}{y}{=}\frac{{{x}}^{{2}}}{{2}}{+}\frac{{{y}}^{{2}}}{{2}}{+}\frac{{{z}}^{{2}}}{{2}}{,}{z}{=}\frac{{{x}}^{{3}}}{{3}}{+}\frac{{{y}}^{{3}}}{{3}}{+}\frac{{{z}}^{{3}}}{{3}}\right]$ (8.2.2)

[ii] At what points do the following maps fail to be local immersions?

(a)

 M3 > phi3 := Transformation(N2, M3, [x = u*v, y = u + v, z = u^2 + v^2]);
 ${\mathrm{φ3}}{≔}\left[{x}{=}{u}{}{v}{,}{y}{=}{u}{+}{v}{,}{z}{=}{{u}}^{{2}}{+}{{v}}^{{2}}\right]$ (8.2.3)

(b)

 N2 > phi4 := Transformation(R, M3, [x = t, y = 1/sqrt(2)*t^2, z = 1/3*t^3]);
 ${\mathrm{φ4}}{≔}\left[{x}{=}{t}{,}{y}{=}\frac{\sqrt{{2}}{}{{t}}^{{2}}}{{2}}{,}{z}{=}\frac{{{t}}^{{3}}}{{3}}\right]$ (8.2.4) Solution

[i](a)

 R > J := Tools:-DGinfo(phi1, "JacobianMatrix");
 ${J}{≔}\left[\begin{array}{cc}\frac{{1}}{{1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}}{-}\frac{{2}{}{{x}}^{{2}}}{{\left({1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}\right)}^{{2}}}& {-}\frac{{2}{}{x}{}{y}}{{\left({1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}\right)}^{{2}}}\\ {-}\frac{{2}{}{x}{}{y}}{{\left({1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}\right)}^{{2}}}& \frac{{1}}{{1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}}{-}\frac{{2}{}{{y}}^{{2}}}{{\left({1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}\right)}^{{2}}}\end{array}\right]$ (8.2.1.1)
 R > d := LinearAlgebra:-Determinant(J);
 ${d}{≔}{-}\frac{{{x}}^{{2}}{+}{{y}}^{{2}}{-}{1}}{{\left({1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}\right)}^{{3}}}$ (8.2.1.2)

The map phi1 fails to be a local diffeomorphism at points on the unit circle x^2 + y^2 = 1.

[i](b)

 M2 > J := Tools:-DGinfo(phi2, "JacobianMatrix");
 R > d := factor(LinearAlgebra:-Determinant(J));
 ${J}{≔}\left[\begin{array}{ccc}{1}& {1}& {1}\\ {x}& {y}& {z}\\ {{x}}^{{2}}& {{y}}^{{2}}& {{z}}^{{2}}\end{array}\right]$ ${d}{≔}{-}\left({-}{z}{+}{y}\right){}\left({x}{-}{z}\right){}\left({x}{-}{y}\right)$ (8.2.1.3)

The map phi2 fails to be a local diffeomorphism at points on the lines x = y, x = z, or y = z.

[ii](a) The map phi2 fails to be a local immersion at points where the Jacobian has rank 1, that is, at points where the 2 x 2 sub-determinants of the Jacobian matrix vanish.

 R > J := Tools:-DGinfo(phi3, "JacobianMatrix");
 ${J}{≔}\left[\begin{array}{cc}{v}& {u}\\ {1}& {1}\\ {2}{}{u}& {2}{}{v}\end{array}\right]$ (8.2.1.4)
 R > J1 := LinearAlgebra:-SubMatrix(J, [1, 2], [1, 2]);
 ${\mathrm{J1}}{≔}\left[\begin{array}{cc}{v}& {u}\\ {1}& {1}\end{array}\right]$ (8.2.1.5)
 R > J2 := LinearAlgebra:-SubMatrix(J, [1, 3], [1, 2]);
 ${\mathrm{J2}}{≔}\left[\begin{array}{cc}{v}& {u}\\ {2}{}{u}& {2}{}{v}\end{array}\right]$ (8.2.1.6)
 R > J3 := LinearAlgebra:-SubMatrix(J, [2, 3], [1, 2]);
 ${\mathrm{J3}}{≔}\left[\begin{array}{cc}{1}& {1}\\ {2}{}{u}& {2}{}{v}\end{array}\right]$ (8.2.1.7)
 R > use LinearAlgebra in eq := Determinant(J1)^2 + Determinant(J2)^2 + Determinant(J3)^2 end;
 ${\mathrm{eq}}{≔}{\left({v}{-}{u}\right)}^{{2}}{+}{\left({2}{}{{v}}^{{2}}{-}{2}{}{{u}}^{{2}}\right)}^{{2}}{+}{\left({2}{}{v}{-}{2}{}{u}\right)}^{{2}}$ (8.2.1.8)
 R > factor(%);
 $\left({4}{}{{v}}^{{2}}{+}{8}{}{u}{}{v}{+}{5}{+}{4}{}{{u}}^{{2}}\right){}{\left({v}{-}{u}\right)}^{{2}}$ (8.2.1.9)

Thus phi3 fails to be a local immersion at points where u = v.

[ii](b)

 R > J := Tools:-DGinfo(phi4, "JacobianMatrix");
 ${J}{≔}\left[\begin{array}{c}{1}\\ \sqrt{{2}}{}{t}\\ {{t}}^{{2}}\end{array}\right]$ (8.2.1.10)
 R > factor((J[1, 1]^2 + J[2, 1]^2 + J[3, 1]^2));
 ${\left({1}{+}{{t}}^{{2}}\right)}^{{2}}$ (8.2.1.11)

The map phi4 is a local immersion at all points. Exercise 3

Find the flow phi_t of each of the following vector fields and check that phi_t o phi_s = phi_(t + s) and (phi_t)^(-1) = phi_(-t).

 R > with(DifferentialGeometry):
 R > DGsetup([x, y], M):
 M > DGsetup([u, v, w], N):

[i]

 N > X1 := evalDG(x*y*D_x - y^2*D_y);
 ${\mathrm{X1}}{≔}{x}{}{y}{}{\mathrm{D_x}}{-}{{y}}^{{2}}{}{\mathrm{D_y}}$ (8.3.1)

[ii]

 M > ChangeFrame(N):
 N > X2 := evalDG(v*D_u - u*D_v + w*D_w);
 ${\mathrm{X2}}{≔}{v}{}{\mathrm{D_u}}{-}{u}{}{\mathrm{D_v}}{+}{w}{}{\mathrm{D_w}}$ (8.3.2) Solution

[i]

 N > phi := simplify(Flow(X, t));
 ${\mathrm{φ}}{≔}\left[{x}{=}{-}{y}{}{\mathrm{sin}}{}\left({t}\right){+}{x}{}{\mathrm{cos}}{}\left({t}\right){,}{y}{=}{y}{}{\mathrm{cos}}{}\left({t}\right){+}{x}{}{\mathrm{sin}}{}\left({t}\right)\right]$ (8.3.1.1)
 E2 > InfinitesimalTransformation(phi, [t]);
 $\left[{-}{y}{}{\mathrm{D_x}}{+}{x}{}{\mathrm{D_y}}\right]$ (8.3.1.2)
 E2 > phi1 := phi:
 E2 > phi2 := eval(phi, t = s);
 ${\mathrm{φ2}}{≔}\left[{x}{=}{-}{y}{}{\mathrm{sin}}{}\left({s}\right){+}{x}{}{\mathrm{cos}}{}\left({s}\right){,}{y}{=}{y}{}{\mathrm{cos}}{}\left({s}\right){+}{x}{}{\mathrm{sin}}{}\left({s}\right)\right]$ (8.3.1.3)
 E2 > phi3 := eval(phi, t = t + s);
 ${\mathrm{φ3}}{≔}\left[{x}{=}{-}{y}{}{\mathrm{sin}}{}\left({t}{+}{s}\right){+}{x}{}{\mathrm{cos}}{}\left({t}{+}{s}\right){,}{y}{=}{y}{}{\mathrm{cos}}{}\left({t}{+}{s}\right){+}{x}{}{\mathrm{sin}}{}\left({t}{+}{s}\right)\right]$ (8.3.1.4)
 E2 > phi4 := ComposeTransformations(phi1, phi2);
 ${\mathrm{φ4}}{≔}\left[{x}{=}{-}\left({y}{}{\mathrm{cos}}{}\left({s}\right){+}{x}{}{\mathrm{sin}}{}\left({s}\right)\right){}{\mathrm{sin}}{}\left({t}\right){+}\left({-}{y}{}{\mathrm{sin}}{}\left({s}\right){+}{x}{}{\mathrm{cos}}{}\left({s}\right)\right){}{\mathrm{cos}}{}\left({t}\right){,}{y}{=}\left({y}{}{\mathrm{cos}}{}\left({s}\right){+}{x}{}{\mathrm{sin}}{}\left({s}\right)\right){}{\mathrm{cos}}{}\left({t}\right){+}\left({-}{y}{}{\mathrm{sin}}{}\left({s}\right){+}{x}{}{\mathrm{cos}}{}\left({s}\right)\right){}{\mathrm{sin}}{}\left({t}\right)\right]$ (8.3.1.5)
 E2 > phi4 := DGmap(1, collect, phi4, [x, y]);
 ${\mathrm{φ4}}{≔}\left[{x}{=}\left({-}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){+}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right)\right){}{x}{+}\left({-}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){-}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right)\right){}{y}{,}{y}{=}\left({\mathrm{sin}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){+}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right)\right){}{x}{+}\left({-}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){+}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right)\right){}{y}\right]$ (8.3.1.6)

Check that phi_(-t) is the inverse of phi_t.

 E2 > phi5 := eval(phi, t = -t);
 ${\mathrm{φ5}}{≔}\left[{x}{=}{y}{}{\mathrm{sin}}{}\left({t}\right){+}{x}{}{\mathrm{cos}}{}\left({t}\right){,}{y}{=}{y}{}{\mathrm{cos}}{}\left({t}\right){-}{x}{}{\mathrm{sin}}{}\left({t}\right)\right]$ (8.3.1.7)
 E2 > phi6 := ComposeTransformations(phi1, phi5);
 ${\mathrm{φ6}}{≔}\left[{x}{=}{-}\left({y}{}{\mathrm{cos}}{}\left({t}\right){-}{x}{}{\mathrm{sin}}{}\left({t}\right)\right){}{\mathrm{sin}}{}\left({t}\right){+}\left({y}{}{\mathrm{sin}}{}\left({t}\right){+}{x}{}{\mathrm{cos}}{}\left({t}\right)\right){}{\mathrm{cos}}{}\left({t}\right){,}{y}{=}\left({y}{}{\mathrm{cos}}{}\left({t}\right){-}{x}{}{\mathrm{sin}}{}\left({t}\right)\right){}{\mathrm{cos}}{}\left({t}\right){+}\left({y}{}{\mathrm{sin}}{}\left({t}\right){+}{x}{}{\mathrm{cos}}{}\left({t}\right)\right){}{\mathrm{sin}}{}\left({t}\right)\right]$ (8.3.1.8)
 E2 > simplify(phi6);
 $\left[{x}{=}{x}{,}{y}{=}{y}\right]$ (8.3.1.9)

[ii]

 E2 > psi := Flow(X2, t);
 ${\mathrm{ψ}}{≔}\left[{u}{=}{v}{}{\mathrm{sin}}{}\left({t}\right){+}{u}{}{\mathrm{cos}}{}\left({t}\right){,}{v}{=}{v}{}{\mathrm{cos}}{}\left({t}\right){-}{u}{}{\mathrm{sin}}{}\left({t}\right){,}{w}{=}{w}{}{{ⅇ}}^{{t}}\right]$ (8.3.1.10)
 N > InfinitesimalTransformation(psi, [t]);
 $\left[{v}{}{\mathrm{D_u}}{-}{u}{}{\mathrm{D_v}}{+}{w}{}{\mathrm{D_w}}\right]$ (8.3.1.11)
 N > psi1 := psi:
 N > psi2 := eval(psi, t = s);
 ${\mathrm{ψ2}}{≔}\left[{u}{=}{v}{}{\mathrm{sin}}{}\left({s}\right){+}{u}{}{\mathrm{cos}}{}\left({s}\right){,}{v}{=}{v}{}{\mathrm{cos}}{}\left({s}\right){-}{u}{}{\mathrm{sin}}{}\left({s}\right){,}{w}{=}{w}{}{{ⅇ}}^{{s}}\right]$ (8.3.1.12)
 N > psi3 := eval(psi, t = t + s);
 ${\mathrm{ψ3}}{≔}\left[{u}{=}{v}{}{\mathrm{sin}}{}\left({t}{+}{s}\right){+}{u}{}{\mathrm{cos}}{}\left({t}{+}{s}\right){,}{v}{=}{v}{}{\mathrm{cos}}{}\left({t}{+}{s}\right){-}{u}{}{\mathrm{sin}}{}\left({t}{+}{s}\right){,}{w}{=}{w}{}{{ⅇ}}^{{t}{+}{s}}\right]$ (8.3.1.13)
 N > map(expand, psi3);
 $\left[{u}{=}{v}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){+}{v}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){-}{u}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){+}{u}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){,}{v}{=}{-}{v}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){+}{v}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){-}{u}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){-}{u}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){,}{w}{=}{w}{}{{ⅇ}}^{{t}}{}{{ⅇ}}^{{s}}\right]$ (8.3.1.14)
 N > psi4 := map(expand, ComposeTransformations(psi1, psi2));
 ${\mathrm{ψ4}}{≔}\left[{u}{=}{v}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){+}{v}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){-}{u}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){+}{u}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){,}{v}{=}{-}{v}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){+}{v}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){-}{u}{}{\mathrm{sin}}{}\left({s}\right){}{\mathrm{cos}}{}\left({t}\right){-}{u}{}{\mathrm{cos}}{}\left({s}\right){}{\mathrm{sin}}{}\left({t}\right){,}{w}{=}{w}{}{{ⅇ}}^{{t}}{}{{ⅇ}}^{{s}}\right]$ (8.3.1.15)

Check that psi_(-t) is the inverse of psi_t.

 N > psi5 := eval(psi, t = -t);
 ${\mathrm{ψ5}}{≔}\left[{u}{=}{-}{v}{}{\mathrm{sin}}{}\left({t}\right){+}{u}{}{\mathrm{cos}}{}\left({t}\right){,}{v}{=}{v}{}{\mathrm{cos}}{}\left({t}\right){+}{u}{}{\mathrm{sin}}{}\left({t}\right){,}{w}{=}{w}{}{{ⅇ}}^{{-}{t}}\right]$ (8.3.1.16)
 N > psi6 := ComposeTransformations(psi1, psi5);
 ${\mathrm{ψ6}}{≔}\left[{u}{=}\left({v}{}{\mathrm{cos}}{}\left({t}\right){+}{u}{}{\mathrm{sin}}{}\left({t}\right)\right){}{\mathrm{sin}}{}\left({t}\right){+}\left({-}{v}{}{\mathrm{sin}}{}\left({t}\right){+}{u}{}{\mathrm{cos}}{}\left({t}\right)\right){}{\mathrm{cos}}{}\left({t}\right){,}{v}{=}\left({v}{}{\mathrm{cos}}{}\left({t}\right){+}{u}{}{\mathrm{sin}}{}\left({t}\right)\right){}{\mathrm{cos}}{}\left({t}\right){-}\left({-}{v}{}{\mathrm{sin}}{}\left({t}\right){+}{u}{}{\mathrm{cos}}{}\left({t}\right)\right){}{\mathrm{sin}}{}\left({t}\right){,}{w}{=}{w}{}{{ⅇ}}^{{-}{t}}{}{{ⅇ}}^{{t}}\right]$ (8.3.1.17)
 N > simplify(psi6);
 $\left[{u}{=}{u}{,}{v}{=}{v}{,}{w}{=}{w}\right]$ (8.3.1.18) Exercise 4

Find the infinitesimal generators for the action of the general linear group GL2 on the plane. Solution

 N > restart:with(DifferentialGeometry): DGsetup([x, y], E2):
 E2 > phi := Transformation(E2, E2, [x = a*x + b*y, y = c*x + d*y]);
 ${\mathrm{φ}}{≔}\left[{x}{=}{a}{}{x}{+}{b}{}{y}{,}{y}{=}{c}{}{x}{+}{d}{}{y}\right]$ (8.4.1.1)
 E2 > InfinitesimalTransformation(phi, [a, c, b, d], [a = 1, b = 0, c = 0, d = 1]);
 $\left[{x}{}{\mathrm{D_x}}{,}{x}{}{\mathrm{D_y}}{,}{y}{}{\mathrm{D_x}}{,}{y}{}{\mathrm{D_y}}\right]$ (8.4.1.2)
 E2 >