ecterrab

14540 Reputation

24 Badges

20 years, 24 days

MaplePrimes Activity


These are Posts that have been published by ecterrab

I thought it would be interesting to review what happened with Physics in Maple during 2013. The proposed theme for the Physics project was the consolidation and integration of the package with the rest of the Maple library. There were more than 500 changes, enhancements in most of the Physics commands, plus 17 new Physics:-Library commands. The impact of these changes is across the board, from Vector Analysis to Quantum Mechanics, Relativity and Field Theory.

Consolidation of the Physics package is about making it robust and versatile in real case scenarios. With the launch of the Physics: Research and Development updates webpage, Maplesoft has pioneered feedback, adjustments in the package and new developments provided around the clock for all of its users. The result of this accelerated exchange with people around the world is what you find in Maple's updated Physics today.

In addition to changes improving the functionality in mathematical-physics, changes were introduced towards making the computational experience as natural as possible, now including textbook-like typesetting of inert forms for the whole mathematical language and vectorial differential operators.

Physics doubled in size in Maple 16, almost doubled again in Maple 17, and during 2013 Physics received the largest number of changes ever in the package in one year. We are aiming for real to provide a state-of-the-art environment for algebraic computations in Physics. The links at the end show the same but with the Examples sections expanded.

Simplify

 

Simplification is perhaps the most common operation performed in a computer algebra system. In Physics, this typically entails simplifying tensorial expressions, or expressions involving noncommutative operators that satisfy certain commutator/anticommutator rules, or sums and integrals involving quantum operators and Dirac delta functions in the summands and integrands. Relevant enhancements were introduced for all these cases.

Examples

   

4-Vectors, Substituting Tensors

 

In Maple 17, it is possible to define a tensor with a tensorial equation, where the tensor being defined is on the left-hand side. Then, on the right-hand side, you write either a tensorial expression with free and repeated indices, or a Matrix or Array with the components themselves. With the updated Physics, you can also define a 4-Vector with a tensorial equation, where you indicate the vector's components on the right-hand side as a list.

One new Library routine specialized for tensor substitutions was added to the Maple library: SubstituteTensor, which substitutes the equation(s) Eqs into an expression, taking care of the free and repeated indices, such that: 1) equations in Eqs are interpreted as mappings having the free indices as parameters, and 2) repeated indices in Eqs do not clash with repeated indices in the expression. This new routine can also substitute algebraic sub-expressions of type product or sum within the expression, generalizing and unifying the functionality of the subs and algsubs  commands for algebraic tensor expressions.

Examples

   

Functional Differentiation

 

The Physics:-Fundiff command for functional differentiation has been extended to handle all the complex components ( abs , argument , conjugate , Im , Re , signum ) and vectorial differential operators in order to compute field equations using variational principles when the field function enters the Lagrangian together with its conjugate. For an example illustrating the use of the new capabilities in the context of a more general problem, see the MaplePrimes post Quantum Mechanics using Computer Algebra.

Examples

   

More Metrics in the Database of Solutions to Einstein's Equations

 

A database of solutions to Einstein's equations  was added to the Maple library in Maple 15 with a selection of metrics from "Stephani, H.; Kramer, D.; MacCallum, M.; Hoenselaers, C.; and Herlt, E.,  Exact Solutions to Einstein's Field Equations" and "Hawking, Stephen; and Ellis, G. F. R., The Large Scale Structure of Space-Time". More metrics from these two books were added for Maple 16 and Maple 17. These metrics can be searched using the command DifferentialGeometry:-Library:-MetricSearch, or directly using g_ (the Physics command representing the spacetime metric that also sets the metric to your choice).

• 

With the updated Physics, fifty more metrics are available in the database from Chapter 28 of the aformentioned book entitled "Exact Solutions to Einstein's Field Equations".

• 

It is now possible to list all the metrics of a chapter by indexing the metric command with the chapter's number, for example, entering g_["28"].

Examples

   

Commutators, AntiCommutators

 

