Preferences - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DifferentialGeometry

  

Preferences

 

Calling Sequence

Parameters

Description

Details    

Calling Sequence

Preferences(keyword)

Preferences(keyword, value)

Parameters

keyword

-

a string, the name of the particular preference

value

-

the value to be assigned to the preference

Description

• 

This command allows the user to control various display conventions used by the DifferentialGeometry package; to specify the LaTeX formatting of DifferentialGeometry objects such as vectors, differential forms and tensors; and to specify how commonly used Maple commands are used internally by DifferentialGeometry procedures.

• 

The following are the admissible keywords strings:

DisplayFrameDefinitions

ErrorInfoLevel

ErrorPrintLength

HistoryDepth

JetNotation

Keywords

PrettyPrint

PromptLength

SafeMode

Show

ShowFramePrompt

TensorDisplay

TeXBiformList

TeXFormList

TeXLineBreak

TeXPrintOrder

TeXVectorList

WedgeDisplay

dsolve

nullspace

pdsolve

rref

simplification

solve

• 

The  paragraphs below describes the use of each of these keywords.

• 

This command is part of the DifferentialGeometry package, and so can be used in the form Preferences(...) only after executing the command with(DifferentialGeometry).  It can always be used in the long form DifferentialGeometry:-Preferences.

Details    

"DisplayFrameDefinitions"

This preference controls what information is displayed when the command DGsetup is executed. When this preference is false, no display is displayed.  When this preference is true, the names of the coordinate variables and the labels for the frame vectors and coframe 1-forms are displayed.  The default preference is false.

with(DifferentialGeometry):

Preferences("DisplayFrameDefinitions");

false

(1)

DGsetup([x, y, z], E3);

frame name: E3

(2)

Preferences("DisplayFrameDefinitions", true);

false

(3)

DGsetup([x, y, z], E3);

The following coordinates have been protected:

x,y,z

The following vector fields have been defined and protected:

D_x,D_y,D_z

The following differential 1-forms have been defined and protected:

dx,dy,dz

frame name: E3

(4)

"ErrorInfoLevel"

This preference controls the amount of information provided by an error message from a DifferentialGeometry command.  The default for ErrorInfoLevel is 1.

"ErrorPrintLength"

For many of the error messages returned by the DifferentialGeometry commands, it is not necessary to display all the component information of the vectors, differential forms, and tensors provided as input.  By suppressing the component information, the error messages are generally much easier to read. The ErrorPrintLength preference controls the number of components which will be displayed -- the first k components will be displayed if the sum of their lengths does not exceed the integer specified by the ErrorPrintLength preference.  The length of each component is calculated using the Maple length command.  The default value for this preference is 0 so that no component information is displayed.  To display all component information, set this preference to infinity.

"HistoryDepth"

The Tools command CalculationHistory will store the results of certain critical intermediate computations which the user may wish to view.  The HistoryDepth preference specifies the number of such computations to store.  The default value for this preference is 10.

with(DifferentialGeometry):

To illustrate this preference, we create a small procedure called Test and store some values calculated by this program using the CalculationHistory command.

Test := proc(n)
local i;
for i to n do
Tools:-CalculationHistory:-Update("Test", [i, i^2])
od; n^2 end:

Run the program Test.

Test(25);

625

(5)

Retrieve the calculated values.

Tools:-CalculationHistory:-Get("Test");

25,625,24,576,23,529,22,484,21,441,20,400,19,361,18,324,17,289,16,256

(6)

Change the HistoryDepth preference to 3.

Preferences("HistoryDepth", 3);

10

(7)

 

• 

Rerun the program Test and retrieve the calculated values.  This time only 3 values are stored.

Test(25);

625

(8)

Tools:-CalculationHistory:-Get("Test");

25,625,24,576,23,529

(9)

"JetNotation"

In the mathematical literature, there are two standard index notations for representing derivatives of a function.  For example, if u = u(x, y) then we have:

JetNotation1: u[1] = u_x, u[2] = u_y, u[1, 1] = u_xx, u[1, 2] = u_xy, u[2, 2] = u_yy, u[1, 1, 1] = u_xxx, u[1, 1, 2] = u_xxy, u[1, 2, 2] = u_xyy, u[2, 2, 2] = u_yyy.

JetNotation2: u[1, 0] = u_x, u[0, 1] = u_y, u[2, 0] = u_xx, u[1, 1] = u_xy, u[0, 2] = u_yy, u[3, 0] = u_xxx, u[2, 1] = u_xxy, u[1, 2] = u_xyy, u[0, 3] = u_yyy.

• 

The JetNotation preference determines which notation is used by the DifferentialGeometry package (and the JetCalculus subpackage).  The default is JetNotation1.

with(DifferentialGeometry):

Preferences("JetNotation");

JetNotation1

(10)

DGsetup([x,y], [u], Jet, 3, verbose);

The following coordinates have been protected:

x,y,u,u1,u2,u1,1,u1,2,u2,2,u1,1,1,u1,1,2,u1,2,2,u2,2,2

The following vector fields have been defined and protected:

D_x,D_y,D_u,D_u1,D_u2,D_u1,1,D_u1,2,D_u2,2,D_u1,1,1,D_u1,1,2,D_u1,2,2,D_u2,2,2

The following differential 1-forms have been defined and protected:

dx,dy,du,du1,du2,du1,1,du1,2,du2,2,du1,1,1,du1,1,2,du1,2,2,du2,2,2

The following type [1,0] biforms have been defined and protected::

Dx,Dy

The following type [0,1] biforms (contact 1-forms) have been defined and protected::

Cu,Cu1,Cu2,Cu1,1,Cu1,2,Cu2,2,Cu1,1,1,Cu1,1,2,Cu1,2,2,Cu2,2,2

frame name: Jet

(11)

Preferences("JetNotation", "JetNotation2");

JetNotation1

(12)

DGsetup([x, y], [u], Jet, 3, verbose);

The following coordinates have been protected:

x,y,u0,0,u1,0,u0,1,u2,0,u1,1,u0,2,u3,0,u2,1,u1,2,u0,3

The following vector fields have been defined and protected:

D_x,D_y,D_u0,0,D_u1,0,D_u0,1,D_u2,0,D_u1,1,D_u0,2,D_u3,0,D_u2,1,D_u1,2,D_u0,3

The following differential 1-forms have been defined and protected:

dx,dy,du0,0,du1,0,du0,1,du2,0,du1,1,du0,2,du3,0,du2,1,du1,2,du0,3

The following type [1,0] biforms have been defined and protected::

Dx,Dy

The following type [0,1] biforms (contact 1-forms) have been defined and protected::

Cu0,0,Cu1,0,Cu0,1,Cu2,0,Cu1,1,Cu0,2,Cu3,0,Cu2,1,Cu1,2,Cu0,3

frame name: Jet

(13)

"Keywords"

The option Keywords returns the list of all admissible keywords for the Preferences procedure.

with(DifferentialGeometry):

Preferences("Keywords");

DisplayFrameDefinitions,ErrorInfoLevel,ErrorPrintLength,HistoryDepth,JetNotation,Macros,PrettyPrint,PromptLength,SafeMode,ShowFramePrompt,TeXBiformList,TeXFormList,TeXLineBreak,TeXPrintOrder,TeXVectorList,TensorDisplay,VectorDisplay,WedgeDisplay,dsolve,is,nullspace,pdsolve,rref,simplification,solve

(14)

"PrettyPrint"

With the PrettyPrint preference set to true, the components of vectors, differential forms and tensors are always displayed on the main text line -- they will not appear as numerators in fractions.  This is somewhat easier to read but has the disadvantage that the resulting outline (for vectors and 1-forms) cannot be copied and pasted.  The default for the PrettyPrint preference is false.

with(DifferentialGeometry):

DGsetup([x, y, z], M):

The following coordinates have been protected:

x,y,z

The following vector fields have been defined and protected:

D_x,D_y,D_z

The following differential 1-forms have been defined and protected:

