Applications, Examples and Libraries

Share your work here

In computer science, the Towers of Hanoi (Wiki) are considered a prime example of a problem that can only be solved recursively (or iteratively). The time for calculating a certain position n thus grows exponentially with O(2n). In this article an explicit solution is presented with which one can compute any position n with the same computing time O(1). This explicit solution is used in all animations.

Explicit solution

       The Standard Model of Particle Physics in Maple 2022

 

One of the most important mathematical formulations in human history is that of the Standard Model in particle physics. It describes all the elementary particles (leptons like the electron, quarks, bosons as the Higgs or the photon), which in different arrangements, form all the observable particles in nature. The formulation is not just a tremendous theoretical achievement that rendered Nobel prizes but also a practical one. Basically, all the measurements performed in the particle accelerators at CERN and the Fermilab take this mathematical, abstract formulation as the starting point. However, for computer algebra systems, the complexity of the model is somewhat extreme: is not only the number of terms in the corresponding Lagrangian impressively large but also the mathematical properties of each of these objects that represented a challenge for a long time. With hacks of different kinds, the computer algebra representation of only some aspects of the Standard Model was possible, with restricted computational capabilities.

Hidden among the novelties of Maple 2022, a breakthrough in computer algebra is the introduction of a new, fully computable representation of the Standard Model. This representation includes the accessory commands to calculate related scattering amplitudes  (the essence of the computations behind particle collision experiments) and related Feynman integrals . This is a remarkable achievement in computational physics. And from the educational point of view, it brings one more brick of knowledge from "the dark side" of the moon into "the bright side." Making the Standard Model computations be at the tip of one's fingers completely transforms the possible experience we can have with the underlying knowledge.
 

The illustration below of this new Maple 2022 StandardModel package is advanced in time with regards to the release of Maple 2022 days ago, and introduces a new command, Lagrangian, that increases one level the usability of the package. The so updated StandardModel is distributed as usual, within the Maplesoft Physics Updates for Maple 2022.
 

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

 

Download: StandardModel.mw

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

La pandémie de COVID 19 nous a forcé à nous lancés dans l'apprentissage en ligne - mais après deux ans, il est clair que l'apprentissage en ligne est là pour rester. La bonne nouvelle est que de plus en plus de recherches sont disponibles et nous donnant plus d'informations sur les avantages et inconvénients des différentes méthodes d'enseignement ainsi que leur impact sur l'apprentissage de l’élèves. Tout cela conduit à une question : comment l'enseignement peut-il être plus efficace en ces temps difficiles ? Nous discuterons des recherches effectués et leur lien avec Maple Learn. Cependant, je tiens à préciser que je ne prétends pas être un spécialiste du sujet. Je suis simplement un étudiant qui veut améliorer l'apprentissage en ligne pour moi-même et mes pairs.

Dans ce contexte il existe trois principaux styles d'apprentissage, convenus par les psychologues : apprentissage passif, actif et interactif. Cependant, aujourd'hui, nous allons nous concentrer uniquement sur l'apprentissage interactif. L'apprentissage interactif est l'endroit où l'élève agit comme «un sujet d'activité éducative» (Kutbiddinova, Eromasova et Romanova, 2016). Dans la pratique, cela signifie généralement que l'étudiant collabore avec ses pairs. Cette pièce est plus difficile lorsque les cours sont en ligne et/ou asynchrones. Personnellement, j'ai eu du mal à établir des liens avec mes pairs pendant mes études en ligne, car notre principale forme de communication était les messages sur les forums de discussion. Nous discuterons des avantages de l'apprentissage interactif, puis discutons de la façon dont Maple Learn peut être utilisé dans le modèle d'apprentissage interactif.

Le principal avantage de l'apprentissage interactif est qu'il encourage la participation active de toutes les personnes concernées. Lorsqu'ils sont encouragés à interagir avec leurs pairs dans des groupes plus petits, cela permet une plus grande participation des membres du groupe, par rapport au fait de poser des questions à toute la classe et de leur demander de lever la main pour répondre. Dans la même façon, l'apprentissage interactif crée plus d'engagement avec le matériel éducatif, ainsi que plus d'initiative de la part de l’étudiant (Ibid).