When computing with products of noncommutative operators, the results depend on the algebra of commutators and anticommutators that you previously set. Besides that, in Physics, various mathematical objects themselves satisfy specific commutation rules. You can query about these rules using the Library commands Commute and Anticommute. Previously existing functionality and enhancements in this area were refined and implemented during 2013. Among them:

• 

Both Commutator and AntiCommutator now accept matrices as arguments.

• 

The AntiCommutator of products of fermionic operators - for instance annihilation and creation operators - is now derived automatically from the intrinsic anticommutation rules they satisfy.

• 

Commutators and Anticommutators of vectorial quantum operators `#mover(mi("A",mathcolor = "olive"),mo("→"))`, `#mover(mi("B",mathcolor = "olive"),mo("→"))`, are now implemented and expressed using the dot (scalar) product, as in Physics:-Commutator(`#mover(mi("A",mathcolor = "olive"),mo("→"))`, `#mover(mi("B",mathcolor = "olive"),mo("→"))`) = `#mover(mi("A",mathcolor = "olive"),mo("→"))`.`#mover(mi("B",mathcolor = "olive"),mo("→"))`-`#mover(mi("B",mathcolor = "olive"),mo("→"))`.`#mover(mi("A",mathcolor = "olive"),mo("→"))`

• 

If two noncommutative operators a and S  satisfy "[a^(†),S][-]=0" , then the commutator  "[a,S^(†)][-]" is automatically taken equal to 0; if in addition S is Hermitian, then  "[a,S][-]"is also automatically taken equal to zero.

Examples

   

Expand and Combine

 

In the context of Physics, the expansion and recombination of algebraic expressions requires additional care: products may involve non-commutative operators and then some of the standard expansion and combination rules do not apply, or apply differently. Similarly, the expansion of vectorial operators also follows special rules. During 2013, many of these algebraic operations were reviewed and related special formulas (such as Glauber's and Haussdorf's) were implemented.

Examples

   

New Enhanced Modes in Physics Setup

 

Four enhanced modes were added to the Physics setup. With these modes, you can:

1. 

Indicate the real objects of a computation.

2. 

Automatically combine powers of the same base.

3. 

Set Maple to take z and its conjugate, "z," as independent variables and in equal footing; this is Wirtinger calculus.

4. 

Redefine the sum command in order to perform multi-index summation.

These options combined provide flexibility, subsequently making the Physics environment more expressive.

Real Objects

   

Combining Powers of the Same Base

   

Complex variables: z and conjugate(z) in equal footing

   

Redefine Sum for Multi-Index Summation

   

Dagger

 

Physics:-Dagger now has the same shortcut notation of Hermitian transpose , which acts on Vectors, vector products, equations, and automatically maps over the arguments of derivatives when the differentiation variables are real.

Examples

   

Vectors Package

 

A number of changes were performed in the Vectors subpackage to make the computations more natural and versatile:

• 

You can now use geometrical coordinates indexed, as in r[j], to represent mathematical objects unrelated to the coordinates themselves (in this case the spherical coordinate r).  This is a more appropriate mimicry of the way we compute with paper and pencil.

• 

Integrate the Vectors package commands with assuming and accept a tensor with 1 index (of type Library:-PhysicsType:-Tensor, defined using Define) as a possible abstract representation of the kth component of a vector.

• 

When V is a vector of the Physics:-Vectors package, make its absolute value abs(V), compute automatically using Physics:-Vectors:-Norm

• 

For an arbitrary vector  `#mover(mi("A"),mo("→"))`, make its Norm LinearAlgebra[Norm](`#mover(mi("A"),mo("→"))`) = "A*(A)," and introduce a new option conjugate to Norm, to specify whether to use `#mover(mi("A"),mo("→"))`.conjugate(`#mover(mi("A"),mo("→"))`) or `#mover(mi("A"),mo("→"))`.`#mover(mi("A"),mo("→"))` when computing LinearAlgebra[Norm](`#mover(mi("A"),mo("→"))`).

• 

When `#mover(mi("A",mathcolor = "olive"),mo("→"))` is a quantum operator, Norm returns using Dagger instead of conjugate.

• 

