Items tagged with academic


for example, a__b+b__a+a__b^2,how i can choose the first and third.


Books free. Like!!!

Lenin Araujo Castillo

I'm back from presenting work in the "23rd Conference on Applications of Computer Algebra -2017" . It was a very interesting event. This fifth presentation, about "The Appell doubly hypergeometric functions", describes a very recent project I've been working at Maple, i.e. the very first complete computational implementation of the Appell doubly hypergeometric functions. This work appeared in Maple 2017. These functions have a tremendous potential in that, at the same time, they have a myriad of properties, and include as particular cases most of the existing mathematical language, and so they have obvious applications in integration, differential equations, and applied mathematics all around. I think these will be the functions of this XXI century, analogously to what happened with hypergeometric functions in the previous century.

At the end, there is a link to the presentation worksheet, with which one could open the sections and reproduce the presentation examples.

The four double-hypergeometric Appell functions,

a complete implementation in a computer algebra system


Edgardo S. Cheb-Terrab

Physics, Differential Equations and Mathematical Functions, Maplesoft


The four multi-parameter Appell functions, AppellF1 , AppellF2 , AppellF3  and AppellF4  are doubly hypergeometric functions that include as particular cases the 2F1 hypergeometric  and some cases of the MeijerG  function, and with them most of the known functions of mathematical physics. Appell functions have been popping up with increasing frequency in applications in quantum mechanics, molecular physics, and general relativity. In this talk, a full implementation of these functions in the Maple computer algebra system, including, for the first time, their numerical evaluation over the whole complex plane, is presented, with details about the symbolic and numerical strategies used.

Appell Functions (symbolic)



The main references:


P. Appel, J.Kamke de Feriet, "Fonctions hypergeometriques et Hyperspheriques", 1926


H. Srivastava, P.W. Karlsson, "Multiple Gaussian Hypergeometric Series", 1985


24 papers in the literature, ranging from 1882 to 2015


Definition and Symmetries


Polynomial and Singular Cases


Single Power Series with Hypergeometric Coefficients


Analytic Extension from the Appell Series to the Appell Functions


Euler-Type and Contiguity Identities


Appell Differential Equations


Putting all together


Problem: some formulas in the literature are wrong or miss the conditions indicating when are they valid (exchange with the Mathematics director of the DLMF - NIST)


Appell Functions (numeric)






Compute these Appell functions over the whole complex plane


Considering that this is a research problem, implement different methods and flexible optional arguments to allow for:

a) comparison between methods (both performance and correctness),

b) investigation of a single method in different circumstances.


Develop a computational structure that can be reused with other special functions (abstract code and provide the main options), and that could also be translated to C (so: only one numerical implementation, not 100 special function numerical implementations)

Limitation: the Maple original evalf command does not accept optional arguments


The cost of numerically evaluating an Appell function



If it is a special hypergeometric case, then between 1 to 2 hypergeometric functions


Next simplest case (series/recurrence below) 3 to 4 hypergeometric functions plus adding somewhat large formulas that involve only arithmetic operations up to 20,000 times (frequently less than 100 times)


Next simplest case: the formulas themselves are power series with hypergeometric function coefficients; these cases frequently converge rapidly but may involve the numerical evaluation of up to hundreds of hypergeometric functions to get the value of a single Appell function.


Strategy for the numerical evaluation of Appell functions (or other functions ...)



The numerical evaluation flows orderly according to:

1) check whether it is a singular case

2) check whether it is a special value

3) compute the value using a series derived from a recurrence related to the underlying ODE

4) perform an sum using an infinite sum formula, checking for convergence

5) perform the numerical integration of the ODE underlying the given Appell function

6) perform a sequence of concatenated Taylor series expansions





Numerical integration of an underlying differential equation (ODEs and dsolve/numeric)


Concatenated Taylor series expansions covering the whole complex plane




Improvements in the numerical evaluation of hypergeometric functions


Evalf: an organized structure to implement the numerical evaluation of special functions in general


To be done



Download Appell_Functions.pdf

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

I'm back from presenting work in the "23rd Conference on Applications of Computer Algebra -2017" . It was a very interesting event. This fourth presentation, about "The FunctionAdvisor: extending information on mathematical functions with computer algebra algorithms", describes the FunctionAdvisor project at Maple, a project I started working during 1998, where the key idea I am trying to explore is that we do not need to collect a gazillion of formulas but just core blocks of mathematical information surrounded by clouds of algorithms able to derive extended information from them. In this sense this is also unique piece of software: it can derive properties for rather general algebraic expressions, not just well known tabulated functions. The examples illustrate the idea.

At the end, there is a link to the presentation worksheet, with which one could open the sections and reproduce the presentation examples.

The FunctionAdvisor: extending information on mathematical functions

with computer algebra algorithms


Edgardo S. Cheb-Terrab

Physics, Differential Equations and Mathematical Functions, Maplesoft



A shift in paradigm is happening, from: encoding information into a database, to: encoding essential blocks of information together with algorithms within a computer algebra system. Then, the information is not only searchable but can also be recreated in many different ways and actually used to compute. This talk focuses on this shift in paradigm over a real case example: the digitizing of information regarding mathematical functions as the FunctionAdvisor project of the Maple computer algebra system.

The FunctionAdvisor (basic)


Beyond the concept of a database


" Mathematical functions, are defined by algebraic expressions. So consider algebraic expressions in general ..."

Formal power series for algebraic expressions


Differential polynomial forms for algebraic expressions