Dans un exemple discuté par Anderson en 2014, les étudiants se sont mis par paires et ils ont discuté de leur réponse à une question. Les étudiants, lors de l'exercice, devaient choisir sur une réponse, puis discuter de leur raisonnement qui a mené à ce choix,, dans le but de faire changer d'avis l'autre étudiant. Cela a créé une compréhension du matériel, ainsi qu'un investissement émotionnel dans le sujet.

Alors, comment Maple Learn peut-il aider à faciliter l'apprentissage interactif dans un environnement en ligne ? Commençons par recréer l'exemple d'Anderson, mais en ligne et avec une légère variation pour un cours de mathématiques.

À l'aide de Maple Learn, l'élève peut suivre toutes ses étapes, copier ses notes papier ou résoudre l'équation au fur et à mesure qu'il tape. Il peut également utiliser du texte pour expliquer son raisonnement pour chaque étape ou pour placer des formules à côté des mathématiques qu'il a utilisées.

À partir de là, l'élève peut utiliser la fonction de partage instantané pour échanger des documents avec quelqu'un d'autre dans la classe. Cela permet aux deux étudiants de voir le travail et le raisonnement de l'autre, sans avoir à lire des notes manuscrites numérisées. Cela signifie également que l'examen peut se produire de manière asynchrone, permettant aux étudiants de différents endroits et/ou fuseaux horaires de discuter. Contrairement à l'exemple original, puisque nous parlons de mathématiques, l'élève n'essaie pas nécessairement de convaincre l'autre élève. Les commentaires sur les mathématiques sont davantage utilisés pour donner des commentaires ciblés et soit comprendre soit d'autres façons de résoudre le problème, soit la bonne façon si elle a été mal résolue à l'origine.

S'éloignant de l'exemple, cette méthode peut également être utilisée pour l’annotation par les pairs. Maple Learn propose de nombreuses couleurs de police de texte différentes, permettant aux étudiants de laisser des commentaires sur le document, puis de générer un nouveau lien de partage instantané à renvoyer à l'étudiant d'origine.

Il existe bien d’autres façons d'utiliser Maple Learn pour l'apprentissage interactif, mais nous aimerions également connaître vos idées ! Veuillez nous faire savoir dans les commentaires si vous avez utilisé Maple Learn d'autres manières interactives, ou si vous avez des questions ou des suggestions à ce sujet.

The COVID 19 pandemic threw us for a spin with Online Learning – but after two years, it’s clear that Online Learning is here to stay. The good news is that more and more research is making its way to the classroom, giving us more information on the pros and cons of different teaching methods and how it impacts student learning. This all leads to one question: How can teaching be more effective during these tough times? Let’s discuss the research done and how it relates to Maple Learn. As a note, I do not claim to be an expert on this topic. I am simply a student attempting to improve online learning for myself and my peers.

There are three main styles of learning, in this context, agreed upon by psychologists: Passive, Active, and Interactive Learning. However, today we’re only going to focus on Interactive Learning. Interactive Learning is where the student acts as “a subject of educational activity” (Kutbiddinova, Eromasova, and Romanova, 2016). What this typically means in practice is the student collaborates with peers. This piece is much more difficult when classes are online and/or asynchronous. I know I struggled to make connections with my peers while in school online, as our main form of communication was discussion board posts. Let’s talk about the advantages of Interactive Learning first, and then discuss how Maple Learn can be used within the Interactive Learning model.

The main advantage of Interactive Learning is that it encourages the active participation of all involved. When encouraged to interact with peers in smaller groups, this allows more participation of the members of the group, compared to asking questions to the entire class and asking for them to raise their hands for answering. At the same time, Interactive Learning creates more engagement in the material, along with more student initiative (Ibid).

In one example discussed by Anderson in 2014, the students got into pairs and discussed their answer to a question. The students, in the exercise, had to commit to one answer and then discuss their reasoning behind the answer, in an attempt to change the other student’s mind. This created understanding of the material, along with emotional investment in the topic.