Commutators and Anticommutators of vectorial quantum operators `#mover(mi("A",mathcolor = "olive"),mo("→"))`, `#mover(mi("B",mathcolor = "olive"),mo("→"))`, are now implemented and expressed using the dot (scalar) product, as in "[A,B][-]=A*B-B*A . "

• 

New PhysicsVectors type in the Library of types Library:-PhysicsTypes, in order to programmatically identify vectors of the Physics:-Vectors package.

 

Two examples illustrating the use of the new capabilities in the context of a more general problem are found in the MaplePrimes posts Quantum Mechanics using Computer Algebra and Quantum Mechanics (II).

Examples

   

Library

 

Seventeen new commands, useful for programming and interactive computation, were added to the Physics:-Library package. These are:

• 

Add unifies the standard add and sum commands using a more modern handling of arguments, free of premature evaluation problems, and brings new multi-index functionality.

• 

ApplyCommandUsingImplicitAssumptions applies any command to expressions containing sums, integrals or products such that the command is applied to the summand (integrand or 1st argument of the product) taking into account the assumptions implicit in the summation (integration or product) range.

• 

CombinePowersOfSameBase combines powers of the same base in products correctly handling the case of noncommutative products and powers, using Glauber's formula.

• 

FromTensorFunctionalForm is a generalization of the former FromGeneralRelativityTensorFunctionalForm command, that also handles user defined tensor functions.

• 

GetFAndDifferentiationVariables receives a derivative and returns a sequence with derivand and all the differentiation variables.

• 

GetReplacementIndices receives a list of indices of different kinds (spacetime, space, spinor, etc) and any other arguments and returns a list with new indices of the same kinds - useful for replacements - not present in the rest of the arguments.

• 

GetSymbolsWithSameType receives an expression x, of type commutative, anticommutative or noncommutative, and any other arguments, and returns symbols of the same type as x, and not present in the rest of arguments.

• 

GetTensorDependency gets the dependency of a given tensor; this dependency typically depends of the spacetime metric or on the way you defined the tensor using Define.

• 

GetTensorFunctionalForm is a generalization of the former GetGeneralRelativityTensorFunctionalForm command, that also handles user defined tensor functions.

• 

IsLiteralSubscript returns true or false according to whether a symbol s is of the form x__y, that is, it has the substring __ after the first or next characters and before the last one.

• 

IsRealObject returns true or false according to whether a mathematical expression, function or variable passed is known to be real, either because it was assumed to be real, or because it was set to be real using Setup and its realobjects keyword.

• 

RealObjects sets and unsets mathematical variables and functions as real, and answers queries about them.

• 

SortProducts sorts the operands of noncommutative products into any particular desired ordering while taking into account commutator and anticommutator algebra rules, such that the returned product is mathematically equivalent to the one received.

• 

SubstituteTensor substitutes equations into an expression, taking care of the free and repeated indices such that: 1) the substitution equations are interpreted as mappings having the free indices as parameters, and 2) repeated indices in the substitution equations do not clash with existing repeated indices in the target expression.

• 

ToContravariant and ToCovariant rewrite a given expression multiplying by the spacetime metric so that all of its free indices become respectively contravariant or covariant.

• 

ToTensorFunctionalForm reverses the operation performed by the new FromTensorFunctionalForm described above.

Examples

   

Miscellaneous

 
• 

Implement formulas for abstract k, n both nonnegint entering "`a+`^k*| A[n] >" and "a(-)^k*| A[n] >", where `a+` and "a-" are Creation and Annihilation operators, respectively, acting on the 1st quantum number of the space of quantum states labeled A.

• 

Implement new PDEtools:-dchange rules for changing variables in Bras Kets and Brackets of the Physics package

• 

Library:-Degree can now compute the degree for noncommutative products Enhance PDEtools:-Library:-Degree and PDEtools:-Coefficients, to work with Physics:-`.` the same way it does with Physics:-`*`

• 

Changes in design:

a. 

When the spacetime is Euclidean, there is no difference in value between the covariant and contravariant components of a tensor. Therefore, represent both with covariant indices making simplification and all manipulations simpler. This change affects the display of indices on the screen as well as the output of SumOverRepeatedIndices.