Branch cuts for algebraic expressions


The nth derivative problem for algebraic expressions


Conversion network for mathematical and algebraic expressions






Download FunctionAdvisor.pdf

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

I'm back from presenting work in the "23rd Conference on Applications of Computer Algebra -2017" . It was a very interesting event. This third presentation, about "Computer Algebra in Theoretical Physics", describes the Physics project at Maplesoft, also my first research project at University, that evolved into the now well-known Maple Physics package. This is a unique piece of software and perhaps the project I most enjoy working.

At the end, there is a link to the presentation worksheet, with which one could open the sections and reproduce the presentation examples.



Computer Algebra in Theoretical Physics


Edgardo S. Cheb-Terrab

Physics, Differential Equations and Mathematical Functions, Maplesoft




Generally speaking, physicists still experience that computing with paper and pencil is in most cases simpler than computing on a Computer Algebra worksheet. On the other hand, recent developments in the Maple system have implemented most of the mathematical objects and mathematics used in theoretical physics computations, and have dramatically approximated the notation used in the computer to the one used with paper and pencil, diminishing the learning gap and computer-syntax distraction to a strict minimum.


In this talk, the Physics project at Maplesoft is presented and the resulting Physics package is illustrated by tackling problems in classical and quantum mechanics, using tensor and Dirac's Bra-Ket notation, general relativity, including the equivalence problem, and classical field theory, deriving field equations using variational principles.





... and why computer algebra?


We can concentrate more on the ideas instead of on the algebraic manipulations


We can extend results with ease


We can explore the mathematics surrounding a problem


We can share results in a reproducible way


Representation issues that were preventing the use of computer algebra in Physics


Classical Mechanics


*Inertia tensor for a triatomic molecule


Quantum mechanics


*The quantum operator components of  `#mover(mi("L",mathcolor = "olive"),mo("→",fontstyle = "italic"))` satisfy "[L[j],L[k]][-]=i `ε`[j,k,m] L[m]"


*Unitary Operators in Quantum Mechanics


*Eigenvalues of an unitary operator and exponential of Hermitian operators


*Properties of unitary operators



Consider two set of kets " | a[n] >" and "| b[n] >", each of them constituting a complete orthonormal basis of the same space.

*Verify that "U=(&sum;) | b[k] >< a[k] |" , maps one basis to the other, i.e.: "| b[n] >=U | a[n] >"


*Show that "U=(&sum;) | b[k] > < a[k] | "is unitary


*Show that the matrix elements of U in the "| a[n] >" and  "| b[n] >" basis are equal


Show that A and `&Ascr;` = U*A*`#msup(mi("U"),mo("&dagger;"))`have the same spectrum (eigenvalues)


Schrödinger equation and unitary transform


Translation operators using Dirac notation


*Quantization of the energy of a particle in a magnetic field


Classical Field Theory


The field equations for the lambda*Phi^4 model


*Maxwell equations departing from the 4-dimensional Action for Electrodynamics


*The Gross-Pitaevskii field equations for a quantum system of identical particles


General Relativity


Exact Solutions to Einstein's Equations  Lambda*g[mu, nu]+G[mu, nu] = 8*Pi*T[mu, nu]


*"Physical Review D" 87, 044053 (2013)


The Equivalence problem between two metrics


*On the 3+1 split of the 4D Einstein equations


Tetrads and Weyl scalars in canonical form






Download Physics.pdf

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

I'm back from presenting work in the "23rd Conference on Applications of Computer Algebra - 2017" . It was a very interesting event. This second presentation, about "Differential algebra with mathematical functions, symbolic powers and anticommutative variables", describes a project I started working in 1997 and that is at the root of Maple's dsolve and pdsolve performance with systems of equations. It is a unique approach. Not yet emulated in any other computer algebra system.

At the end, there is a link to the presentation worksheet, with which one could open the sections and reproduce the presentation examples.

Differential algebra with mathematical functions,

symbolic powers and anticommutative variables


Edgardo S. Cheb-Terrab

Physics, Differential Equations and Mathematical Functions, Maplesoft


Computer algebra implementations of Differential Algebra typically require that the systems of equations to be tackled be rational in the independent and dependent variables and their partial derivatives, and of course that A*B = A*B, everything is commutative.


It is possible, however, to extend this computational domain and apply Differential Algebra techniques to systems of equations that involve arbitrary compositions of mathematical functions (elementary or special), fractional and symbolic powers, as well as anticommutative variables and functions. This is the subject of this presentation, with examples of the implementation of these ideas in the Maple computer algebra system and its ODE and PDE solvers.



restartwith(PDEtools); interface(imaginaryunit = i)

sys := [diff(xi(x, y), y, y) = 0, -6*(diff(xi(x, y), y))*y+diff(eta(x, y), y, y)-2*(diff(xi(x, y), x, y)) = 0, -12*(diff(xi(x, y), y))*a^2*y-9*(diff(xi(x, y), y))*a*y^2-3*(diff(xi(x, y), y))*b-3*(diff(xi(x, y), x))*y-3*eta(x, y)+2*(diff(eta(x, y), x, y))-(diff(xi(x, y), x, x)) = 0, -8*(diff(xi(x, y), x))*a^2*y-6*(diff(xi(x, y), x))*a*y^2+4*(diff(eta(x, y), y))*a^2*y+3*(diff(eta(x, y), y))*a*y^2-4*eta(x, y)*a^2-6*eta(x, y)*a*y-2*(diff(xi(x, y), x))*b+(diff(eta(x, y), y))*b-3*(diff(eta(x, y), x))*y+diff(eta(x, y), x, x) = 0]