So, how can Maple Learn help to facilitate Interactive Learning in an online environment? Let’s start with recreating Anderson’s example, but online and with a slight twist to accommodate a math class.

Using Maple Learn, the student can go through all their steps, copying from their paper notes, or solving the equation as they type. They can also use text to explain their reasoning behind taking each step, or to place formulas beside the math they’ve used.

From there, the student can use the snapshot share feature to swap documents with someone else in the class. This allows both students to see the other’s work, and reasoning, without having to read scanned handwritten notes. This also means the review can happen asynchronously, allowing students from different places and/or time zones to discuss. In contrast to the original example, since we’re discussing Math, the student is not necessarily trying to convince the other student. The comments on the math are used more for giving targeted feedback, and understanding either other ways of solving the problem, or the correct way if originally solved wrong.

Taking a step away from the example, this method can also be used for peer marking. Maple Learn offers many different text font colors, allowing students to leave comments on the document, then generate a new snapshot to send back to the original student.

There are many other ways Maple Learn could be used for Interactive Learning, but we’d like to hear your ideas too! Please let us know in the comments if you’ve used Maple Learn in other Interactive ways, or if you have any questions or suggestions for us.

 

Works cited:

Anderson, Jill. “The Benefit of Interactive Learning.” Harvard Graduate School of Education, 2014, https://www.gse.harvard.edu/news/14/11/benefit-interactive-learning.

Kutbiddinova, Rimma, et al. “The Use of Interactive Methods in the Educational Process of the Higher Education Institution.” INTERNATIONAL JOURNAL OF ENVIRONMENTAL & SCIENCE EDUCATION, 2016, Accessed 2022.

One way to show all solutions of a polynomial in one variable.
The root is the intersection of curves representing the imaginary part of the equation (red) and the real part (blue). These equations are obtained after representing the variable as the sum of its imaginary and real parts. The circle limits the area where all the roots are located (according to theory).
Example      -15*x^7+x^2+I*x+2=0;
polynomial_roots_graph.mw

Explorer 1 was the first satellite sent into space by the United States. It was a scientific instrument that led to the discovery of the Van Allen radiation belt. In order to keep its orientation, the satellite was spin stabilized. Unexpectedly, shortly after launch, Explorer 1 flipped the axis of rotation. The animation below shows, on the left, Explorer 1 in its initial state after launch, rotating about the axis of minimum moment of inertia. On the right side, 100 minutes later in the simulation, Explorer 1 rotates about the axis of maximum moment of inertia. This unintended behavior could not be explained immediately. Finally, structural damping in the four whip-like antennas was made responsible for the flip (explained here).

The flip can be reproduced with MapleSim using flexible beam components with damping enabled. Without damping and without slight angular misalignment at launch the flip does not manifest.

The simulation is only of qualitative nature since data of the antennas could not be found. On images of Explorer 1, the antennas look prebend and show large deflections of about 45 degrees under gravity. Since rotation of the satelite stretches the antennas, no modeling of large deflections needed to be considered in the simulation and rather stiff antennas (2 mm in diameter) without spheres at their ends were used. (Modeling large deflections with high fidelity might only be considered if the unfolding process of the antennas at launch is of interest. This should be modeled with several flexible beam components.)  

The graph bellow shows the evolution of the angular velocity in x direction. Conservation of angular momentum reduces the angular velocity when the satellite starts flipping towards a rotation about the axis of maximum moment of inertia.

Not long ago such simulations would have been worth a doctoral thesis. Today its rather straight forward to reproduce the flip with MapleSim.

Not so easy is the calculation of energy and angular momentum (for the purpose of observing how well numerics preserve physical quantities in rather long calculations. After all, the solver does not know the physical context). Such calculations would require access to the inertia matrix of the cylinder component including a coordinate transform into the frame of reference where the vector of rotation can be measured.

In case such calculations are possible with MapleSim, it would be nice if someone can update the model or at least indicate how calculations can be done.

