MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • Hi Mapleprimes,

    I have made this little procedure with Maple. 

    check_g_conjecture_10.pdf

    similar to this next one check_g_conjecture_10.mw

    This may be worth a look.

    Regards,

    Matthew

    P.S.   see  https://en.wikipedia.org/wiki/Goldbach%27s_conjecture

    In My Humble Opinion, Wikipedia is a good crowd sourced resource.

     

    The content in all comments posted on any Blog posts are missing.  What happened to them?

    Below I have pasted the recent post of a spammer who's title was http:// 

    First of all, I thought those spam filters had taken care of those. 
    Secondly why isn't there an http:// with a zero rating user poster filter on this forum yet?

     

     

    When I made the suggestions about new ways to delete spam, I specifically requested that there be no confirmation dialogs. I even emphasized it. But I see that there is such a dialog. Was the author of the spam asked to confirm whether they wanted to make the post? So you're saying that my time is worth less than the spammer's. Every time that I need to answer that dialog, it's an insult, a slap in the face direct from Maplesoft.

    The new look and feel of MaplePrimes is ugly and disfunctional nearly beyond belief. Please put back the old look and feel ASAP. I am not commenting here about any new controls or features because I haven't tried them yet. The wasting of space on the screen is incredible. The windows with sharp corners are ugly. The grey colors make it look like selections are inactivated. Most of the controls that can be clicked on are not highlighted in any way.

    Just as an example of the waste of space, I now need to scroll down three screens just to get to the Active Conversations stack.

    Once again, anything that you can do to make the look and feel similar to any StackExchange forum would be an improvement.

    Today we have published an update to MaplePrimes that includes a variety of improvements. Many of these changes are a direct result of member feedback and suggestions, and I am very appreciative for that!

    What follows is a brief summary of the changes. As always, we remain very interested in your thoughts and feedback, and look forward to your further suggestions.

    Also, a note that, as mentioned in a previous post, we have already begun working on a further update to address the influx of spam we have been receiving. This update will be published within the next 2-3 weeks.

    Updated Look and feel
    The most obvious change is the updated interface. With a few exceptions, the previous layout and functionality has been maintained, but with a cleaner, more responsive, and more appealing look.

    New message editor
    This update includes a new text editor called CKEditor. This editor provides a simpler, cleaner experience for posting your messages and also aligns MaplePrimes more closely with the Maplesoft product suite.

    Notifications
    You will notice a new flag icon in the upper right hand corner of the interface. This is the new MaplePrimes Notification feature, and it provides similar functionality to what we have become accustomed to on other social media sites. The icon is displayed in an orange color when you have notifications, and then when opened, your new notifications are highlighted in blue. Clicking on a notification will take you directly to the item being referenced.

    Improved flow for removing spam messages
    As any MaplePrimes moderator could tell you, removing spam on MaplePrimes was a cumbersome process taking 4 clicks. In this update, this process has been streamlined to 2 clicks, which will make the process considerably faster for our legion of spam fighters. In addition, the ability to remove spam is now available on all message types – comments, replies, etc.

    Identification Badges
    There are now 3 identification badges that are used throughout MaplePrimes wherever member information is displayed. These include:

     Denotes a member who works at Maplesoft

     Site moderators are the heart and soul of MaplePrimes, and are now identified by this new badge

     A member who also particpates in the Maple Ambassador Program

    Other fixes and improvements
    In addition to the changes mentioned above, several other minor fixes and improvements were made.

    This post - this is a generalization of the question from  here .
    Suppose we have  m  divisible objects that need to be divided equally between n persons, and so that the total number of parts (called  N  in the text of the procedure) after cutting should be a minimum. Cutting procedure exactly solves this problem. It can be proved that the estimate holds  n<=N<=n+m-1, and  N<n+m-1 if and only if there are several objects (< m), whose measures sum to be a multiple of the share (Obj in the text of the procedure).

    In the attached file you can find also the text of the second procedure Cutting1, which is approximately solves the problem. The procedure Cutting1 is much faster than Cutting. But the results of their work are usually the same or Cutting procedure gives a slightly better result than Cutting1.

    Required parameters of the procedure: L is the list of the measures of the objects to be cutted, n is the number of persons. The optional parameter  Name is a name or the list of names of the objects of L (if the latter then should be nops(L)=nops(Name) ).

     

    Cutting:=proc(L::list(numeric), n::posint, Name::{name,list(name)}:=Object)

    local m, n1, L1, L11, mes, Obj, It, M, N;

    uses combinat, ListTools;

    m:=nops(L); L1:=sort([seq([`if`(Name::name,Name||i,Name[i]),L[i]], i=1..m)], (a,b)->a[2]<=b[2]);

    mes:=table(map(t->t[1]=t[2],L1));

    Obj:=`+`(L[])/n;

    It:=proc(L1, n)

    local i, M, m1, S, n0, a, L2;

    if nops(L1)=1 then return [[[L1[1,1],Obj]] $ n] fi;

    if n=1 then return [L1] fi;

    for i from 1 while `+`(seq(L1[k,2],k=1..i))<=Obj do

    od;

    M:=[seq(choose(L1,k)[], k=1..ceil(nops(L1)/2))];

    S:=[];

    for m1 in M while nops(S)=0 do n0:=`+`(seq(m1[k,2],k=1..nops(m1)))/Obj;

    if type(n0,integer) then S:=m1 fi;

    od;

    if nops(S)=0 then

    a:=Obj-`+`(seq(L1[k,2],k=1..i-1));

    L2:=[[L1[i,1],L1[i,2]-a],seq(L1[k],k=i+1..nops(L1))];

     [[seq(L1[k], k=1..i-1),`if`(a=0,NULL,[L1[i,1],a])],It(L2,n-1)[]] else L2:=sort(convert(convert(L1,set) minus convert(S,set), list),(a,b)->a[2]<=b[2]);

    [It(S,n0)[], It(L2,n-n0)[]] fi;

    end proc;

    M:=It(L1,n);

    N:=add(nops(M[i]), i=1 ..nops(M));

    Flatten(M, 1);

    [Categorize((a,b)->a[1]=b[1],%)];

    print(``);

    print(cat(`Cutting scheme (total  `, N, `  parts):`) );

    print(map(t->[seq(t[k,2]/`+`(seq(t[k,2],k=1..nops(t)))*t[1,1],k=1..nops(t))], %)[]);

    print(``);

    print(`Scheme of sharing out:`);

    seq([Person||k,`+`(seq(M[k,i,2]/mes[M[k,i,1]]*M[k,i,1], i=1..nops(M[k])))],k=1..n);

    end proc:

     

    Examples of use.

    First example from the link above:

    Cutting([225,400,625], 4, Cake);  # 3 cakes must be equally divided by 4 persons

    eval(%,[Cake1,Cake2,Cake3]=~[225,400,625]);  # Check

              

     

     

     

    Second example (the same for 10 persons):

    Cutting([225,400,625], 10, Cake);

            

     

     

    Third example (7 identical apples should be divided between 12 persons):

    Cutting([1 $ 7], 12, apple); 

     

     

    Cutting.mw

     

     Edited:

    1. Fixed a bug in the procedure Cutting  (I forgot sort the list  L2  in sub-procedure  It  if  nops(S)<>0 ).

    2. Changes made to the sub-procedure  It  for the case if there are several objects (>1  and  < m), whose measures                     sum to be a multiple of the share  Obj .

     

    The 196 algorithm goes like this.  Start with an integer.  Reverse the digits.  Add the reversed number to the integer.  For most numbers, this eventually leads to a palendrome.  That is to say the number is equal to the reversed number.  I wrote a little Maple procedure to explore 196, the smallest number that will probrably never become a palendrome when put into the algorithm.

     

    Let me know if you like my code.

    Regards,
    Matt

    proc4.pdf

    proc4.mw

    http://mathworld.wolfram.com/196-Algorithm.html

     

    The material below was presented in the "Semantic Representation of Mathematical Knowledge Workshop", February 3-5, 2016 at the Fields Institute, University of Toronto. It shows the approach I used for “digitizing mathematical knowledge" regarding Differential Equations, Special Functions and Solutions to Einstein's equations. While for these areas using databases of information helps (for example textbooks frequently contain these sort of databases), these are areas that, at the same time, are very suitable for using algorithmic mathematical approaches, that result in much richer mathematics than what can be hard-coded into a database. The material also focuses on an interesting cherry-picked collection of Maple functionality, that I think is beautiful, not well know, and seldom focused inter-related as here.

     

     

    Digitizing of special functions,

    differential equations,

    and solutions to Einstein’s equations

    within a computer algebra system

     

    Edgardo S. Cheb-Terrab

    Physics, Differential Equations and Mathematical Functions, Maplesoft

    Editor, Computer Physics Communications

     

     

    Digitizing (old paradigm)

     

    • 

    Big amounts of knowledge available to everybody in local machines or through the internet

    • 

    Take advantage of basic computer functionality, like searching and editing

     

     

    Digitizing (new paradigm)

    • 

    By digitizing mathematical knowledge inside appropriate computational contexts that understand about the topics, one can use the digitized knowledge to automatically generate more and higher level knowledge

     

     

    Challenges


    1) how to identify, test and organize the key blocks of information,

     

    2) how to access it: the interface,

     

    3) how to mathematically process it to automatically obtain more information on demand

     

     

     

     

                                               Three examples


    Mathematical Functions

     

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

    The FunctionAdvisor (basic)

     

    "Supporting information on definitions, identities, possible simplifications, integral forms, different types of series expansions, and mathematical properties in general"

    Examples

       

    General description

       

    References

       

     

    Differential equation representation for generic nonlinear algebraic expressions - their use

     

    "Compute differential polynomial forms for arbitrary systems of non-polynomial equations ..."

    The Differential Equations representing arbitrary algebraic expresssions

       

    Deriving knowledge: ODE solving methods

       

    Extending the mathematical language to include the inverse functions

       

    Solving non-polynomial algebraic equations by solving polynomial differential equations

       

    References

       

     

    Branch Cuts of algebraic expressions

     

    "Algebraically compute, and visualize, the branch cuts of arbitrary mathematical expressions"

    Examples

       

    References

       

     

    Algebraic expresssions in terms of specified functions

     

    "A conversion network for arbitrary mathematical expressions, to rewrite them in terms of different functions in flexible ways"

    Examples

       

    General description

       

    References

       

     

    Symbolic differentiation of algebraic expressions

     

    "Perform symbolic differentiation by combining different algebraic techniques, including functions of symbolic sequences and Faà di Bruno's formula"

    Examples

       

    References

       

     

    Ordinary Differential Equations

     

    "Beyond the concept of a database, classify an arbitrary ODE and suggest solution methods for it"

    General description

       

    Examples

       

    References

       

     

    Exact Solutions to Einstein's equations

     

     

    Lambda*g[mu, nu]+G[mu, nu] = 8*Pi*T[mu, nu]

     

    "The authors of "Exact solutions toEinstein's equations" reviewed more than 4,000 papers containing solutions to Einstein’s equations in the general relativity literature, organized the whole material into chapters according to the physical properties of these solutions. These solutions are key in the area of general relativity, are now all digitized and become alive in a worksheet"


    The ability to search the database according to the physical properties of the solutions, their classification, or just by parts of keywords (old paradigm) changes the game.

    More important, within a computer algebra system this knowledge becomes alive (new paradigm).

    • 

    The solutions are turned active by a simple call to one commend, called the g_  spacetime metric.

    • 

    Everything else gets automatically derived and set on the fly ( Christoffel symbols  , Ricci  and Riemann  tensors orthonormal and null tetrads , etc.)

    • 

    Almost all of the mathematical operations one can perform on these solutions are implemented as commands in the Physics  and DifferentialGeometry  packages.

    • 

    All the mathematics within the Maple library are instantly ready to work with these solutions and derived mathematical objects.

     

    Finally, in the Maple PDEtools package , we have all the mathematical tools to tackle the equivalence problem around these solutions.

    Examples

       

    References

       

     

    Download:  Digitizing_Mathematical_Information.mw,    Digitizing_Mathematical_Information.pdf

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

    A string is wound symmetrically around a circular rod. The string goes exactly
    4 times around the rod. The circumference of the rod is 4 cm and its length is 12 cm.
    Find the length of the string.
    Show all your work.

    (It was presented at a meeting of the European Mathematical Society in 2001,
    "Reference levels in mathematics in Europe at age16").

    Can you solve it? You may want to try before seing the solution.
    [I sometimes train olympiad students at my university, so I like such problems].

    restart;
    eq:= 2/Pi*cos(t), 2/Pi*sin(t), 3/2/Pi*t; # The equations of the helix, t in 0 .. 8*Pi:
                   
    p:=plots[spacecurve]([eq, t=0..8*Pi],scaling=constrained,color=red, thickness=5, axes=none):
    plots:-display(plottools:-cylinder([0,0,0], 2/Pi, 12, style=surface, color=yellow),
                             p, scaling=constrained,axes=none);
     

    VectorCalculus:-ArcLength(<eq>, t=0..8*Pi);

                               20

     

    Let's look at the first loop around the rod.
    If we develop the corresponding 1/4 of the cylinder, it results a rectangle  whose sides are 4 and 12/4 = 3.
    The diagonal is 5 (ask Pythagora why), so the length of the string is 4*5 = 20.

     

    This presentation is on an undergrad intermediate Quantum Mechanics topic. Tackling the problem within a computer algebra worksheet in the way shown below is actually the novelty, using the Physics package to formulate the problem with quantum operators and related algebra rules in tensor notation.

     

    Quantization of the Lorentz Force

     

    Pascal Szriftgiser1 and Edgardo S. Cheb-Terrab2 

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

    (2) Maplesoft

     

    We consider the case of a quantum, non-relativistic, particle with mass m and charge q evolving under the action of an arbitrary time-independent magnetic field "B=Curl(A(x,y,z)), "where `#mover(mi("A",mathcolor = "olive"),mo("&rarr;"))` is the vector potential. The Hamiltonian for this system is

    H = (`#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`-q*`#mover(mi("A",mathcolor = "olive"),mo("&rarr;"))`(X))^2/(2*m)

    where `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))` is the momentum of the particle, and the force acting in this particle, also called the Lorentz force, is given by

     

    `#mover(mi("F",mathcolor = "olive"),mo("&rarr;"))` = m*(diff(v(t), t))

     

    where `#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))` is the quantized velocity of the particle, and all of  H, `#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("A",mathcolor = "olive"),mo("&rarr;"))` and `#mover(mi("F",mathcolor = "olive"),mo("&rarr;"))` are Hermitian quantum operators representing observable quantities.

     

    In the classic (non-quantum) case, `#mover(mi("F"),mo("&rarr;"))` for such a particle in the absence of electrical field is given by

     

    `#mover(mi("F"),mo("&rarr;"))` = `&x`(q*`#mover(mi("v"),mo("&rarr;"))`, `#mover(mi("B"),mo("&rarr;"))`) ,

     

    Problem: Departing from the Hamiltonian, show that in the quantum case the Lorentz force is given by [1]

     

    `#mover(mi("F",mathcolor = "olive"),mo("&rarr;"))` = (1/2)*q*(`&x`(`#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`)-`&x`(`#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`))

     

    [1] Photons et atomes, Introduction à l'électrodynamique quantique, p. 179, Claude Cohen-Tannoudji, Jacques Dupont-Roc et Gilbert Grynberg - EDP Sciences janvier 1987.

     

    Solution

     

    We choose to tackle the problem in Heisenberg's picture of quantum mechanices, where the state of a system is static and only the quantum operators evolve in time according to

    ``

    diff(O(t), t) = I*Physics:-Commutator(H, O(t))/`&hbar;`

     

    Also, the algebraic manipulations are simpler using tensor abstract notation instead of the standard 3D vector notation. We then start setting the framework for the problem, a system of coordinates X, indicating the dimension of the tensor space to be 3 and the metric Euclidean, and that we will use lowercaselatin letters to represent tensor indices. In addition, not necessary but for convenience, we set the lowercase latin i to represent the imaginary unit and we request automaticsimplification so that the output of everything comes automatically simplified in size.

     

    restart; with(Physics); interface(imaginaryunit = i)

    Setup(mathematicalnotation = true, automaticsimplification = true, coordinates = X, dimension = 3, metric = Euclidean, spacetimeindices = lowercaselatin, quiet)

    [automaticsimplification = true, coordinatesystems = {X}, dimension = 3, mathematicalnotation = true, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}, spacetimeindices = lowercaselatin]

    (1)

     

    Next we indicate the letters we will use to represent the quantum operators with which we will work, and also the standard commutation rules between position and momentum, always the starting point when dealing with quantum mechanics problems

     

    Setup(quantumoperators = {F}, hermitianoperators = {A, B, H, p, r, v, x}, realobjects = {`&hbar;`, m, q}, algebrarules = {%Commutator(p[k], p[n]) = 0, %Commutator(x[k], p[l]) = I*`&hbar;`*KroneckerDelta[k, l], %Commutator(x[k], x[l]) = 0})

    [algebrarules = {%Commutator(p[k], p[n]) = 0, %Commutator(x[k], p[l]) = I*`&hbar;`*Physics:-KroneckerDelta[k, l], %Commutator(x[k], x[l]) = 0}, hermitianoperators = {A, B, H, p, r, v, x}, quantumoperators = {A, B, F, H, p, r, v, x}, realobjects = {`&hbar;`, m, q, x1, x2, x3, %dAlembertian, Physics:-dAlembertian}]

    (2)

     

    Note that we start not indicating F as Hermitian, in order to arrive at that result. The quantum operators A, B, and F are explicit functions of X, so to avoid redundant display of this functionality on the screen we use

     

    CompactDisplay((A, B, F)(X))

    A(x1, x2, x3)*`will now be displayed as`*A

     

    B(x1, x2, x3)*`will now be displayed as`*B

     

    F(x1, x2, x3)*`will now be displayed as`*F

    (3)

    Define now as tensors the quantum operators that we will use with tensorial notation (recalling: for these, Einstein's sum rule for repeated indices will be automatically applied when simplifying)

     

    Define(x, p, v, A, B, F, quiet)

    {A, B, F, p, v, x, Physics:-Dgamma[a], Physics:-Psigma[a], Physics:-d_[a], Physics:-g_[a, b], Physics:-KroneckerDelta[a, b], Physics:-LeviCivita[a, b, c], Physics:-SpaceTimeVector[a](X)}

    (4)

    The Hamiltonian,

    H = (`#mover(mi("p",mathcolor = "olive"),mo("&rarr;"))`-q*`#mover(mi("A",mathcolor = "olive"),mo("&rarr;"))`(X))^2/(2*m)

    in tensorial notation, is given by

    H = (p[n]-q*A[n](X))^2/(2*m)

    H = (1/2)*Physics:-`^`(p[n]-q*A[n](X), 2)/m

    (5)

    Generally speaking to arrive at  ```#mover(mi("F",mathcolor = "olive"),mo("&rarr;"))` = (1/2)*q*(`&x`(`#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`)-`&x`(`#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`)) what we now need to do is

    1) Express this Hamiltonian (5) in terms of the velocity

     

    And, recalling that, in Heisenberg's picture, quantum operators evolve in time according to

    diff(O(t), t) = I*Physics:-Commutator(H, O(t))/`&hbar;`

     

    2) Take the commutator of H with the velocity itself to obtain its time derivative and, from `#mover(mi("F",mathcolor = "olive"),mo("&rarr;"))` = m*(diff(v(t), t)) , that commutator is already the force up to some constant factors.

     

    To get in contact with the basic commutation rules between position and momentum behind quantum phenomena, the quantized velocity itself can be computed as the time derivative of the position operator, i.e as the commutator of x[k] with H

    I*Commutator(H = (1/2)*Physics[`^`](p[n]-q*A[n](X), 2)/m, x[k])/`&hbar;`

    I*Physics:-Commutator(H, x[k])/`&hbar;` = (1/2)*(I*q^2*Physics:-AntiCommutator(A[n](X), Physics:-Commutator(A[n](X), x[k]))-I*q*Physics:-AntiCommutator(p[n], Physics:-Commutator(A[n](X), x[k]))-2*(q*A[n](X)-p[n])*Physics:-KroneckerDelta[k, n]*`&hbar;`)/(`&hbar;`*m)

    (6)

    This expression for the velocity, that involves commutators between the potential A[n](X), the position x[k] and the momentum p[n], can be simplified taking into account the basic quantum algebra rules between position and momentum. We assume that A[n](X)(X) can be decomposed into a formal power series (possibly infinite) of the x[k], hence all the A[n](X) commute between themselves as well as with all the x[k]

     

    {%Commutator(A[k](X), x[l]) = 0, %Commutator(A[k](X), A[l](X)) = 0}

    {%Commutator(A[k](X), x[l]) = 0, %Commutator(A[k](X), A[l](X)) = 0}

    (7)

    (Note: in some cases, this is not true, but those cases are beyond the scope of this worksheet.)

     

    Add these rules to the algebra rules already set so that they are all taken into account when simplifying things

     

    Setup(algebrarules = {%Commutator(A[k](X), x[l]) = 0, %Commutator(A[k](X), A[l](X)) = 0})

    [algebrarules = {%Commutator(p[k], p[n]) = 0, %Commutator(x[k], p[l]) = I*`&hbar;`*Physics:-KroneckerDelta[k, l], %Commutator(x[k], x[l]) = 0, %Commutator(A[k](X), x[l]) = 0, %Commutator(A[k](X), A[l](X)) = 0}]

    (8)

    Simplify(I*Physics[Commutator](H, x[k])/`&hbar;` = (1/2)*(I*q^2*Physics[AntiCommutator](A[n](X), Physics[Commutator](A[n](X), x[k]))-I*q*Physics[AntiCommutator](p[n], Physics[Commutator](A[n](X), x[k]))-2*(q*A[n](X)-p[n])*Physics[KroneckerDelta][k, n]*`&hbar;`)/(`&hbar;`*m))

    I*Physics:-Commutator(H, x[k])/`&hbar;` = (-A[k](X)*q+p[k])/m

    (9)

    The right-hand side of (9) is then the kth component of the velocity tensor quantum operator, the relationship is the same as in the classical case

    v[k] = rhs(I*Physics[Commutator](H, x[k])/`&hbar;` = (-A[k](X)*q+p[k])/m)

    v[k] = (-A[k](X)*q+p[k])/m

    (10)

    and with this the Hamiltonian (5) can now be rewritten in term of the velocity completing step 1)

    simplify(H = (1/2)*Physics[`^`](p[n]-q*A[n](X), 2)/m, {SubstituteTensorIndices(k = n, (rhs = lhs)(v[k] = (-A[k](X)*q+p[k])/m))})

    H = (1/2)*m*Physics:-`^`(v[n], 2)

    (11)

    For step 2), to compute

     `#mover(mi("F",mathcolor = "olive"),mo("&rarr;"))` = m*(diff(v(t), t)) and m*(diff(v(t), t)) = I*m*Physics:-Commutator(H, v(t)[k])/`&hbar;` 

     

    we need the commutator between the different components of the quantized velocity which, contrary to what happens in the classical case, do not commute. For this purpose, take the commutator between (10) with itself after replacing the free index

    Commutator(v[k] = (-A[k](X)*q+p[k])/m, SubstituteTensorIndices(k = n, v[k] = (-A[k](X)*q+p[k])/m))

    Physics:-Commutator(v[k], v[n]) = -q*(Physics:-Commutator(A[k](X), p[n])+Physics:-Commutator(p[k], A[n](X)))/m^2

    (12)

    To simplify (12), we use the fact that if f  is a commutative mapping that can be decomposed into a formal power series in all the complex plan (which is assumed to be the case for all A[n](X)(X)), then

    Physics:-Commutator(p[k], f(x, y, z)) = -I*`&hbar;`*`&PartialD;`[k](f(x, y, z))

    where p[k]"=-i `&hbar;` `&PartialD;`[k] " is the momentum operator along the x[k] axis. This relation reads in tensor notation:

    Commutator(p[k], A[n](X)) = -I*`&hbar;`*d_[k](A[n](X))

    Physics:-Commutator(p[k], A[n](X)) = -I*`&hbar;`*Physics:-d_[k](A[n](X), [X])

    (13)

    Add this rule to the rules previously set in order to automatically take it into account in (12)

    Setup(Physics[Commutator](p[k], A[n](X)) = -I*`&hbar;`*Physics[d_][k](A[n](X), [X]))

    [algebrarules = {%Commutator(p[k], p[n]) = 0, %Commutator(p[k], A[n](X)) = -I*`&hbar;`*Physics:-d_[k](A[n](X), [X]), %Commutator(x[k], p[l]) = I*`&hbar;`*Physics:-KroneckerDelta[k, l], %Commutator(x[k], x[l]) = 0, %Commutator(A[k](X), x[l]) = 0, %Commutator(A[k](X), A[l](X)) = 0}]

    (14)

    Physics[Commutator](v[k], v[n]) = -q*(Physics[Commutator](A[k](X), p[n])+Physics[Commutator](p[k], A[n](X)))/m^2

    Physics:-Commutator(v[k], v[n]) = -I*q*`&hbar;`*(Physics:-d_[n](A[k](X), [X])-Physics:-d_[k](A[n](X), [X]))/m^2

    (15)

    Also add this other rule so that it is taken into account automatically

    Setup(Physics[Commutator](v[k], v[n]) = -I*q*`&hbar;`*(Physics[d_][n](A[k](X), [X])-Physics[d_][k](A[n](X), [X]))/m^2)

    [algebrarules = {%Commutator(p[k], p[n]) = 0, %Commutator(p[k], A[n](X)) = -I*`&hbar;`*Physics:-d_[k](A[n](X), [X]), %Commutator(v[k], v[n]) = -I*q*`&hbar;`*(Physics:-d_[n](A[k](X), [X])-Physics:-d_[k](A[n](X), [X]))/m^2, %Commutator(x[k], p[l]) = I*`&hbar;`*Physics:-KroneckerDelta[k, l], %Commutator(x[k], x[l]) = 0, %Commutator(A[k](X), x[l]) = 0, %Commutator(A[k](X), A[l](X)) = 0}]

    (16)

    Recalling now the expression of the Hamiltonian (11) as a function of the velocity, one can compute the components of the force operator  "()Component(v*B,k)=m (v[k])=(i m [H,v[k]][-])/`&hbar;`"

    F[k](X) = I*m*%Commutator(rhs(H = (1/2)*m*Physics[`^`](v[n], 2)), v[k])/`&hbar;`

    F[k](X) = I*m*%Commutator((1/2)*m*Physics:-`^`(v[n], 2), v[k])/`&hbar;`

    (17)

    Simplify this expression for the quantized force taking the quantum algebra rules (16) into account

    Simplify(F[k](X) = I*m*%Commutator((1/2)*m*Physics[`^`](v[n], 2), v[k])/`&hbar;`)

    F[k](X) = (1/2)*q*(-Physics:-`*`(Physics:-d_[n](A[k](X), [X]), v[n])+Physics:-`*`(Physics:-d_[k](A[n](X), [X]), v[n])-Physics:-`*`(v[n], Physics:-d_[n](A[k](X), [X]))+Physics:-`*`(v[n], Physics:-d_[k](A[n](X), [X])))

    (18)

    It is not difficult to verify that this is the antisymmetrized vector product `&x`(`#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`). Departing from `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))` = `&x`(VectorCalculus[Nabla], `#mover(mi("A",mathcolor = "olive"),mo("&rarr;"))`) expressed using tensor notation,

    B[c](X) = LeviCivita[c, n, m]*d_[n](A[m](X))

    B[c](X) = -Physics:-LeviCivita[c, m, n]*Physics:-d_[n](A[m](X), [X])

    (19)

    and taking into acount that

     Component(`&x`(`#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`), k) = `&epsilon;`[b, c, k]*v[b]*B[c](X) 

    multiply both sides of (19) by `&epsilon;`[b, c, k]*v[b], getting

    LeviCivita[k, b, c]*v[b]*(B[c](X) = -Physics[LeviCivita][c, m, n]*Physics[d_][n](A[m](X), [X]))

    Physics:-LeviCivita[b, c, k]*Physics:-`*`(v[b], B[c](X)) = -Physics:-LeviCivita[b, c, k]*Physics:-LeviCivita[c, m, n]*Physics:-`*`(v[b], Physics:-d_[n](A[m](X), [X]))

    (20)

    Simplify(Physics[LeviCivita][b, c, k]*Physics[`*`](v[b], B[c](X)) = -Physics[LeviCivita][b, c, k]*Physics[LeviCivita][c, m, n]*Physics[`*`](v[b], Physics[d_][n](A[m](X), [X])))

    Physics:-LeviCivita[b, c, k]*Physics:-`*`(v[b], B[c](X)) = Physics:-`*`(v[m], Physics:-d_[k](A[m](X), [X]))-Physics:-`*`(v[n], Physics:-d_[n](A[k](X), [X]))

    (21)

    Finally, replacing the repeated index m by n 

    SubstituteTensorIndices(m = n, Physics[LeviCivita][b, c, k]*Physics[`*`](v[b], B[c](X)) = Physics[`*`](v[m], Physics[d_][k](A[m](X), [X]))-Physics[`*`](v[n], Physics[d_][n](A[k](X), [X])))

    Physics:-LeviCivita[b, c, k]*Physics:-`*`(v[b], B[c](X)) = Physics:-`*`(v[n], Physics:-d_[k](A[n](X), [X]))-Physics:-`*`(v[n], Physics:-d_[n](A[k](X), [X]))

    (22)

    Likewise, for

     Component(`&x`(`#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`), k) = `&epsilon;`[b, c, k]*B[b]*B[c](X) 

    multiplying (19), this time from the right instead of from the left, we get

    Simplify(((B[c](X) = -Physics[LeviCivita][c, m, n]*Physics[d_][n](A[m](X), [X]))*LeviCivita[k, b, c])*v[b])

    Physics:-LeviCivita[b, c, k]*Physics:-`*`(B[c](X), v[b]) = Physics:-`*`(Physics:-d_[k](A[m](X), [X]), v[m])-Physics:-`*`(Physics:-d_[n](A[k](X), [X]), v[n])

    (23)

    SubstituteTensorIndices(m = n, Physics[LeviCivita][b, c, k]*Physics[`*`](B[c](X), v[b]) = Physics[`*`](Physics[d_][k](A[m](X), [X]), v[m])-Physics[`*`](Physics[d_][n](A[k](X), [X]), v[n]))

    Physics:-LeviCivita[b, c, k]*Physics:-`*`(B[c](X), v[b]) = Physics:-`*`(Physics:-d_[k](A[n](X), [X]), v[n])-Physics:-`*`(Physics:-d_[n](A[k](X), [X]), v[n])

    (24)

    Simplifying now the expression (18) for the quantized force taking into account (22) and (24) we get

    simplify(F[k](X) = (1/2)*q*(-Physics[`*`](Physics[d_][n](A[k](X), [X]), v[n])+Physics[`*`](Physics[d_][k](A[n](X), [X]), v[n])-Physics[`*`](v[n], Physics[d_][n](A[k](X), [X]))+Physics[`*`](v[n], Physics[d_][k](A[n](X), [X]))), {(rhs = lhs)(Physics[LeviCivita][b, c, k]*Physics[`*`](v[b], B[c](X)) = Physics[`*`](v[n], Physics[d_][k](A[n](X), [X]))-Physics[`*`](v[n], Physics[d_][n](A[k](X), [X]))), (rhs = lhs)(Physics[LeviCivita][b, c, k]*Physics[`*`](B[c](X), v[b]) = Physics[`*`](Physics[d_][k](A[n](X), [X]), v[n])-Physics[`*`](Physics[d_][n](A[k](X), [X]), v[n]))})

    F[k](X) = (1/2)*q*Physics:-LeviCivita[b, c, k]*(Physics:-`*`(v[b], B[c](X))+Physics:-`*`(B[c](X), v[b]))

    (25)

    i.e.

    `#mover(mi("F",mathcolor = "olive"),mo("&rarr;"))` = (1/2)*q*(`&x`(`#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`)-`&x`(`#mover(mi("B",mathcolor = "olive"),mo("&rarr;"))`, `#mover(mi("v",mathcolor = "olive"),mo("&rarr;"))`))

    in tensor notation. Finally, we note that this operator is Hermitian as expected

    (F[k](X) = (1/2)*q*Physics[LeviCivita][b, c, k]*(Physics[`*`](v[b], B[c](X))+Physics[`*`](B[c](X), v[b])))-Dagger(F[k](X) = (1/2)*q*Physics[LeviCivita][b, c, k]*(Physics[`*`](v[b], B[c](X))+Physics[`*`](B[c](X), v[b])))

    F[k](X)-Physics:-Dagger(F[k](X)) = 0

    (26)



    Download:  Quantization_of_the_Lorentz_force.mw,   Quantization_of_the_Lorentz_force.pdf


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

    After days of fruitlessly searching the help files and the Internet for a means of converting a Dataseries of strings into numeric values in Maple I changed tack and determined how to do it myself.

    I was surprised there was no built in Maple function to do this. From searching the Internet I can see I am not alone.
    Since there are no other solutions on the net, here is mine:

    toNumeric := (y) -> map(x->parse(x),y);

    This creates the function toNumeric() that accepts a DataSeries of text values and returns it converted to a Dataseries of numeric values.

    thing := DataSeries(["10", "20", "30", "55.9"], 'labels' = ["a", "b", "c", "d"]);
    thing := toNumeric(thing); 

    dataframething := DataFrame([["cow", "sheep", "goat", "alpaca"], ["10", "20", "30", "55.9"]], rows = ["a", "b", "c", "d"]);
    dataframething[2] := toNumeric(dataframething[2]);


    If you want to see this in Maple, try:
     typecastdataseries-maple




     

    Students using Maple often have different needs than non-students. Students need more than just a final answer; they are looking to gain an understanding of the mathematical concepts behind the problems they are asked to solve and to learn how to solve problems. They need an environment that allows them to explore the concepts and break problems down into smaller steps.

    The Student packages in Maple offer focused learning environments in which students can explore and reinforce fundamental concepts for courses in Precalculus, Calculus, Linear Algebra, Statistics, and more. For example, Maple includes step-by-step tutors that allow students to practice integration, differentiation, the finding of limits, and more. The Integration Tutor, shown below, lets a student evaluate an integral by selecting an applicable rule at each step. Maple will also offer hints or show the next step, if asked.  The tutor doesn't only demonstrate how to obtain the result, but is designed for practicing and learning.

    For this blog post, I’d like to focus in on an area of great interest to students: showing step-by-step solutions for a variety of problems in Maple.

    Several commands in the Student packages can show solution steps as either output or inline in an interactive pop-up window. The first few examples return the solution steps as output.

    Precalculus problems:

    The Student:-Basics sub-package provides a collection of commands to help students and teachers explore fundamental mathematical concepts that are core to many disciplines. It features two commands, both of which return step-by-step solutions as output.

    The ExpandSteps command accepts a product of polynomials and displays the steps required to expand the expression:

    with(Student:-Basics):
    ExpandSteps( (a^2-1)/(a/3+1/3) );

    The LinearSolveSteps command accepts an equation in one variable and displays the steps required to solve for that variable.

    with(Student:-Basics):
    LinearSolveSteps( (x+1)/y = 4*y^2 + 3*x, x );

    This command also accepts some nonlinear equations that can be reduced down to linear equations.

    Calculus problems:

    The Student:-Calculus1 sub-package is designed to cover the basic material of a standard first course in single-variable calculus. Several commands in this package provide interactive tutors where you can step through computations and step-by-step solutions can be returned as standard worksheet output.

    Tools like the integration, differentiation, and limit method tutors are interactive interfaces that allow for exploration. For example, similar to the integration-methods tutor above, the differentiation-methods tutor lets a student obtain a derivative by selecting the appropriate rule that applies at each step or by requesting a complete solution all at once. When done, pressing “Close” prints out to the Maple worksheet an annotated solution containing all of the steps.

    For example, try entering the following into Maple:

    with(Student:-Calculus1):
    x*sin(x);

    Next, right click on the Matrix and choose “Student Calculus1 -> Tutors -> Differentiation Methods…

    The Student:-Calculus1 sub-package is not alone in offering this kind of step-by-step solution finding. Other commands in other Student packages are also capable of returning solutions.

    Linear Algebra Problems:

    The Student:-LinearAlgebra sub-package is designed to cover the basic material of a standard first course in linear algebra. This sub-package features similar tutors to those found in the Calculus1 sub-package. Commands such as the Gaussian EliminationGauss-Jordan Elimination, Matrix Inverse, Eigenvalues or Eigenvectors tutors show step-by-step solutions for linear algebra problems in interactive pop-up tutor windows. Of these tutors, a personal favourite has to be the Gauss-Jordan Elimination tutor, which were I still a student, would have saved me a lot of time and effort searching for simple arithmetic errors while row-reducing matrices.

    For example, try entering the following into Maple:

    with(Student:-LinearAlgebra):
    M:=<<77,9,31>|<-50,-80,43>|<25,94,12>|<20,-61,-48>>;

    Next, right click on the Matrix and choose “Student Linear Algebra -> Tutors -> Gauss-Jordan Elimination Tutor

    This tutor makes it possible to step through row-reducing a matrix by using the controls on the right side of the pop-up window. If you are unsure where to go next, the “Next Step” button can be used to move forward one-step. Pressing “All Steps” returns all of the steps required to row reduce this matrix.

    When this tutor is closed, it does not return results to the Maple worksheet, however it is still possible to use the Maple interface to step through performing elementary row operations and to capture the output in the Maple worksheet. By loading the Student:-LinearAlgebra package, you can simply use the right-click context menu to apply elementary row operations to a Matrix in order to step through the operations, capturing all of your steps along the way!

    An interactive application for showing steps for some problems:

    While working on this blog post, it struck me that we did not have any online interactive applications that could show solution steps, so using the commands that I’ve discussed above, I authored an application that can expand, solve linear problems, integrate, differentiate, or find limits. You can interact with this application here, but note that this application is a work in progress, so feel free to email me (maplepm (at) Maplesoft.com) any strange bugs that you may encounter with it.

    More detail on each of these commands can be found in Maple’s help pages.

     

    I don't understand why the spam issue has not been resolved yet.  A ton of spam this morning!

    Here's some more help. 

    Any title or question of a post containing http:// should be automatically deleted. 

    Clearly there is a name generator in place somewhere creating new accounts.  Is there not some kind of higher security name creation account done here at mapleprimes?  Ironically you would think this being a math type forum it would be hard to spam.

    While looking at the tags you will find a sizeable link to pages tagged garcinia (http://www.mapleprimes.com/tags/). There are no posts with this tag as the posts with this tag were indeed spam. Please remove all the related tags.

    4 5 6 7 8 9 10 Last Page 6 of 248