dx,dy,dz

(15)

Preferences("PrettyPrint");

false

(16)

X := evalDG(1/(x^2 + y^2)*dx &w dy - dx &w dz);

Xdxx2+y2dydxdz

(17)

Preferences("PrettyPrint", true);

false

(18)

X := evalDG(1/(x^2 + y^2)*dx &w dy - dx &w dz);

X1x2+y2dxdydxdz

(19)

"PromptLength"

This preference specifies the maximum number of characters that will be displayed in the frame prompt.

with(DifferentialGeometry):

DGsetup([x], Newton);

The following coordinates have been protected:

x

The following vector fields have been defined and protected:

D_x

The following differential 1-forms have been defined and protected:

dx

frame name: Newton

(20)

Preferences("PromptLength", 4);

1000

(21)

"SafeMode"

With the SafeMode preference set to false, no global assignments are made for the coordinate vectors and 1-forms when the command DGsetup is called.  Use this preference when writing programs in which temporary manifolds, Lie algebras, etc... need to be constructed.  This will avoid introducing globals into the Maple namespace.

with(DifferentialGeometry):

Preferences("SafeMode");

false

(22)

DGsetup([x], R1):

The following coordinates have been protected:

x

The following vector fields have been defined and protected:

D_x

The following differential 1-forms have been defined and protected:

dx

(23)

assigned(D_x), assigned(dx);

true,true

(24)

Now set the SafeMode preference to true.  The names D_y and dy are not assigned nor are they protected.

Preferences("SafeMode", true);

false

(25)

DGsetup([y], R2):

The following coordinates have been protected:

y

The following vector fields have been defined and protected:

vector,R2,,1,1

The following differential 1-forms have been defined and protected:

form,R2,1,1,1

(26)

assigned(D_y), assigned(dy);

true,true

(27)

D_y := 3;

D_y3

(28)
• 

Note that the coordinate vectors and forms for the frame R2 can still be accessed using commands from the Tools subpackage.  In SafeMode, the internal representations of DifferentialGeometry are displayed as output.

Tools:-DGvector(y);

vector,R2,,1,1

(29)

Tools:-DGinfo("FrameBaseForms");

form,R2,1,1,1

(30)

Preferences("SafeMode", false);

true

(31)

"Show"

The option Show returns the list of all the preference values.

with(DifferentialGeometry):

Preferences("Show");

DisplayFrameDefinitions=true,ErrorInfoLevel=0,ErrorPrintLength=0,HistoryDepth=3,JetNotation=JetNotation2,Macros=off,PrettyPrint=true,PromptLength=4,SafeMode=false,ShowFramePrompt=true,TeXLineBreak=8,TeXPrintOrder=,TensorDisplay=0,VectorDisplay=0,WedgeDisplay=1,dsolve=dsolve,is=is,nullspace=LinearAlgebra:−NullSpace,pdsolve=pdsolve,rref=LinearAlgebra:−ReducedRowEchelonForm,simplification=DGsimp,solve=solve

(32)

"ShowFramePrompt"

With the ShowFramePrompt set to false, the standard Maple prompt will be used.

with(DifferentialGeometry):

Preferences("ShowFramePrompt", false);

true

(33)

DGsetup([x, y], Gauss);

The following coordinates have been protected:

x,y

The following vector fields have been defined and protected:

D_x,D_y

The following differential 1-forms have been defined and protected:

dx,dy

frame name: Gauss

(34)

LieBracket(D_x, x*D_y);

D_y

(35)

Notice that the prompt has remained the standard Maple prompt '>'.

Preferences("ShowFramePrompt", true);

false

(36)

DGsetup([x, y], Gauss);

The following coordinates have been protected:

x,y

The following vector fields have been defined and protected:

D_x,D_y

The following differential 1-forms have been defined and protected:

dx,dy

frame name: Gauss

(37)

Now the prompt contains the name of the current frame.

"TensorDisplay"

The preference TensorDisplay controls how the tensor product is displayed in Maple output.  If this preference is 0, no symbol is printed; if this preference is 1, then '&t' is printed.  The default TensorDisplay preference is 0.