Explorer_1_Parameters_and_links.mw

Explorer_1.msim

On a side note: I learned from the flip in an excellent series of lectures on dynamics. Wherever our professor could, he came up with animation in hardware. In this case, he could only provide an exciting story about the space race and sometimes fruitful mistakes in science. That’s why I still remember it.

Adeptes de Maple Learn, nous avons de bonnes nouvelles pour vous! Nous avons fait une mise à jour de Maple Learn avec quelques fonctionnalités supplémentaires que nous sommes ravis de partager avec vous.

Tout d'abord, nous avons ajouté des fonctionnalités de Conception réactive à Maple Learn. Cela signifie que lorsqu'un écran est plus petit ou rétréci, l'interface de Maple Learn change pour refléter cela. Cela vous permet d'avoir encore plus d'espace disponible, quelle que soit la taille de votre écran ! Par exemple, lorsque votre écran est suffisamment petit, et que vous cliquez dessus sur les palettes, une petite boîte de dialogue contextuelle s’ouvrira en dessous d'elles, au lieu d’avoir tout leur contenu dans la barre d'outils.

                                                         

Parallèlement à cela, une icône de redimensionnement d'image a été ajoutée à la barre d'outils pour faciliter le redimensionnement des images insérées dans votre document.

Comme note finale sur la conception réactive, plusieurs de nos menus ont été combinés en un seul, désigné par le menu latéral dans le coin supérieur gauche (illustré ci-dessous, à gauche). C'est là que vous trouverez les menus  fichier, édition, exemples et aide. Si vous cherchez le menu des paramètres, vous le trouverez entre le symbole premium et votre photo de profil en haut à droite. Ceci est désigné par trois points empilés les uns sur les autres (illustrés ci-dessous, à droite).

                                                                                        

Nous avons également ajouté plus de raccourcis clavier et augmenté la prise en charge du clavier AZERTY. La liste mise à jour est disponible ici. Nous espérons que ces nouveaux raccourcis vous aideront à créer des documents plus facilement.

Parallèlement à la prise en charge du clavier AZERTY, nous avons renforcé la prise en charge de nos utilisateurs francophones. De nombreux autres documents sont désormais disponibles en français et nous avons résolu un problème où les caractères latins étendus ne s'affichaient pas correctement.

Les graphiques cliquables sont là ! Maple Learn inclut désormais une fonctionnalité qui permet aux utilisateurs de colorier nos graphiques cliquables. Ces documents sont créés à l'aide de Maple et permettent de générer des documents de coloriage par numéro ou différentes visualisations pour les théorèmes qui impliquent des graphiques, comme ce document. D'autres documents seront disponibles ultérieurement dans la galerie de documents, située ici.

                                                          

Dites-nous ce que vous pensez des nouvelles fonctionnalités ci-dessous ! Nous espérons que vous apprécierez les utiliser pour créer de nouveau documents Maple Learn.

 

Works cited:

Anderson, Jill. “The Benefit of Interactive Learning.” Harvard Graduate School of Education, 2014, https://www.gse.harvard.edu/news/14/11/benefit-interactive-learning.

Kutbiddinova, Rimma, et al. “The Use of Interactive Methods in the Educational Process of the Higher Education Institution.” INTERNATIONAL JOURNAL OF ENVIRONMENTAL & SCIENCE EDUCATION, 2016, Accessed 2022.

Maple Learn enthusiasts, we’ve got some exciting news for you! We’ve updated Maple Learn with a few more features that we’re excited to share with you.

First, we’ve added responsive design features to Maple Learn. This means that when a screen is smaller or shrunk the Maple Learn interface changes to reflect that. This lets you have even more canvas space, regardless of your screen size! For example, when your screen is small enough, the palettes, when clicked on, give a small pop-up dialogue below them, instead of their options also appearing in the toolbar.

                                                         

Along with that, a resize image icon has been added to the toolbar to make it easier to resize the images you’ve inserted into your document.