declare((xi, eta)(x, y))

xi(x, y)*`will now be displayed as`*xi


eta(x, y)*`will now be displayed as`*eta


for eq in sys do eq end do

diff(diff(xi(x, y), y), y) = 0


-6*(diff(xi(x, y), y))*y+diff(diff(eta(x, y), y), y)-2*(diff(diff(xi(x, y), x), y)) = 0


-12*(diff(xi(x, y), y))*a^2*y-9*(diff(xi(x, y), y))*a*y^2-3*(diff(xi(x, y), y))*b-3*(diff(xi(x, y), x))*y-3*eta(x, y)+2*(diff(diff(eta(x, y), x), y))-(diff(diff(xi(x, y), x), x)) = 0


-8*(diff(xi(x, y), x))*a^2*y-6*(diff(xi(x, y), x))*a*y^2+4*(diff(eta(x, y), y))*a^2*y+3*(diff(eta(x, y), y))*a*y^2-4*eta(x, y)*a^2-6*eta(x, y)*a*y-2*(diff(xi(x, y), x))*b+(diff(eta(x, y), y))*b-3*(diff(eta(x, y), x))*y+diff(diff(eta(x, y), x), x) = 0



`casesplit/ans`([eta(x, y) = 0, diff(xi(x, y), x) = 0, diff(xi(x, y), y) = 0], [])



Differential polynomial forms for mathematical functions (basic)


Differential polynomial forms for compositions of mathematical functions


Generalization to many variables


Arbitrary functions of algebraic expressions


Examples of the use of this extension to include mathematical functions


Differential Algebra with anticommutative variables




Download DifferentialAlgebra.pdf

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


I'm back from presenting work in the "23rd Conference on Applications of Computer Algebra - 2017" . It was a very interesting event. This first presentation, about "Active Learning in High-School Mathematics using Interactive Interfaces", describes a project I started working 23 years ago, which I believe will be part of the future in one or another form. This is work actually not related to my work at Maplesoft.

At the end, there is a link to the presentation worksheet, with which one could open the sections and reproduce the presentation examples.


Active learning in High-School mathematics using Interactive Interfaces


Edgardo S. Cheb-Terrab

Physics, Differential Equations and Mathematical Functions, Maplesoft



The key idea in this project is to learn through exploration using a web of user-friendly Highly Interactive Graphical Interfaces (HIGI). The HIGIs, structured as trees of interlinked windows, present concepts using a minimal amount of text while maximizing the possibility of visual and analytic exploration. These interfaces run computer algebra software in the background. Assessment tools are integrated into the learning experience within the general conceptual map, the Navigator. This Navigator offers students self-assessment tools and full access to the logical sequencing of course concepts, helping them to identify any gaps in their knowledge and to launch the corresponding learning interfaces. An interactive online set of HIGIS of this kind can be used at school, at home, in distance education, and both individually and in a group.



Computer algebra interfaces for High-School students of "Colegio de Aplicação"  (UERJ/1994)





When we are the average high-school student facing mathematics, we tend to feel



Bored, fragmentarily taking notes, listening to a teacher for 50 or more minutes


Anguished because we do not understand some math topics (too many gaps accumulated)


Powerless because we don't know what to do to understand (don't have any instant-tutor to ask questions and without being judged for having accumulated gaps)


Stressed by the upcoming exams where the lack of understanding may become evident


Computer algebra environments can help in addressing these issues.




Be as active as it can get while learning at our own pace.


Explore at high speed and without feeling judged. There is space for curiosity with no computational cost.


Feel empowered by success. That leads to understanding.


Possibility for making of learning a social experience.


Interactive interfaces




Interactive interfaces do not replace the teacher - human learning is an emotional process. A good teacher leading good active learning is a positive experience a student will never forget



Not every computer interface is a valuable resource, at all. It is the set of pedagogical ideas implemented that makes an interface valuable (the same happens with textbooks)



A course on high school mathematics using interactive interfaces - the Edukanet project




Brazilian and Canadian students/programmers were invited to participate - 7 people worked in the project.



Some funding provided by the Brazilian Research agency CNPq.


-Develop a framework to develop the interfaces covering the last 3 years of high school mathematics (following the main math textbook used in public schools in Brazil)

- Design documents for the interfaces according to given pedagogical guidelines.