b. 

The dot product A . B of quantum operators A and B now returns as a (noncommutative) product  A * B when neither A nor B involve Bras or Kets.

c. 

When A is a quantum operator (generic, Hermitian or unitary), the literal subscript object A__x is now considered an operator of the same kind.

d. 

Normal normalizes powers of the same base (including exponentials) by combining them. For example, A^n*A^m "->A^(n+m)."

e. 

Normal normalizes noncommutative products by sorting objects that commute between themselves putting those that involve Dagger and conjugate to the left, more aligned with normal ordering in quantum field theories.

f. 

FeynmanDiagrams does not return any crossed propagators unless explicitly requested using the new option includecrossedpropagators. The former option, normalproducts, was renamed as externallegs.

Examples

   

See Also

 

The Physics project, Physics, what is new in Physics in Maple 17, what is new in Physics in Maple 16

 

Physics2013.pdf    Physics2013.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

It's been 3+ months since we launched this new, experimental, Maple Physics: Research & Development webpage, containing fixes and new developments around the clock made available to everybody. Today we are extending this experience to Differential Equations and Mathematical functions, launching the Maple Differential Equations and Mathematical Functions: Research & Development Maplesoft webpage. Hey!

With these pages we intend to move the focus of developments directly into the topics people are actually working on. The experience so far has been really good, putting our development at high RPM, an exciting roller-coast of exchange and activity.

As with the Research version of Physics, when suggestions about DEs or Mathematical Functions are implemented or issues are fixed, typically within a couple of days when that is possible, the changes will be made available to everybody directly in this new Maplesoft webpage. One word of clarification: for now, these updates will not include numerical ODE or numerical PDE solutions nor their numerical plotting. Sorry guys. One step at a time :)

This first update today concerns Differential Equations: dsolve and pdsolve can now handle linear systems of equations also when entered in Vector notation (Matrices and Vectors), related to a post in Mapleprimes from October/29. Attached is a demo illustrating the idea.

Everybody is welcome to bring suggestions and post issues. You can do that directly in Mapleprimes or writing to physics@maplesoft.com. While Differential Equations and Mathematical Functions are two areas where the Maple system is currently more mature than in Physics, these two areas cover so many subjects, including that there are the Research and the Education perspectives, that the number of possible topics is immense. 

DEsAndMathematicalFu.pdf   DEsAndMathematicalFu.mw

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

The attached presentation is the second one of a sequence of three that we want to do on Quantum Mechanics using Computer Algebra. The first presentation was about the equation for a quantum system of identical particles, the Gross-Pitaevskii equation (GPE). This second presentation is about the spectrum of its solutions. The level is that of an advanced undergraduate QM course. The novelty is again in the way these problems can be tackled nowadays in a computer algebra worksheet with Physics.

 

The Gross-Pitaevskii equation and Bogoliubov spectrum
  

Pascal Szriftgiser1 and Edgardo S. Cheb-Terrab2 

(1) Laboratoire PhLAM, UMR CNRS 8523, Université Lille 1, F-59655, France

(2) Maplesoft, Canada

 

Departing from the equation for a quantum system of identical boson particles, i.e.the Gross-Pitaevskii equation (GPE), the dispersion relation for plane-wave solutions are derived, as well as the Bogoliubov equations and dispersion relations for small perturbations `δϕ` around the GPE stationary solutions.

Stationary and plane-wave solutions to the Gross-Pitaevskii equation

 


Problem: Given the Gross-Pitaevskii equation, NULL

I*`ℏ`*psi[t] = (G*abs(psi)^2+V)*psi-`ℏ`^2*%Laplacian(psi)/(2*m)

  

a) Derive a relationship between the chemical potential mu entering the phase of stationary, uniform solutions, the atom-atom interaction constant G and the particle density n = abs(psi)^2 in the absence of an external field (V = 0).

  

b) Derive the dispersion relation for plane-wave solutions as a function of G and n. 

  

 