As a final note on responsive design, several of our menus have been combined into one, designated by the hamburger icon in the top left corner (Shown below, left). This is where you’ll find the file, edit, examples, and help menus. If you are looking for the settings menu, it can be found between the premium symbol and your profile picture in the top right. This is designated by three dots stacked on top of each other (shown below, right).

                                                                                          

We’ve also added more keyboard shortcuts, and increased support for the AZERTY keyboard. The updated list can be found here. We hope these new shortcuts will help you create documents more easily.

Along with the support for the AZERTY keyboard, we’ve increased support for our French language users. Many more documents are now available in French, and we’ve resolved an issue where Latin extended characters weren’t being displayed properly.

Clickable plots are here! Maple Learn now includes functionality which allows users to color our clickable plots. These documents are created through Maple scripting, and allow for colour-by-number documents, or different visualisations for theorems that involve graphics, such as this document. More documents will be available in the document gallery later, located here.

                                                             

Let us know what you think of the new features below! We hope you enjoy using them in new and exciting ways.

Happy Lunar New Year to everyone here in the MaplePrimes community, as we enter the Year of the Tiger! There are different traditions followed in the many countries around the world where the Lunar New Year is celebrated. In my own Canadian-Chinese family, we usually cook a big meal and share with family members and friends. 

The pandemic has made this year's celebration more muted, but I did cook a large batch of our favourite dumplings and made up several packages to take to friends. That led to the question: how many ways can I arrange 10 dumplings on a plate from the 3 kinds I made? Of course, that called for a Maple Learn document to compute the answer: A Counting Problem: Selecting Dumplings
 


I was also interested in understanding the formula used in this computation, and so I created a second document showing a special case of this problem. By moving the sliders around, you can see how the "Stars and Bars" method for counting the ways one can choose a number of items from distinct bins works: Visualization the Stars and Bars Method.

I hope you enjoy trying out these documents and I wish everyone good health, happiness and prosperity in the coming year!

In November, I posted a message announcing that we have been working on an updated version of the Application Center, and invited comments from anyone wanting to check out the beta site. I received multiple comments, both as comments to that post, as well as directly, and we made a lot of changes based on the feedback. Thank you very much to everyone who responded.

I am now very happy to report that the new Application Center is now open to the public!

For those who aren't familiar with it, the Application Center has been around for over 20 years, and it provides a place for our user community to post and share their work. It includes over over 2,700 applications and examples covering a wide array of topics and disciplines, and all are freely available to download.

The previous version of the Application Center was overdue for a refresh. And while we were in there applying a fresh coat of paint, we also took the opportunity to add some new features and capabilities that we hope you will enjoy. As a quick summary of what has changed:

  • The look and feel has been significantly updated. It is cleaner, more modern and easier to use.
  • In addition to search, user-created collections and tags make it easier than ever to find and discover content.
  • Logged-in users can customize the site by pinning their favorite collections and content.
  • Logged-in users can also take advantage of their community reputation to help maintain the content in MaplePrimes, and your contributions will now contribute to your reputation scores. For example, when someone likes one of your apps, your reputation score will be increased by 5.
  • In addition to Maple content, Maple Flow documents are also now included. The collection is very small right now, but it will grow quickly.

There are plenty of other features and enhancements as well.

So without further ado, I invite you to check out the Application Center and to continue to provide your comments and suggestions!

Bryon

When I was in middle school, I was really into puzzles.  At one point I attempted the Three Utilities Problem.  This famous problem is deceptively simple: three houses and three “utilities” (heating, water, and electricity) are represented by dots on a flat piece of paper.  The goal is to connect each house to the three utilities without crossing any lines.

Figure 1: A starting setup.

I spent hours drawing lines.  I eventually looked it up online, and the internet told me that the problem was impossible.  I didn’t believe it, and tried for several more hours until I was forced to accept its impossibility.  I still remember this intense stint of puzzling to this day.

    

Figure 2: Cue twelve-year-old me saying “I’ll get it eventually…”