with(DifferentialGeometry):

DGsetup([x, y, z], M):

The following coordinates have been protected:

x,y,z

The following vector fields have been defined and protected:

D_x,D_y,D_z

The following differential 1-forms have been defined and protected:

dx,dy,dz

(38)

alpha := evalDG(2*dx &t dy - dy &t dz);

α2dxdydydz

(39)

Preferences("TensorDisplay", 1);

0

(40)

alpha;

2dxdydydz

(41)

Preferences("TensorDisplay", 0);

1

(42)

"TeXFormList", "TeXVectorList", "TeXBiformList", "TeXPrintOrder", "TeXLineBreak"

These preferences control how the Maple latex command will TeX the components of a vector, differential form or tensor.  These preferences must be set by the user for each frame.

with(DifferentialGeometry):

DGsetup([x, y, z], M): DGsetup([x, y, z], N):

The following coordinates have been protected:

x,y,z

The following vector fields have been defined and protected:

D_x,D_y,D_z

The following differential 1-forms have been defined and protected:

dx,dy,dz

The following coordinates have been protected:

x,y,z

The following vector fields have been defined and protected:

D_x,D_y,D_z

The following differential 1-forms have been defined and protected:

dx,dy,dz

(43)

Specify the LaTeX representations for the frame [D_x, D_y, D_z] on M.

Preferences("TeXVectorList", M, ["\\partial_x", "\\partial_y", "\\partial_z"]);

\partial_x,\partial_y,\partial_z

(44)

Specify the LaTeX representations for the coframe [dx, dy, dz] on M.

Preferences("TeXFormList", M, ["dx", "dy", "d,z"]);

dx,dy,d,z

(45)

Specify the LaTeX representations for the frame [D_x, D_y, D_z] on N.

Preferences("TeXVectorList", N, ["\\frac{\\partial\\hfill}{\\partial_x}", "\\frac{\\partial\\hfill}{\\partial_y}", "\\frac{\\partial\\hfill}{\\partial_y}"]);

\frac{\partial\hfill}{\partial_x},\frac{\partial\hfill}{\partial_y},\frac{\partial\hfill}{\partial_y}

(46)

Specify the LaTeX representations for the coframe [dx, dy, dz] on N.

Preferences("TeXFormList", N, ["\\alpha", "\\beta", "\\gamma"]);

\alpha,\beta,\gamma

(47)

Define a vector X1 and a form alpha1 on M and convert to LaTeX.

ChangeFrame(M);

N

(48)

X1 := evalDG(3*D_x - D_y + z*D_z);

X13D_xD_y+zD_z

(49)

alpha1 := evalDG(y*dx - sin(z)*dy + (1/z)*dz);

α1ydxsinzdy+1zdz

(50)

latex(X1);

3 \textit{D\_x} -\textit{D\_y} +z \textit{D\_z}

latex(alpha1);

y \mathit{dx} -\sin \! \left(z \right) \mathit{dy} +\left(\frac{1}{z}\right)_{} \mathit{dz}

 

Now LaTeX the same vector and form, but viewed as objects on N.

ChangeFrame(N);

M

(51)

X2 := evalDG(3*D_x - D_y + z*D_z);

X23D_xD_y+zD_z

(52)

alpha2 := evalDG(y*dx - sin(z)*dy + (1/z)*dz);

α2ydxsinzdy+1zdz

(53)

latex(X2);

3 \textit{D\_x} -\textit{D\_y} +z \textit{D\_z}

latex(alpha2);

y \mathit{dx} -\sin \! \left(z \right) \mathit{dy} +\left(\frac{1}{z}\right)_{} \mathit{dz}

 

The TeXPrintOrder preference allows the user to specify the ordering of components in the TeX representation of a vector, differential form, or tensor.

ChangeFrame(M):

Preferences("TeXPrintOrder", [dy, dz, dx]);

(54)

latex(alpha1);