Background: The Gross-Pitaevskii equation is particularly useful to describe Bose Einstein condensates (BEC) of cold atomic gases [3, 4, 5]. The temperature of these cold atomic gases is typically in the w100 nano-Kelvin range. The atom-atom interaction are repulsive for G > 0 and attractive for G < 0 , where G is the interaction constant. The GPE is also widely used in non-linear optics to model the propagation of light in optical fibers.

Solution

   

The Bogoliubov equations and dispersion relations

 

 

Problem: Given the Gross-Pitaevskii equation,

  

a) Derive the Bogoliubov equations, that is, equations for elementary excitations `&delta;&varphi;` and conjugate(`&delta;&varphi;`)around a GPE stationary solution `&varphi;`(x, y, z), NULL

 

"{[[i `&hbar;` (&PartialD;)/(&PartialD;t) `delta&varphi;`=-(`&hbar;`^2 (&nabla;)^2`delta&varphi;`)/(2 m)+(2 G |`&varphi;`|^2+V-mu) `delta&varphi;`+G `&varphi;`^2 (`delta&varphi;`),,],[i `&hbar;` (&PartialD;)/(&PartialD;t)( `delta&varphi;`)=+(`&hbar;`^2 (&nabla;)^2(`delta&varphi;`))/(2 m)-(2 G |`&varphi;`|^2+V-mu) (`delta&varphi;`)-G `delta&varphi;` ((`&varphi;`))^(2),,]]"

  


b) Show that the dispersion relations of these equations, known as the Bogoliubov spectrum, are given by

  

epsilon[k] = `&hbar;`*omega[k] and `&hbar;`*omega[k] = `&+-`(sqrt(`&hbar;`^4*k^4/(4*m^2)+`&hbar;`^2*k^2*G*n/m)),

  


where k is the wave number of the considered elementary excitation, epsilon[k] its energy or, equivalently, omega[k] its frequency.

Solution

   

NULL

References

NULL

[1] Gross-Pitaevskii equation (wiki)

[2] Continuity equation (wiki)
[3] Bose–Einstein condensate (wiki)

[4] Dispersion relations (wiki)

[5] Advances In Atomic Physics: An Overview, Claude Cohen-Tannoudji and David Guery-Odelin, World Scientific (2011), ISBN-10: 9812774963.

[6] Nonlinear Fiber Optics, Fifth Edition (Optics and Photonics), Govind Agrawal, Academic Press (2012), ISBN-13: 978-0123970237.

 

 

QuantumMechanics.pdf     Download QuantumMechanics2.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi,
Relevant developments in Physics happened during the last month and a 1/2, some of them of interest beyond the use of this package. Among the most exciting things I can mention:

  1. The redefinition of the derivative rule for the complex components (abs, argument, conjugate, Im, Re, signum) together with the introduction of Wirtinger calculus, as an user-option to work with complex variables. In other words: it is now possible to compute taking z and its conjugate as independent variables and in equal footing.
  2. Introduction of textbook mathematical display for all the inert functions of the mathematical language, also for unknown functions f(x).
  3. New options in Physics:-Setup to indicate that some mathematical objects are real (different from assume(x, real), while integrated with `is` and `coulditbe`).
  4. A rather large number of micro developments advancing the integration of Physics with simplify, expand and combine.
  5. Another large number of micro developments for quantum mechanics.
  6. New options in Physics:-Setup to redefine sum as Physics:-Library:-Add, and with that have access to multiindex summation directly from sum, for instance as in sum(f(i, j), i + j <= n), including related typesetting copy & paste.

As usual the latest version of the package is available for download in the Maplesoft Physics: Research & Development webpage  and in the zip there is a worksheet illustrating all these developments. Below I'm copying the section related to the new redefinesum option of Physics:-Setup and multiindex summation.

Thanks to everyone who provided feedback, it has been of great value and at the root of this new round of developments.

December 4

 
• 

New option in Setup: redefinesum, so that the sum command is redefined in such a way that
    a) the sum arguments are processed in a way avoiding premature evaluation and related unexpected results or error interruptions
    b) the sum command includes new functionality present in Physics:-Library:-Add to perform sum over integer values of many indices, as in