Looking back, I wonder if this sparked my interest in graph theory.  I know now that the Three Utilities Problem is truly unsolvable.  I know that the graph’s formal name is K3,3 and I know a full graph theory proof explaining its nonplanarity.  Nevertheless, I still love this puzzle, and I’ve recently recreated it in Maple Learn.

To do this, I created a table of x and y values and plotted all of them using the Point() command.  This allows the points to be fully click-and-drag-able.  Line segments joining two points automatically move with the points as well.  We then have a fully interactive graph directly in the Maple Learn plot window.  I can move the “houses” and “utilities” around all I want to try and solve the unsolvable.  I can also create other graphs to further explore planarity, paths, matchings, or any other aspects of the wide world of graph theory.

If you want to check out the document for yourself, it can be found here

A user wondered how to have Maple produce a desired form of a solution

eq1 := `σ__2` = P__2/(Pi*r^2)NULL

NULL

r := (1/2)*d

NULL

soln := `assuming`([solve(eq1, {d}, useassumptions)], [`σ__2`::real, d > 0, P__2 > 0])

{d = 2*(Pi*sigma__2*P__2)^(1/2)/(Pi*sigma__2)}

(1)

NULL

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

Download question-better-spacing.mw

We suggested the closest they might be able to get is using simplify like so:

 

restart; eq1 := `σ__2` = P__2/(Pi*r^2)
``

``

r := (1/2)*d

``

soln := `assuming`([solve(eq1, {d}, useassumptions)], [`σ__2`::real, d > 0, P__2 > 0])

{d = 2*(Pi*sigma__2*P__2)^(1/2)/(Pi*sigma__2)}

(1)

``

`assuming`([simplify(soln)], [sigma__2::real, P__2 > 0])

{d = 2*P__2^(1/2)/(Pi^(1/2)*sigma__2^(1/2))}

(2)

NULL


Download suggestion.mw

Our user wondered about using PolynomialIdeals:

1.  If we have n+1 polynomials,  f, g1,...,gn,  how to determine if  f  is in the ideal generated by  g1,...,gn?

2.  If so, how to write  f  as a polynomial combination of   g1,...,gn? 

We suggested that;

The nicest interface to answer the first question is given by the ?PolynomialIdeals,Operators page: you can write

with(PolynomialIdeals):
with(Operators):
J := <g1, g2, ..., gn>;
f in J; # true or false

To answer the second question, you need to use the lower level  package (which underlies the  package). This will also answer the first question for you. In particular the  command. You can write:

(Edit Feb 1, 2022 - use  instead of 

with(Groebner):
G := [g1, g2, ..., gn];
ord := tdeg(x,y,z); # replace x, y, z with the appropriate variables; you can also use other variable orders -- see ?Groebner,MonomialOrders

b := Basis(G, ord);
n := NormalForm(f, b, ord, 'Q');
# if n = 0 then f is in the ideal; Q is the list of coefficients:
f - add(Q[i] * b[i], i = 1 .. numelems(b)); # this will be equal to n.

A user would like to know if it is possible to specify a data set say, x:=[1,2,3,4,5,6] and then extract a random sample from that data set, i.e. xsample:=[3,2,4] for a bootstrapping-type calculation.

We suggested they use something like the following:

restart; with(Statistics); my_data := [1, 2, 4, 5.5, 5.5, 6]; X := RandomVariable(EmpiricalDistribution(my_data)); s := Sample(X, 10); Bootstrap(Mean, X, samplesize = 4, replications = 10000)

HFloat(3.9984625)

(1)

NULL

Download array-random-sample.mw

As always, it's just about drawings.
The parametric equation of a circle has 3 variables and two equations. In 3-dimensional space, a circle is a spiral, but we only need one projection of this spiral into 2-dimensional space, and we also know how  the rest 2 it's projections on flat space look.
If we look at the equation of the sphere in parametric form, we will see that these are 3 equations and 5 variables:
x1 = sin(x4)*cos(x5); 
x2 = sin(x4)*sin(x5); 
x3 = cos(x4);
And so I wanted to see how the remaining 9 projections of the sphere onto 3-dimensional space look. It is very easy to do this with Maple.
SPHERE.mw

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