- Create prototypes of Interactive interfaces, running Maple on background, according to design document and specified layout (allow for everybody's input/changes).


The pedagogical guidelines for interactive interfaces


The Math-contents design documents for each chapter


Example: complex numbers


Each math topic:  a interactive interrelated interfaces (windows)



For each topic of high-school mathematics (chapter of a textbook), develop a tree of interactive interfaces (applets) related to the topic (main) and subtopics


Example: Functions



Main window



Analysis window




Parity window


Visualization of function's parity


Step-by-Step solution window

The Navigator: a window with a tile per math topic





Click the topic-tile to launch a smaller window, topic-specific, map of interrelated sub-topic tiles, that indicates the logical sequence for the sub-topics, and from where one could launch the corresponding sub-topic interactive interface.


This topic-specific smaller window allows for identifying the pre-requisites and gaps in understanding, launching the corresponding interfaces to fill the gaps, and tracking the level of familiarity with a topic.






The framework to create the interfaces: a version of NetBeans on steroids ...


Complementary classroom activity on a computer algebra worksheet



This course is organized as a guided experience, 2 hours per day during five days, on learning the basics of the Maple language, and on using it to formulate algebraic computations we do with paper and pencil in high school and 1st year of undergraduate science courses.


Explore. Having success doesn't matter, using your curiosity as a compass does - things can be done in so many different ways. Have full permission to fail. Share your insights. All questions are valid even if to the side. Computer algebra can transform the learning of mathematics into interesting understanding, success and fun.

1. Arithmetic operations and elementary functions


2. Algebraic Expressions, Equations and Functions


3. Limits, Derivatives, Sums, Products, Integrals, Differential Equations


4. Algebraic manipulation: simplify, factorize, expand


5. Matrices (Linear Algebra)



Advanced students: guiding them to program mathematical concepts on a computer algebra worksheet


Status of the project



Prototypes of interfaces built cover:



Natural numbers




Integer numbers


Rational numbers


Absolute value




Numerical sequences








Linear systems






Derivative of the inverse function


The point in Cartesian coordinates


The line


The circle


The ellipse


The parabole


The hyperbole


The conics

More recent computer algebra frameworks: Maple Mobius for online courses and automated evaluation





Download Computer_Algebra_in_Education.pdf

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Do you have Maple content that you want to protect from editing and viewing, while still allowing others to execute the code within and obtain results? In Maple, worksheets can be password protected so the users of your Maple application can benefit from the specialized routines you've created while the details remain hidden.

The password protection feature can be useful for a variety of situations, such as:

  • • Providing a Maple-based solution while protecting the intellectual property embodied in your algorithms
  • • Ensuring the users of your application can not accidentally make changes that break your code


To learn more about this feature in Maple, you can download the free Tips & Techniques from the Application Center.





Maple provides a state-of-the-art environment for algebraic and tensorial computations in Physics, with emphasis on ensuring that the computational experience is as natural as possible.


The theme of the Physics project for Maple 2017 has been the consolidation of the functionality introduced in previous releases, together with significant enhancements and new functionality in General Relativity, in connection with classification of solutions to Einstein's equations and tensor representations to work in an embedded 3D curved space - a new ThreePlusOne  package. This package is relevant in numerical relativity and a Hamiltonian formulation of gravity. The developments also include first steps in connection with computational representations for all the objects entering the Standard Model in particle physics.

Classification of solutions to Einstein's equations and the Tetrads package


In Maple 2016, the digitizing of the database of solutions to Einstein's equations  was finished, added to the standard Maple library, with all the metrics from "Stephani, H.; Kramer, D.; MacCallum, M.; Hoenselaers, C.; and Herlt, E., Exact Solutions to Einstein's Field Equations". These metrics can be loaded to work with them, or change them, or searched using g_  (the Physics command representing the spacetime metric that also sets the metric to your choice in one go) or using the command DifferentialGeometry:-Library:-MetricSearch .

In Maple 2017, the Physics:-Tetrads  package has been vastly improved and extended, now including new commands like PetrovType  and SegreType  to classify these metrics, and the TransformTetrad  now has an option canonicalform to automatically derive a transformation and put the tetrad in canonical form (reorientation of the axis of the local system of references), a relevant step in resolving the equivalence between two metrics.



Petrov and Segre types, tetrads in canonical form


Equivalence for Schwarzschild metric (spherical and Kruskal coordinates)


Formulation of the problem (remove mixed coordinates)


Solving the Equivalence


The ThreePlusOne (3 + 1) new Maple 2017 Physics package


ThreePlusOne , is a package to cast Einstein's equations in a 3+1 form, that is, representing spacetime as a stack of nonintersecting 3-hypersurfaces Σ. This 3+1 description is key in the Hamiltonian formulation of gravity as well as in the study of gravitational waves, black holes, neutron stars, and in general to study the evolution of physical system in general relativity by running numerical simulations as traditional initial value (Cauchy) problems. ThreePlusOne includes computational representations for the spatial metric gamma[i, j] that is induced by g[mu, nu] on the 3-dimensional hypersurfaces, and the related covariant derivative, Christoffel symbols and Ricci and Riemann tensors, the Lapse, Shift, Unit normal and Time vectors and Extrinsic curvature related to the ADM equations.


The following is a list of the available commands:















The other four related new Physics  commands:



Decompose , to decompose 4D tensorial expressions (free and/or contracted indices) into the space and time parts.


gamma_ , representing the three-dimensional metric tensor, with which the element of spatial distance is defined as  `#mrow(msup(mi("dl"),mrow(mo("&InvisibleTimes;"),mn("2"))),mo("&equals;"),msub(mi("&gamma;",fontstyle = "normal"),mrow(mi("i"),mo("&comma;"),mi("j"))),mo("&InvisibleTimes;"),msup(mi("dx"),mi("i")),mo("&InvisibleTimes;"),msup(mi("dx"),mi("j")))`.


Redefine , to redefine the coordinates and the spacetime metric according to changes in the signature from any of the four possible signatures(− + + +), (+ − − −), (+ + + −) and ((− + + +) to any of the other ones.


EnergyMomentum , is a computational representation for the energy-momentum tensor entering Einstein's equations as well as their 3+1 form, the ADMEquations .




restart; with(Physics); Setup(coordinatesystems = cartesian)

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (x, y, z, t)}


`Systems of spacetime Coordinates are: `*{X = (x, y, z, t)}


[coordinatesystems = {X}]



`Setting lowercaselatin_is letters to represent space indices `


0, "%1 is not a command in the %2 package", ThreePlusOne, Physics


`Changing the signature of spacetime from `(`- - - +`)*` to `(`+ + + -`)*` in order to match the signature customarily used in the ADM formalism`


[ADMEquations, Christoffel3, D3_, ExtrinsicCurvature, Lapse, Ricci3, Riemann3, Shift, TimeVector, UnitNormalVector, gamma3_]


Note the different color for gamma[mu, nu], now a 4D tensor representing the metric of a generic 3-dimensional hypersurface induced by the 4D spacetime metric g[mu, nu]. All the ThreePlusOne tensors are displayed in black to distinguish them of the corresponding 4D or 3D tensors. The particular hypersurface gamma[mu, nu] operates is parameterized by the Lapse  alpha and the Shift  beta[mu].

The induced metric gamma[mu, nu]is defined in terms of the UnitNormalVector  n[mu] and the 4D metric g[mu, nu] as


Physics:-ThreePlusOne:-gamma3_[mu, nu] = Physics:-ThreePlusOne:-UnitNormalVector[mu]*Physics:-ThreePlusOne:-UnitNormalVector[nu]+Physics:-g_[mu, nu]


where n[mu] is defined in terms of the Lapse  alpha and the derivative of a scalar function t that can be interpreted as a global time function


Physics:-ThreePlusOne:-UnitNormalVector[mu] = -Physics:-ThreePlusOne:-Lapse*Physics:-D_[mu](t)


The TimeVector  is defined in terms of the Lapse  alpha and the Shift  beta[mu] and this vector  n[mu] as


Physics:-ThreePlusOne:-TimeVector[mu] = Physics:-ThreePlusOne:-Lapse*Physics:-ThreePlusOne:-UnitNormalVector[mu]+Physics:-ThreePlusOne:-Shift[mu]


The ExtrinsicCurvature  is defined in terms of the LieDerivative  of  gamma[mu, nu]


Physics:-ThreePlusOne:-ExtrinsicCurvature[mu, nu] = -(1/2)*Physics:-LieDerivative[Physics:-ThreePlusOne:-UnitNormalVector](Physics:-ThreePlusOne:-gamma3_[mu, nu])


The metric gamma[mu, nu]is also a projection tensor in that it projects 4D tensors into the 3D hypersurface Σ. The definition for any 4D tensor that is also a 3D tensor in Σ, can thus be written directly by contracting their indices with gamma[mu, nu]. In the case of Christoffel3 , Ricci3  and Riemann3,  these tensors can be defined by replacing the 4D metric g[mu, nu] by gamma[mu, nu] and the 4D Christoffel symbols GAMMA[mu, nu, alpha] by the ThreePlusOne GAMMA[mu, nu, alpha] in the definitions of the corresponding 4D tensors. So, for instance


Physics:-ThreePlusOne:-Christoffel3[mu, nu, alpha] = (1/2)*Physics:-ThreePlusOne:-gamma3_[mu, `~beta`]*(Physics:-d_[alpha](Physics:-ThreePlusOne:-gamma3_[beta, nu], [X])+Physics:-d_[nu](Physics:-ThreePlusOne:-gamma3_[beta, alpha], [X])-Physics:-d_[beta](Physics:-ThreePlusOne:-gamma3_[nu, alpha], [X]))



Physics:-ThreePlusOne:-Ricci3[mu, nu] = Physics:-d_[alpha](Physics:-ThreePlusOne:-Christoffel3[`~alpha`, mu, nu], [X])-Physics:-d_[nu](Physics:-ThreePlusOne:-Christoffel3[`~alpha`, mu, alpha], [X])+Physics:-ThreePlusOne:-Christoffel3[`~beta`, mu, nu]*Physics:-ThreePlusOne:-Christoffel3[`~alpha`, beta, alpha]-Physics:-ThreePlusOne:-Christoffel3[`~beta`, mu, alpha]*Physics:-ThreePlusOne:-Christoffel3[`~alpha`, nu, beta]



Physics:-ThreePlusOne:-Riemann3[mu, nu, alpha, beta] = Physics:-g_[mu, lambda]*(Physics:-d_[alpha](Physics:-ThreePlusOne:-Christoffel3[`~lambda`, nu, beta], [X])-Physics:-d_[beta](Physics:-ThreePlusOne:-Christoffel3[`~lambda`, nu, alpha], [X])+Physics:-ThreePlusOne:-Christoffel3[`~lambda`, upsilon, alpha]*Physics:-ThreePlusOne:-Christoffel3[`~upsilon`, nu, beta]-Physics:-ThreePlusOne:-Christoffel3[`~lambda`, upsilon, beta]*Physics:-ThreePlusOne:-Christoffel3[`~upsilon`, nu, alpha])


When working with the ADM formalism, the line element of an arbitrary spacetime metric can be expressed in terms of the differentials of the coordinates dx^mu, the Lapse , the Shift  and the spatial components of the 3D metric gamma3_ . From this line element one can derive the relation between the Lapse , the spatial part of the Shift , the spatial part of the gamma3_  metric and the g[0, j] components of the 4D spacetime metric.

For this purpose, define a tensor representing the differentials of the coordinates and an alias  dt = `#msup(mi("dx"),mn("0"))`


`Defined objects with tensor properties`


{Physics:-ThreePlusOne:-D3_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-ThreePlusOne:-Ricci3[mu, nu], Physics:-ThreePlusOne:-Shift[mu], Physics:-d_[mu], dx[mu], Physics:-g_[mu, nu], Physics:-ThreePlusOne:-gamma3_[mu, nu], Physics:-gamma_[i, j], Physics:-ThreePlusOne:-Christoffel3[mu, nu, alpha], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-ThreePlusOne:-Riemann3[mu, nu, alpha, beta], Physics:-ThreePlusOne:-TimeVector[mu], Physics:-ThreePlusOne:-ExtrinsicCurvature[mu, nu], Physics:-ThreePlusOne:-UnitNormalVector[mu], Physics:-SpaceTimeVector[mu](X)}


"alias(dt = dx[~0]):"

The expression for the line element in terms of the Lapse  and Shift   is (see [2], eq.(2.123))

ds^2 = (-Lapse^2+Shift[i]^2)*dt^2+2*Shift[i]*dt*dx[`~i`]+gamma_[i, j]*dx[`~i`]*dx[`~j`]

ds^2 = (-Physics:-ThreePlusOne:-Lapse^2+Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`])*dt^2+2*Physics:-ThreePlusOne:-Shift[i]*dt*dx[`~i`]+Physics:-gamma_[i, j]*dx[`~i`]*dx[`~j`]


Compare this expression with the 3+1 decomposition of the line element in an arbitrary system. To avoid the automatic evaluation of the metric components, work with the inert form of the metric %g_

ds^2 = %g_[mu, nu]*dx[`~mu`]*dx[`~nu`]

ds^2 = %g_[mu, nu]*dx[`~mu`]*dx[`~nu`]


Decompose(ds^2 = %g_[mu, nu]*dx[`~mu`]*dx[`~nu`])

ds^2 = %g_[0, 0]*dt^2+%g_[0, j]*dt*dx[`~j`]+%g_[i, 0]*dt*dx[`~i`]+%g_[i, j]*dx[`~i`]*dx[`~j`]


The second and third terms on the right-hand side are equal

op(2, rhs(ds^2 = dt^2*%g_[0, 0]+dt*%g_[0, j]*dx[`~j`]+dt*%g_[i, 0]*dx[`~i`]+%g_[i, j]*dx[`~i`]*dx[`~j`])) = op(3, rhs(ds^2 = dt^2*%g_[0, 0]+dt*%g_[0, j]*dx[`~j`]+dt*%g_[i, 0]*dx[`~i`]+%g_[i, j]*dx[`~i`]*dx[`~j`]))

%g_[0, j]*dt*dx[`~j`] = %g_[i, 0]*dt*dx[`~i`]


subs(%g_[0, j]*dt*dx[`~j`] = %g_[i, 0]*dt*dx[`~i`], ds^2 = dt^2*%g_[0, 0]+dt*%g_[0, j]*dx[`~j`]+dt*%g_[i, 0]*dx[`~i`]+%g_[i, j]*dx[`~i`]*dx[`~j`])

ds^2 = %g_[0, 0]*dt^2+2*%g_[i, 0]*dt*dx[`~i`]+%g_[i, j]*dx[`~i`]*dx[`~j`]


Taking the difference between this expression and the one in terms of the Lapse  and Shift  we get

simplify((ds^2 = dt^2*%g_[0, 0]+2*dt*%g_[i, 0]*dx[`~i`]+%g_[i, j]*dx[`~i`]*dx[`~j`])-(ds^2 = (-Physics:-ThreePlusOne:-Lapse^2+Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`])*dt^2+2*Physics:-ThreePlusOne:-Shift[i]*dt*dx[`~i`]+Physics:-gamma_[i, j]*dx[`~i`]*dx[`~j`]))