"(&sum;)S(i,j)"     or  "(&sum;)S(i,j)" 

restart; with(Physics); Setup(notation = true)

`* Partial match of  'notation' against keyword 'mathematicalnotation'`

 

[mathematicalnotation = true]

(1.1)

New option: redefine sum so that its arguments are processed by the more modern Physics:-Library:-Add and so that it can perform multiindice summation.

 

Example:

By default, the sum command is not redefined, so the value of redefinesum is

Setup(redefinesum)

[redefinesum = false]

(1.2)

Consider this multiindex summation functionality of the Physics:-Library:-Add command

Library:-Add(f[i, j], 1 <= i+j and i+j <= n)

Physics:-Library:-Add(f[i, j], i+j <= n, lowerbound = 1)

(1.3)

For instance, for n = 2,

eval(Physics[Library]:-Add(f[i, j], i+j <= n, lowerbound = 1), n = 2)

f[0, 1]+f[1, 0]+f[0, 2]+f[1, 1]+f[2, 0]

(1.4)

This functionality can be plugged directly into the sum command. For that purpose, set redefinesum to true

Setup(redefinesum = true)

[redefinesum = true]

(1.5)

You can now compute directly with sum. The left-hand side is inert while the right-hand side is computed

(%sum = sum)(f[i, j], i+j <= 2)

%sum(f[i, j], i+j <= 2) = f[0, 0]+f[0, 1]+f[1, 0]+f[0, 2]+f[1, 1]+f[2, 0]

(1.6)

(%sum = sum)(f[i, j], 1 <= i+j and i+j <= 2)

%sum(f[i, j], 1 <= i+j and i+j <= 2) = f[0, 1]+f[1, 0]+f[0, 2]+f[1, 1]+f[2, 0]

(1.7)

value(%sum(f[i, j], 1 <= i+j and i+j <= 2) = f[0, 1]+f[1, 0]+f[0, 2]+f[1, 1]+f[2, 0])

f[0, 1]+f[1, 0]+f[0, 2]+f[1, 1]+f[2, 0] = f[0, 1]+f[1, 0]+f[0, 2]+f[1, 1]+f[2, 0]

(1.8)

The formula for the integer power of a sum

(a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(a+b+c)^n = sum(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(factorial(n), Physics:-`*`(1, Physics:-`^`(Physics:-`*`(Physics:-`*`(factorial(p), factorial(q)), factorial(r)), -1))), Physics:-`^`(a, p)), Physics:-`^`(b, q)), Physics:-`^`(c, r)), p+q+r = n)

(1.9)

eval((a+b+c)^n = sum(Physics[`*`](Physics[`*`](Physics[`*`](Physics[`*`](factorial(n), Physics[`*`](1, Physics[`^`](Physics[`*`](Physics[`*`](factorial(p), factorial(q)), factorial(r)), -1))), Physics[`^`](a, p)), Physics[`^`](b, q)), Physics[`^`](c, r)), p+q+r = n), n = 2)

(a+b+c)^2 = a^2+2*a*b+2*a*c+b^2+2*b*c+c^2

(1.10)

eval((a+b+c)^n = sum(Physics[`*`](Physics[`*`](Physics[`*`](Physics[`*`](factorial(n), Physics[`*`](1, Physics[`^`](Physics[`*`](Physics[`*`](factorial(p), factorial(q)), factorial(r)), -1))), Physics[`^`](a, p)), Physics[`^`](b, q)), Physics[`^`](c, r)), p+q+r = n), n = 3)

(a+b+c)^3 = a^3+3*a^2*b+3*a^2*c+3*a*b^2+6*a*b*c+3*a*c^2+b^3+3*b^2*c+3*b*c^2+c^3

(1.11)

Verify whether this equation is true

(`@`(evalb, expand))((a+b+c)^3 = a^3+3*a^2*b+3*a^2*c+3*a*b^2+6*a*b*c+3*a*c^2+b^3+3*b^2*c+3*b*c^2+c^3)

true

(1.12)

Besides this new functionality, the redefined sum does a more modern handling of its arguments, consider a typical problem posted in Maple primes