y \mathit{dx} -\sin \! \left(z \right) \mathit{dy} +\left(\frac{1}{z}\right)_{} \mathit{dz}

TensorOrder := evalDG([dx &t dx, dy &t dy, dz &t dz, dx &t dy, dx &t dz, dy &t dz]);

TensorOrderdxdx,dydy,dzdz,dxdy,dxdz,dydz

(55)

Preferences("TeXPrintOrder", TensorOrder);

2,3,1

(56)

T := evalDG(dx &t dy + dy &t dy);

Tdxdy+dydy

(57)

latex(T);

\mathit{dx} \mathit{dy} +\mathit{dy} \mathit{dy}

 

To LaTeX a vector or a form the TeXPrintOrder preference must now be reset.  Often, the user may wish to insert the latex output into a LaTeX alignment environment.  With the TeXLineBreak preference, a carriage return \' and alignment character & can be automatically placed.after any number of components.

Preferences("TeXLineBreak", [1]);

8

(58)

latex(X1);

3 \textit{D\_x} -\textit{D\_y} +z \textit{D\_z}

Preferences("TeXLineBreak", [1, 2]);

1

(59)

latex(X1);

3 \textit{D\_x} -\textit{D\_y} +z \textit{D\_z}

"WedgeDisplay"

The preference WedgeDisplay controls how the wedge product of differential forms is displayed in Maple output.  If this preference is 0, no symbol is printed; if this preference is 1, a '^' is printed; and if the preference is 2, then '&w' is printed.  The default WedgeDisplay preference is 1.

with(DifferentialGeometry):

DGsetup([x, y, z], M):

The following coordinates have been protected:

x,y,z

The following vector fields have been defined and protected:

D_x,D_y,D_z

The following differential 1-forms have been defined and protected:

dx,dy,dz

(60)

alpha := evalDG(2*dx &w dy - dy &w dz);

α2dxdydydz

(61)

Preferences("WedgeDisplay", 0);

1

(62)

alpha;

2dxdydydz

(63)

Preferences("WedgeDisplay", 2);

0

(64)

alpha;

2dx &w dydy &w dz

(65)

"dsolve", "nullspace","pdsolve", "rref", "simplification", "solve"

These preferences allow the user to customize the procedures which will be used with DifferentialGeometry programs for dsolve, LinearAlgebra:-Nullspace, pdsolve, LinearAlgebra:-ReducedRowEchelonForm, simplify, and solve. Here is a simple example.

with(DifferentialGeometry):

DGsetup([x], M);

The following coordinates have been protected:

x

The following vector fields have been defined and protected:

D_x

The following differential 1-forms have been defined and protected:

dx

frame name: M

(66)

ExteriorDerivative(sqrt(x^2));

csgnxdx

(67)

To obtain the simpler result dx, we can change the simplification command used by the DifferentialGeometry package.  Call the new simplification command MySimplify and pass this procedure name to the Preferences. Then rerun the ExteriorDerivative command.

MySimplify := x -> simplify(x, symbolic);

MySimplifyxsimplifyx,symbolic

(68)

Preferences("simplification", MySimplify);

proclocaltmp&comma;tmp2&semi;tmp:=`simplify/nosize`args&comma;ifnargs&equals;1&comma;&apos;:-normalize_rational_funcs&apos;&comma;NULL&semi;ifhastypetmp&comma;&apos;trig&apos;thentmp2:=subs&lsqb;eval&rsqb;cot&equals;cos&sol;sin&comma;csc&equals;1&sol;sin&comma;sec&equals;1&sol;cos&comma;tan&equals;sin&sol;cos&comma;coth&equals;cosh&sol;sinh&comma;csch&equals;1&sol;sinh&comma;sech&equals;1&sol;cosh&comma;tanh&equals;sinh&sol;cosh&comma;tmp&semi;iflengthtmp2<=lengthtmpthenreturntmp2end ifend if&semi;returntmpend proc

(69)

ExteriorDerivative(sqrt(x^2));

dx

(70)

See Also

DifferentialGeometry

Tools

CalculationHistory

DGsetup

evalDG

latex