0 = (Physics:-ThreePlusOne:-Lapse^2-Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`]+%g_[0, 0])*dt^2+2*dx[`~i`]*(%g_[i, 0]-Physics:-ThreePlusOne:-Shift[i])*dt-dx[`~i`]*dx[`~j`]*(Physics:-gamma_[i, j]-%g_[i, j])


Taking coefficients, we get equations for the Shift , the Lapse  and the spatial components of the metric gamma3_

eq[1] := coeff(coeff(rhs(0 = (Physics:-ThreePlusOne:-Lapse^2-Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`]+%g_[0, 0])*dt^2+2*dx[`~i`]*(%g_[i, 0]-Physics:-ThreePlusOne:-Shift[i])*dt-dx[`~i`]*dx[`~j`]*(Physics:-gamma_[i, j]-%g_[i, j])), dt), dx[`~i`]) = 0

2*%g_[i, 0]-2*Physics:-ThreePlusOne:-Shift[i] = 0


eq[2] := coeff(rhs(0 = (Physics:-ThreePlusOne:-Lapse^2-Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`]+%g_[0, 0])*dt^2+2*dx[`~i`]*(%g_[i, 0]-Physics:-ThreePlusOne:-Shift[i])*dt-dx[`~i`]*dx[`~j`]*(Physics:-gamma_[i, j]-%g_[i, j])), dt^2)

Physics:-ThreePlusOne:-Lapse^2-Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`]+%g_[0, 0]


eq[3] := coeff(coeff(rhs(0 = (Physics:-ThreePlusOne:-Lapse^2-Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`]+%g_[0, 0])*dt^2+2*dx[`~i`]*(%g_[i, 0]-Physics:-ThreePlusOne:-Shift[i])*dt-dx[`~i`]*dx[`~j`]*(Physics:-gamma_[i, j]-%g_[i, j])), dx[`~i`]), dx[`~j`]) = 0

-Physics:-gamma_[i, j]+%g_[i, j] = 0


Using these equations, these quantities can all be expressed in terms of the time and space components of the 4D metric g[0, 0] and g[i, j]

isolate(eq[1], Shift[i])

Physics:-ThreePlusOne:-Shift[i] = %g_[i, 0]


isolate(eq[2], Lapse^2)

Physics:-ThreePlusOne:-Lapse^2 = Physics:-ThreePlusOne:-Shift[i]*Physics:-ThreePlusOne:-Shift[`~i`]-%g_[0, 0]


isolate(eq[3], gamma_[i, j])

Physics:-gamma_[i, j] = %g_[i, j]




[1] Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.


[2] Alcubierre, M., Introduction to 3+1 Numerical Relativity, International Series of Monographs on Physics 140, Oxford University Press, 2008.


[3] Baumgarte, T.W., Shapiro, S.L., Numerical Relativity, Solving Einstein's Equations on a Computer, Cambridge University Press, 2010.


[4] Gourgoulhon, E., 3+1 Formalism and Bases of Numerical Relativity, Lecture notes, 2007,


[5] Arnowitt, R., Dese, S., Misner, C.W., The Dynamics of General Relativity, Chapter 7 in Gravitation: an introduction to current research (Wiley, 1962),



Examples: Decompose, gamma_



Setup(mathematicalnotation = true)

[mathematicalnotation = true]


Define  now an arbitrary tensor A


`Defined objects with tensor properties`


{A, Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu]}


So A^mu is a 4D tensor with only one free index, where the position of the time-like component is the position of the different sign in the signature, that you can query about via


[signature = `- - - +`]


To perform a decomposition into space and time, set - for instance - the lowercase latin letters from i to s to represent spaceindices and

Setup(spaceindices = lowercase_is)

[spaceindices = lowercaselatin_is]


Accordingly, the 3+1 decomposition of A^mu is


Array(%id = 18446744078724512334)


The 3+1 decomposition of the inert representation %g_[mu,nu] of the 4D spacetime metric; use the inert representation when you do not want the actual components of the metric appearing in the output

Decompose(%g_[mu, nu])

Matrix(%id = 18446744078724507998)


Note the position of the component %g_[0, 0], related to the trailing position of the time-like component in the signature "(- - - +)".

Compare the decomposition of the 4D inert with the decomposition of the 4D active spacetime metric


g[mu, nu] = (Matrix(4, 4, {(1, 1) = -1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -1, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1}))


Decompose(g_[mu, nu])

Matrix(%id = 18446744078724494270)


Note that in general the 3D space part of g[mu, nu] is not equal to the 3D metric gamma[i, j] whose definition includes another term (see [1] Landau & Lifshitz, eq.(84.7)).


Physics:-gamma_[i, j] = -Physics:-g_[i, j]+Physics:-g_[0, i]*Physics:-g_[0, j]/Physics:-g_[0, 0]


The 3D space part of -g[`~mu`, `~nu`] is actually equal to the 3D metric "gamma[]^(i,j)"


Physics:-gamma_[`~i`, `~j`] = -Physics:-g_[`~i`, `~j`]


To derive the formula  for the covariant components of the 3D metric, Decompose into 3+1 the identity

%g_[`~alpha`, `~mu`]*%g_[mu, beta] = KroneckerDelta[`~alpha`, beta]

%g_[`~alpha`, `~mu`]*%g_[mu, beta] = Physics:-KroneckerDelta[beta, `~alpha`]


To the side, for illustration purposes, these are the 3 + 1 decompositions, first excluding the repeated indices, then excluding the free indices

Eq := Decompose(%g_[`~alpha`, `~mu`]*%g_[mu, beta] = Physics[KroneckerDelta][beta, `~alpha`], repeatedindices = false)

Matrix(%id = 18446744078132963318)


Eq := Decompose(%g_[`~alpha`, `~mu`]*%g_[mu, beta] = Physics[KroneckerDelta][beta, `~alpha`], freeindices = false)

%g_[0, beta]*%g_[`~alpha`, `~0`]+%g_[i, beta]*%g_[`~alpha`, `~i`] = Physics:-KroneckerDelta[beta, `~alpha`]


Compare with a full decomposition

Eq := Decompose(%g_[`~alpha`, `~mu`]*%g_[mu, beta] = Physics[KroneckerDelta][beta, `~alpha`])

Matrix(%id = 18446744078724489454)


Eq is a symmetric matrix of equations involving non-contracted occurrences of `#msup(mi("g"),mrow(mn("0"),mo("&comma;"),mn("0")))`, `#msup(mi("g"),mrow(mi("j"),mo("&comma;"),mo("0")))` and `#msup(mi("g"),mrow(mi("j"),mo("&comma;"),mi("i")))`. Isolate, in Eq[1, 2], `#msup(mi("g"),mrow(mi("j"),mo("&comma;"),mo("0")))`, that you input as %g_[~j, ~0], and substitute into Eq[1, 1]

"isolate(Eq[1, 2], `%g_`[~j, ~0]);"

%g_[`~j`, `~0`] = -%g_[i, 0]*%g_[`~j`, `~i`]/%g_[0, 0]


subs(%g_[`~j`, `~0`] = -%g_[i, 0]*%g_[`~j`, `~i`]/%g_[0, 0], Eq[1, 1])

-%g_[0, k]*%g_[i, 0]*%g_[`~j`, `~i`]/%g_[0, 0]+%g_[i, k]*%g_[`~j`, `~i`] = Physics:-KroneckerDelta[k, `~j`]


Collect `#msup(mi("g"),mrow(mi("j"),mo("&comma;"),mi("i")))`, that you input as %g_[~j, ~i]

collect(-%g_[0, k]*%g_[i, 0]*%g_[`~j`, `~i`]/%g_[0, 0]+%g_[i, k]*%g_[`~j`, `~i`] = Physics[KroneckerDelta][k, `~j`], %g_[`~j`, `~i`])

(-%g_[0, k]*%g_[i, 0]/%g_[0, 0]+%g_[i, k])*%g_[`~j`, `~i`] = Physics:-KroneckerDelta[k, `~j`]


Since the right-hand side is the identity matrix and, from , `#msup(mi("g"),mrow(mi("i"),mo("&comma;"),mi("j")))` = -`#msup(mi("&gamma;",fontstyle = "normal"),mrow(mi("i"),mo("&comma;"),mi("j")))`, the expression between parenthesis, multiplied by -1, is the reciprocal of the contravariant 3D metric `#msup(mi("&gamma;",fontstyle = "normal"),mrow(mi("i"),mo("&comma;"),mi("j")))`, that is the covariant 3D metric gamma[i, j], in accordance to its definition for the signature `- - - +`


Physics:-gamma_[i, j] = -Physics:-g_[i, j]+Physics:-g_[0, i]*Physics:-g_[0, j]/Physics:-g_[0, 0]





[1] Landau, L.D., and Lifshitz, E.M. The Classical Theory of Fields, Course of Theoretical Physics Volume 2, fourth revised English edition. Elsevier, 1975.

Example: Redefine


Tensors in Special and General Relativity


A number of relevant changes happened in the tensor routines of the Physics package, towards making the routines pack more functionality both for special and general relativity, as well as working more efficiently and naturally, based on Maple's Physics users' feedback collected during 2016.

New functionality


Implement conversions to most of the tensors of general relativity (relevant in connection with functional differentiation)


New setting in the Physics Setup  allows for specifying the cosmologicalconstant and a default tensorsimplifier



Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

I am thinking about buying maple 2017 however there are only 4 different categories to choose from when you want to buy: student, commercial, academic and government. I dont belong to any of them! Also the price difference is huge! I am on disability benefits and the academic license cost more or less the same amount that I get in disability benifts each month to cover my food, rent and medicines which is approximatly 1 100 usd. The price for a student licens is completely realistic and is a price that I am willing to pay but I am not a student and I dont feel comfortable claiming that I am even though everyone is a student as long as they live. When you stop learning you life is more or less over anyway. If I am forced to pay around 1 000 usd then I am not going to buy maple 2017. Then I am just going to continue using MathPapa free algbra calculator because to be honest I dont really need maple that much in my research today but there are a couple of reaons why I want to buy. 1) I would like to support maplesoft because I think you have the best and most userfriendly mathematical software on the market. 2) I want to hedge my bets. My needs might change in the future. 3) I want to be able to run my large number of old worksheets and see if I can improve them. 4) I want to see what changes and improvments have been made to maple 2017 compared to let say 5 years ago and to assess if these changes provide any value to me. 

How can I accelerate the convergence rate of the following series:

Here is a problem from SEEMOUS 2017 (South Eastern European Mathematical Olympiad for University Students)
which Maple can solve (with a little help).

For k a fixed nonnegative integer, compute:

Sum( binomial(i,k) * ( exp(1) - Sum(1/j!, j=0..i) ), i=k..infinity );

(It is the last one, theoretically the most difficult.)

In the present work it has been shown how Maple helps in the teaching of Mathematics in the different subjects that it has. Using a Maple worksheet as if it were a class preparation notebook could develop problems such as: Vector Analysis, EDO, EDP, Statistics, Algebra, Geometry, etc., among others; Taking as a method of solution the clickable-mathpopup, the right click (contextual) or at best embedded components. No criteria or prerequisite is needed to use Maple; Rather than being willing to forget the traditional slate and down and replace it with dynamic leaves that maple offers us; To achieve excellent academic profiles both individually and in groups. The proprietary methods are used to develop applications (math-apps) being a professional criterion; That is to say, according to the problematic reality, we are looking for enduring interactive solutions. Here we use the graphical algorithm and the block diagram as a solution proposal but not as something obligatory to implement solutions. We take as a teaching-learning measure the results of our students in the ability to analyze and interpret the results; Since in the times of calculation; Maple helps tremendously; Opening up this way to train students competent in basic sciences and engineering.



In Spanish

Lenin Araujo Castillo

Ambassador of Maple - Perú




I am a maths teacher and would like to create an ebook for my students with explanations, examples and quizes in the same time. They should be able to access and work through it, even on mobile devices, using the free Maple player. I am new in Maple and don't know if all this is possible. I would like to see some samples of code to learn from and of course, some advice. I would highly apprecaite your support. Thank you.

Let us consider 

Student[Precalculus]:-LimitTutor(sqrt(x), x = 2);

One expects a nice illustration of the result sqrt(2). But instead of that one reads "f(x) approaches 1.41 as x approaches 2". This is simply clueless and forms a wrong understanding of limits. It should also be noticed that all the entries (left, 2-sided, and right) produce the same animation. The same issue with other limits I tried, e.g.

Student[Precalculus]:-LimitTutor(sqrt(x), x = 1);

. I think this command should be completely rewritten or excluded from Maple. 

1 2 3 4 5 6 7 Last Page 1 of 27