a := 1; b := 2; j := 3

1

 

2

 

3

(1.13)

In the following summation, j is a dummy summation index, so the value just assigned, j := 3, is not expected to interfer with the summation. This is the case with the redefined sum

sum(f(j), j = a .. b)

f(1)+f(2)

(1.14)

while without redefining sum the input above is interrupted with an error message. Likely, in this other case also reported in Mapleprimes

g := proc (j) options operator, arrow; if j::odd then G[j] else 0 end if end proc

proc (j) options operator, arrow; if j::odd then G[j] else 0 end if end proc

(1.15)

the following two summations can be performed after having redefining sum:

sum(g(i), i = 1 .. f)

sum(g(i), i = 1 .. f)

(1.16)

For the summation above, without redefining sum, it returns 0 instead of unevaluated, because of a premature evaluation of the function g(i) with an unassigned index i before performing the summation. Returning unevaluated as (1.16) permits evaluate the sum at a latter moment, for instance attributing a value to f

eval(sum(g(i), i = 1 .. f), f = 3)

G[1]+G[3]

(1.17)

And this other sum where f is given from the begining also returns 0 without redefining sum

sum(g(i), i = 1 .. 3)

G[1]+G[3]

(1.18)

Problems like this other one reported in Mapleprimes here also get resolved with this redefinition of sum.

 

 

Download sum_in_physics.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft

 

The attached presentation is the first one of a sequence of three that we wanted to do on Quantum Mechanics using Computer Algebra. The level is that of an advanced undergraduate QM course. Tackling this topic within a computer algebra worksheet in the way it's done below, however, is an entire novelty, and illustrates well the kind of computations that can be done today with Maple & Physics.

Ground state of a quantum system of identical boson particles
  

Pascal Szriftgiser1 and Edgardo S. Cheb-Terrab2 

(1) Laboratoire PhLAM, UMR CNRS 8523, Université Lille 1, F-59655, France

(2) Maplesoft

 

Departing from the Energy of a quantum system of identical boson particles, the field equation is derived. This is the Gross-Pitaevskii equation (GPE). A continuity equation for this system is also derived, showing that the velocity flow satisfies `&x`(VectorCalculus[Nabla], `#mover(mi("v"),mo("&rarr;"))`) = 0, i.e.: is irrotational.  

The Gross-Pitaevskii equation

 

NULL


Problem: derive the field equation describing the ground state of a quantum system of identical particles (bosons), that is, the Gross-Pitaevskii equation (GPE).

 

Background: The Gross-Pitaevskii equation is particularly useful to describe Bose Einstein condensates (BEC) of cold atomic gases [3, 4, 5], that is, an ensemble of identical quantum boson particles that interact with each other with an interaction constant G. The temperature of these cold atomic gases is typically in the w100 nano-Kelvin range. The atom-atom interactions are repulsive for G > 0 and attractive for G < 0  (which could lead to some instabilities). The GPE is also widely used in non-linear optics to model the propagation of light in optical fibers. In this area, GPE is known as "non-linear Schrödinger equation", and the non-linearity comes from the Kerr effect [6].

Solution

   

Continuity equation for a quantum system of identical particles

   

References

``

[1] Gross-Pitaevskii equation (wiki)

[2] Continuity equation (wiki)
[3] Bose–Einstein condensate (wiki)

[4] Bose-Einstein Condensation in Dilute Gases, C. J. Pethick and H. Smith, Second Edition, Cambridge (2008), ISBN-13: 978-0521846516.

[5] Advances In Atomic Physics: An Overview, Claude Cohen-Tannoudji and David Guery-Odelin, World Scientific (2011), ISBN-10: 9812774963.

[6] Nonlinear Fiber Optics, Fifth Edition (Optics and Photonics), Govind Agrawal, Academic Press (2012), ISBN-13: 978-0123970237.

 


Downlioad: QuantumMechanics1.mw,    QuantumMechanics1.pdf

Edgardo S. Cheb-Terrab
Physics, Maplesoft

First 14 15 16 17 18 Page 16 of 18