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
  • It’s been a hot week at the Maplesoft office, but we’re back with another fun example! In school, you probably learned how to calculate volume of simple shapes: Cubes, prisms, things like that. However, something I never understood was complex shapes. I struggled to separate it into smaller shapes, plus I had trouble understanding ratios!

                                                              

    Thankfully, Maple Learn has documents on almost anything. I love looking through them when making these posts, just to see what more I can learn. In this case, I found a really interesting example on Changing Dimensions and Effects on Volume, which taught me a lot. Let’s take a look at it, and hopefully it will help you too!

     

    The document begins with a statement, saying “For a 3D object, if one or more dimensions (length, width, height) are changed, then the volume of the object is scaled by a factor equal to the product of all scale factors of changed dimensions”. If you’re not a math person, like me, this statement can be quite confusing at first glance. Let’s break it down.

     

    The first part of the statement is easy to understand. We know what a 3D object is, and we know what dimensions changing means. We also know what the volume of an object is, as a concept. However, what is all this about scale factors?

     

    Looking at the example, it starts to make a lot more sense. The solid has dimensions of 4x10x6. To find the scale factor, we first need to decide on an “original” solid. In this case, a 2x2x2 cube. The number of those cubes is found by dividing each dimension of the full shape by the dimensions of the original shape. This gives us 30. That means the new solid is 30 times larger than the cubes.

     

    From there, the document has a fun, interactive example that lets you play around with sliders.

                                                              

    When you change a, b, and c you are changing the scale factors. This lets you see the final volume, and how it changes with those factors.

     

    We hope this example helped you understand a concept you may have never been directly taught, as I know it helped me! Let us know if you’d like to see any more example walkthroughs.

    Happy Friday everyone, and welcome to our third post about how you can use Maple Learn in non-math disciplines! Today, we’re going to talk about the Biology collection in Maple Learn. This was a recent addition to the Maple Learn document gallery.

    Of course, there are too many documents in the Biology collection to talk about all of them. We’re going to talk about three documents today, and I’ll link to them as we go. Are you excited? I am!

    First, let’s talk about the Introduction to Alleles and Genotype document. The current focus of our Biology collection is genetics. This document is therefore important to start with as it lays the foundation for understanding the rest of the documents. Using a visualization of a sperm cell and an egg cell, this document clearly explains what alleles and genotypes are, and how this presents in humans and other diploid organisms.

    `

    Next is the Introduction to Punnett Squares. Punnett squares are used to predict genotypes and the probability of those genotypes existing in an organism. They can be pretty fun, once you get the hang of them, and are simple to understand using this document. We use the table feature in Maple Learn to display the Punnett squares, which is quite a handy feature for visualizations.

    Finally, although there are other introductory documents (Phenotypes, Dihybrid crosses), let’s take a look at the Blood Typing document! As you may know, there are four main blood types (when you exclude the positive or negative): A, B, AB, and O. However, there are only three alleles, due to codominance and other factors. Come check out how this works, and read the document yourself!

                                                                            

    Our Biology collection is still growing, and we’d love to hear your input. Let us know in the comments of this post if there are any other document topics you’d like to see!

    Here's a procedure using GraphTheory by morphing one four letter word into another by changing only one letter at a time.  This is my initial working version.  I've commented out the DrawGraph portion as it takes a long time (5 minutes or so) to produce.  Using the Neighbors command from the GraphTheory package the graph can be shrunk to only include the relevant paths and will take a shorter time to draw.  It's an initial version so there is room for improvements.
     

    a := readdata("c:/sowpods.txt", string)NULL

    with(StringTools)NULL

    b := [seq(`if`(length(a[i]) = 4, a[i], NULL), i = 1 .. nops(a))]

    NULL

    The word morph procedure for 4 letter words.

    NULL

    morph := proc (w1::string, w2::string) local c, i, q, d, r, j, k, g, gg, sp; c := {seq(`if`(HammingDistance(w1, b[i]) = 1, b[i], NULL), i = 1 .. nops(b))}; q := {seq(`if`(HammingDistance(w2, b[i]) = 1, b[i], NULL), i = 1 .. nops(b))}; for i to nops(c) do c || i := {seq(`if`(HammingDistance(c[i], b[j]) = 1, b[j], NULL), j = 1 .. nops(b))} end do; for i to nops(q) do q || i := {seq(`if`(HammingDistance(q[i], b[j]) = 1, b[j], NULL), j = 1 .. nops(b))} end do; d := map(proc (x) options operator, arrow; {x, w1} end proc, c); r := map(proc (x) options operator, arrow; {x, w2} end proc, q); for i to nops(c) do d || i := map(proc (x) options operator, arrow; {c[i], x} end proc, c || i) end do; for i to nops(q) do r || i := map(proc (x) options operator, arrow; {q[i], x} end proc, q || i) end do; for k to nops(c) do for j to nops(c || k) do c || k || _ || j := {seq(`if`(HammingDistance(c || k[j], b[i]) = 1, b[i], NULL), i = 1 .. nops(b))} end do end do; for k to nops(q) do for j to nops(q || k) do q || k || _ || j := {seq(`if`(HammingDistance(q || k[j], b[i]) = 1, b[i], NULL), i = 1 .. nops(b))} end do end do; for i to nops(c) do for j to nops(c || i) do d || i || _ || j := map(proc (x) options operator, arrow; {c || i[j], x} end proc, c || i || _ || j) end do end do; for i to nops(q) do for j to nops(q || i) do r || i || _ || j := map(proc (x) options operator, arrow; {q || i[j], x} end proc, q || i || _ || j) end do end do; g := {d[], r[], seq(d || i[], i = 1 .. nops(c)), seq(r || k[], k = 1 .. nops(q)), seq(seq(d || j || _ || i[], i = 1 .. nops(c || j)), j = 1 .. nops(c)), seq(seq(r || j || _ || i[], i = 1 .. nops(q || j)), j = 1 .. nops(q))}; gg := GraphTheory:-Graph(g); sp := GraphTheory:-ShortestPath(gg, w1, w2); print(sp) end proc
    Today, June 6 is international yoyo day.  So I start off with, of course, the word yoyo.

    NULL

    morph("yoyo", "four")

    ["yoyo", "boyo", "boys", "foys", "fous", "four"]

    (1)

    morph("door", "yoyo")

    ["door", "boor", "boos", "boys", "boyo", "yoyo"]

    (2)

    morph("four", "yoyo")

    ["four", "fous", "foys", "boys", "boyo", "yoyo"]

    (3)

    morph("zane", "quit")

    ["zane", "cane", "cant", "cunt", "cuit", "quit"]

    (4)

    morph("lair", "jump")

    ["lair", "gair", "gaur", "gaup", "gamp", "gump", "jump"]

    (5)

    morph("jump", "lair")

    ["jump", "gump", "gamp", "gaup", "gaur", "gair", "lair"]

    (6)

    morph("quit", "jump")

    ["quit", "luit", "lunt", "luna", "luma", "lump", "jump"]

    (7)

    morph("xray", "jump")

    Error, (in GraphTheory:-ShortestPath) no path from xray to jump exists

     

    NULL

    With no path another level of iteration word groups will be needed.  Otherwise you can use an intermediate word as below

    NULL

    morph("xray", "door")

    ["xray", "dray", "drab", "doab", "doob", "door"]

    (8)

    morph("door", "jump")

    ["door", "poor", "poop", "pomp", "pump", "jump"]

    (9)

    morph("lair", "door")

    ["lair", "loir", "loor", "door"]

    (10)

    NULL

    NULL


     

    Download Word_Morph_3.mw

    Word_Morph.maple

    Last week, we took a look at the Chemistry documents in Maple Learn. After writing that post, I started thinking more about the types of documents we have in the document gallery. From there, I realized we’d made several updates to the Physics collection, and added a Biology collection, that I hadn’t written about yet! So, this week, we’ll be talking about the Physics collection, and next week, we’ll have a discussion about the Biology collection. Without further ado, let’s take a look!

    First, let’s talk Kinematics. This collection has been around for a while now, and if you’ve looked at the Physics documents, you’ve likely seen it. We have documents for Displacement, Velocity, and Acceleration, Equations 1 to 4 for Kinematics, 1D motion, and 2D motion. Let’s take a look at the 2D motion example, shall we?

    In this document, we explore projectile motion. You can use sliders to change the initial velocity and the height of a projectile, in order to see how they affect the object’s motion. Then, in group two, you can adjust the number of seconds after an object has been released in order to see how the velocity changes. The resulting graph is shown above this paragraph.

    Next, we also have documents on Energy, Simple Harmonic Motion, and Waves (interference and harmonics). These documents were added over the last few months, and we’re excited to share them! Opening the document used as an example for wave harmonics (link provided again here), we’re immediately given a description of the important background knowledge, and then a visualization, shown below. This allows you to see how waves change based on the harmonics and over time.

    Finally, we have documents on Electricity and Magnetism, Dynamics, and some miscellaneous documents, like our document on the inverse square law applied to Gravity. Within these document collections, we have quizzes, information, and many more visualizations!

    The Physics collection is quite an interesting collection, we hope you enjoy! As with the Chemistry documents, please let us know if there’s any topics you’d like to see in our document gallery.

    We have just released an update to Maple, Maple 2022.1.

    Maple 2022.1 includes improvements to the math engine, Plot Builder, Print Layout mode, and more.  We strongly recommend that all Maple 2022 users install these updates.

    This update is available through Tools>Check for Updates in Maple, and is also available from our website on the Maple 2022.1 download page, where you can also find more details.

    In particular, please note that this update includes fixes to problems with Units:-Simple (here and here), evala, sum, and deleting tasks from a task template, all reported on MaplePrimes. As always, thanks for the feedback!

    We are happy to announce that we released MapleSim 2022 today.

    The MapleSim 2022 family of products offers improvements in modeling and connectivity, including many that are in direct response to customer requests. Improvements include:

    • Reduce diagram clutter by using “wireless” To-From blocks for a larger variety of signals
    • Easily create, customize, and fine-tune control valves with new components and tools in the hydraulics library
    • Expand modeling scope with improvements to several specialized libraries and toolboxes, including the MapleSim add-on products for Battery, Heat Transfer, and Web Handling
    • New productivity and connectivity features in MapleSim Insight,  a standalone product in the MapleSim family that gives machine builders powerful simulation-based debugging and 3-D visualization capabilities that connect directly to your automation tools

     

    See What’s New in MapleSim 2022 for more information about these and other improvements.

    Hello Maple Learn enthusiasts, of all disciplines! Do any of you study Chemistry, or simply enjoy it? Well, you’re in luck. We’re released a new collection of documents in the document gallery, all focused on Chemistry. Remember, Maple Learn isn’t just for math fields. We also have documents on Biology, Physics, Finance, and much more!

                                                                      

    First, we have our new gas laws documents. These documents focus on Boyle’s law, Charles’ law, Gay-Lussac’s law, and Avogadro’s law. We also have documents on the Combined Gas law and the Ideal Gas law. Many of these laws also have example questions to go along with them, for your studying needs.

    We also have documents on molar and atomic mass. One example for atomic mass teaches you to use the proper formulas (No spoilers for the answer here, folks!) using the material Hafnium and its five isotopes. Don’t know the approximate masses of the isotopes without looking them up? No worries, I don’t either! It’s in the question text, as a hint.

    Finally, let’s take a look at the dilution documents. We have documents discussing the calculations, and some examples. In this document, there are both an example walking you through the steps, and a practice question for you to try yourself. Of course, the solution is included at the bottom of the document, but we encourage you to try the problem yourself first.

    We hope you’re just as excited as us for the Chemistry collection! Like our other collections, the Chemistry collection is constantly being added to. If you have any ideas for future documents, or even just topics you’d like to see, let us know in the comments below.

    Today is a very exciting day at Maplesoft! Yesterday, we released Sumzle on the Maple Calculator app. Of course, this might not mean anything to you yet, because, well, what is Sumzle? Don’t worry, we know you’re asking. So, without waiting any longer, let’s take a look.

    Sumzle is a math game, inspired by the Wordle craze, where you attempt to guess an equation. Each guess:

    • Must include an equal sign
    • Must include up to two operators
    • May include a blank column

    Sumzle’s interface looks like this:

    After each guess, the tile’s colors change to reflect how correct the guess was. Green means that the tile is in the right spot, yellow means the tile is in the equation but the wrong spot, and grey means that it is not in the equation. Let me show you the progression of a game, on the Fun difficulty.

    Sumzle can be played once a day on the free tier. For unlimited games, you can subscribe to Maple Calculator Premium or ask your friends to challenge you!

     

    Math games are for everyone, and Sumzle has three levels of difficulty. Are you interested in the history of Sumzle? I sure am!

    Sumzle was originally designed by Marek Krzeminski, a MapleSim developer. He had called it Mathie and showed the game to his colleagues here at Maplesoft. Well, we loved it!

    After a few months of discussion and development, we tweaked the game to create Sumzle. Honestly, the hardest part was naming the game! We had so many great suggestions, such as Mathstermind and Addle. Eventually, we put it to a vote, and Sumzle rose above the rest.

    We hope you enjoy the game, because Math not only matters, but is fun. Don’t forget to update your Maple Calculator app in order to receive that game, as otherwise you won’t be able to find it. Next time you need a break, we challenge you to a game of Sumzle!

    We are holding another Maple Conference this year, and I am pleased to announce that we have just opened the Call for Participation!

    This year’s conference will be held Nov. 2 – Nov. 3, 2022. It will be a free virtual event again this year, and it will be an excellent opportunity to meet other members of the Maple community and share your work.

    We are inviting submissions of presentation proposals on a range of topics related to Maple, including Maple in education, algorithms and software, and applications. We also encourage submission of proposals related to Maple Learn. This year, we are not requiring recorded videos, and we hope to see more interaction between presenters and audience members in our live sessions.

    You can find more information about the themes of the conference and how to submit a presentation proposal at the Call for Participation page. Proposals are due July 18, 2022.

    Presenters will have the option to submit papers and articles to a special Maple Conference issue of the Maple Transactions journal after the conference.

    Registration for attending the conference will open in June. We will also be featuring an art gallery again at the conference. Watch for further announcements in the coming weeks.

    I sincerely hope that all of you here in the Maple Primes community will consider joining us for this event, whether as a presenter or attendee!

    Mapleprimes appears unfinished and is in need of some maintenance.

    If you click on the products option page there are several products missing from the sort (MapleSim, MapleFlow, MapleLearn).  Also clicking on questions gives you only a maplesim and maple option.

    Those are some of the things I would like mapleprimes to please update.

    A user found that the behaviour of calling a command from a library with a long form command name which invoked another command from that library with the short form name was unexpected:

    restart;
    ScientificConstants:-GetValue(Constant(g))

    Error, (in ScientificConstants:-GetValue) `Constant(g)` is not a scientific constant object

     

     

     

    We suggested to either

    [Edit May 13 after Acer's improvements]

    A) import the package such that all short form names of commands from the package are available in the Maple session and use the short form of both commands:

    restart;
    with(ScientificConstants):
    GetValue(Constant(g));

    9.80665

    (1)

    Download scientificConstantsGetValueShortFormsWithPackage.mw

    or

    B) use long forms for both command names:

    restart;
    ScientificConstants:-GetValue(ScientificConstants:-Constant(g))

    9.80665

    (1)

    Download scientificConstantsGetValueLongFormLongForm.mw

    or

    C) to test that a long form command and a short form command work together, import the package for the short form command:

    restart;
    with(ScientificConstants):
    ScientificConstants:-GetValue(Constant(g))

    9.80665

    (1)

    Download scientificConstantsGetValueLongFormWithPackage.mw

    Further details can be found in the article ?UsingPackages

    Have you ever wanted to create practice problems and quizzes that use buttons and other features to support a student making their way to an answer, such as the following?

    Let’s take a look at how you can use Maple 2022 to create documents like these that can be deployed in Maple Learn. I know I’ve always wanted to learn, so let’s learn together. All examples have a document that you can use to follow along, found here, in Maple Cloud.  

    The most important command you’ll want to take a look at is ShareCanvas. This command generates a Maple Learn document. Make sure to remember that command, instead of ShowCanvas, so that the end result gives you a link to a document instead of showing the results in Maple. You’ll also want to make sure you load the DocumentTools:-Canvas subpackage using with(DocumentTools:- Canvas).

    If you take a look at our first example, below, the code may seem intimidating. However, let’s break it down, I promise it makes sense!

    with(DocumentTools:-Canvas);
    cv := NewCanvas([Text("Volume of Revolution", fontsize = 24), "This solid of revolution is created by rotating", f(x) = cos(x) + 1, Text("about the y=0 axis on the interval %1", 0 <= x and x <= 4*Pi), Plot3D("Student:-Calculus1:-VolumeOfRevolution(cos(x) + 1, x = 0 .. 4*Pi, output = plot, caption=``)")]);
    ShareCanvas(cv);
    

    The key command is Plot3D. This plots the desired graph and places it into a Maple Learn document. The code around it places text and a math group containing the equation being graphed. 


    Let’s take a look at IntPractice now. The next example allows a student to practice evaluating an integral.

    with(Grading):
    IntPractice(Int(x*sin(x), x, 'output'='link'));
    

     This command allows you to enter an integral and the variable of integration, and then evaluates each step a student enters on their way to finding a result. The feedback given on every line is incredibly useful. Not only will it tell you if your steps are right, but will let you know if your last line is correct, i.e if the answer is correct.

    Finally, let’s talk about SolvePractice.

    with(Grading):
    SolvePractice(2*x + 3 = 6*x - 9, 'output' = 'link');
    

    This command takes an equation, and evaluates it for the specified variable. Like the IntPractice command, this command will check your steps and provide feedback. The image below shows how this command looks in Maple 2022.

    These commands are the stepping stones for creating practice questions in Maple Learn. We can do so much more in Maple 2022 scripting than I realized, so let’s continue to learn together!

    Some other examples of scripted documents in the Maple Learn Document Gallery are our steps documents, this document on the Four Color Visualization Theorem, and a color by numbers. As you can see, there’s a lot that can be done with Maple Scripting.

     Let us know in the comments if you’d like to see more on Maple 2022 scripting and Maple Learn.

    MapleSim is a fantastic tool to model multi-domain physical systems at a level that was unthinkable not so long ago. This post is about a simple problem that can be solved by hand, but where I failed with MapleSim using online resources.

    For some time, I have been looking for answers to two questions:

    • How to control which variables (and parameters) are included in MapleSims equation exports? This question is crucial to derive forward and inverse kinematics.
    • Can the Equation Extraction App (in principle) provide a similar set of equations than the Multibody Analysis App? This question is rather academic until multidomain exports are desired (which the Multibody Analysis can’t provide).

    The attached model helped me to clarify a few things and discover a real hidden secret (at least it was for me). I hope it can help others.

    The model is a rather simple 3DOF mechanism. The task was to get a set of equations to derive the two rotations and the one displacement of the mechanism as a function of x,y,z coordinates.

    After watching videos and inspecting models from the model gallery on inverse kinematics, I placed motion drivers for the input variables, added sensors for the output variables and wrapped the mechanism into a subsystem. However, as explained in more detail in the attachment, the set of exported variables was incomplete in both apps (AEs exports in the Equation Extraction Export and Position Constraints in the Multibody Analysis Export). Furthermore, the number of extracted equations did not match the three degrees of freedom.

    After numerous trials it turned out that in addition to the motion drivers and sensors, initial conditions (ICs) had to be set. This is the hidden secret.  The crucial initial conditions (detailed in the attachment) are not required to assemble and run the model. So, introducing them temporarily for equation extraction is not obvious and never came to my mind. Setting ICs is, if I am not completely mistaken, also not highlighted in the documentation. This little trick of additionally setting initial conditions answered the above questions positively (at least for this 3DOF mechanism). In fact, it worked so well that all other failed attempts of conditioning the model for equations extraction worked immediately:

    • Immobilizing the assembly with a Fixed Frame (using parameters for the fixed frame position to represent input variables; the fixed frame can be inside or outside the subsystem model).
    • Using one Prescribed Translation component Instead of 3 motion drivers
    • Using variables to pass motion signals into the model subsystem instead of using signals and ports (using From variable and To Variable components)

    These attempts underline the effort and the time spend to get the relevant equations for that simple problem. As it turned out, all approaches work but are not even required for the mechanism. The key to success was setting the ICs of the joints.  One can even strip the model down to its skeleton (removing all motion drivers and sensors as in the screen shot bellow) and still get the desired simple set of equations, provided the ICs are set.

     

    It has to be noted, that the mechanically coupled (highlighted in yellow) prismatic joints contributed to the problems: MapleSim does not seem to take this mechanical constraint into account (as I would have expected). The ICs of both coupled components must be set to get the three equations containing all desired in and output variables.

    If my finding is correct and of general relevance, I like to suggest including such kind of tips and tricks in training or reference material.  From an application engineer or developers’ perspective, knowing the underlying algorithms, its probably obvious what has to be done. But from a user’s perspective MaplsSim is a black box that works magically well in most cases. If it does not, trial and error is often the only alternative to make it work, because models are either too complex or too confidential to be shared with others.   

    What I am addressing here is only the initial step of getting the desired equations. There is more to master. Save manipulation of equations too big to be inspected visually is also important. This has been well covered in several videos. Unfortunately, the quality of some of the footage does not allow to capture details of Maple commands. If possible, such material should be updated or replaced.

    Overall, a collection of tips&tricks and dos&don’ts could establish some kind of best practice in deriving kinematics. If others would share their experience and findings, we all could save allot of time. A collection of valuable posts, questions, models, videos, and webinars could be a start. This collection not necessarily has to meet the high Maple standards of mathematical exactness and consistency. Engineers also accept pragmatic solutions to solve a problem.

    If my findings are incorrect or you have better advise, please let us know.

    MBA_and_equation_extraction.msim

    We’ve just released Maple Flow 2022!

    The name of the product – Flow - references a psychological concept known as the flow state. You might know it as being in the zone. That’s when you’re so immersed in your present task that outside distractions melt away, your problem solving skills are firing on all four cylinders, and feel-good neurochemicals flood your brain.

    Maple Flow supports a mathematical flow state through a simple design that productively guides the loosely structured and somewhat haphazard way that most people work.

    Since Maple Flow's release a year ago, we've regularly added new features through updates, and we're commited to maintaining that momentum. These updates are driven by user feedback, so keep sending your comments and requests my way.

    Here’s what we have lined up for you in Flow 2022.

    Flow 2022 features a new in-product help system - see it in action here:

    In addition to copying & pasting equations and expressions from a help page, you can open entire help pages as worksheets. The nature of Flow means that the help pages have a certain immediacy that becomes very tangible once you start working with them.

    You can change the background colour of containers to highlight important results or draw the reader's attention to specific groups of containers.

    Prior versions of Flow were a toolbox that needed to be installed on top of Maple.

    Now, Flow 2022 is completely standalone, and does not require an existing installation of Maple.This makes managing an installation of Flow far simpler.

    A new options menu let you specify how you want worksheet hyperlinks to open – in the same application window, or in a new application window.

    We've also made many other quality-of-life changes to Flow. Head on over to the Maple Flow website to learn more or download an evaluation.

    If you do as much math as I do, you’ll likely agree that it’s important to take breaks from intensive work.  However, sometimes one wants to keep one’s mind stimulated with math.  This makes mathematical puzzles and games a perfect respite.  Alternatively, even if you don’t do as much math professionally, math puzzles are a fun and easily-accessible way to keep your mind sharp.  Games like sudoku and Rubik’s cubes are incredibly popular for good reason.

    My personal favourite math puzzle is the nonogram, sometimes called hanjie, picross, or picture cross.  The game presents players with a blank grid of squares and clues indicating which ones should be colored in.  When the puzzle is solved, the colored squares depict a simple image.  You can read more thorough instructions here.

     


    Nonograms are now available in Maple Learn!  These documents are coded using Maple scripts which can be viewed online in Maple Learn.  The document collection has pre-made puzzles and randomly-generated puzzles, and now you can create your own!  Use this document to create an image, and follow the instructions therein to generate the interactive puzzle.  Once you’ve created your own Maple Learn nonogram, use the sharelink to send it to friends!  Also keep your eye on the entire Maple Learn games collection for more in the future!

    First 14 15 16 17 18 19 20 Last Page 16 of 300