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
  •  

    Have you heard of Maple Scripting before? Do you want to extend your Maple Learn documents with your Maple knowledge? Scripting is the process of using Maple to create Maple Learn documents. If you’re already used to Maple, this may be a piece of cake for you, but we wanted to start from the basics for anyone who wants to extend their Maple Learn and Maple knowledge. This process can be used for many different types of documents, from quizzes to intensive 3D visualizations.

    So, let’s get started! All Maple Learn document scripting needs the DocumentTools:-Canvas package. The canvas, as you know, is that white space in a Maple Learn document. Therefore, this package is the core content of a scripted document! Always put:

    with(DocumentTools:-Canvas):

    At the top of your code, or put

    uses DocumentTools:-Canvas:

    At the start of your procedures.

    Now that we’ve told Maple to use the DocumentTools:-Canvas, we need to create a canvas.

    Canvases are created as variables, using the command NewCanvas. Inside NewCanvas, you will add a square-bracket list of all the content you want to see inside. For now, just know that you can add text cells with Text(“YOUR TEXT”) and a math cell with Math(YOUR MATH). On the next line, make sure to put either ShareCanvas(YOUR CANVAS VARIABLE) or ShowCanvas(YOUR CANVAS VARIABLE).  ShareCanvas creates a Maple Learn sharelink, while ShowCanvas shows the canvas directly in Maple. Note that ShowCanvas does not have every Maple Learn feature, but makes quick work of fast error checking.

    canvas := NewCanvas([Text(“My first canvas”), Math(3*x+2*y)]):
    
    ShareCanvas(canvas);

    There are two more things I want to show you in this post: How to make a group have multiple cells (instead of just the one), and how to position your items on the canvas. Let’s start with group making.

    To create a group with multiple cells, use the Group() command within the NewCanvas command, and separate the cells with commas, in a list. You don’t need to specify Text() or Math() when using Group().

    canvas := NewCanvas([Group([“This is the first cell…”, “The second….”, “and the third.”])]):

    At the end of any command/canvas element, within the brackets, you can define position=[x,y] to specify where on the canvas the object should go. You can adjust the precision pixel by pixel until you are happy with the layout.

    When we put all these together, we get code that looks like this:

    with(DocumentTools:-Canvas):
    
    canvas := NewCanvas([
    
    Group(["This is the first cell…", "The second…", "and the third."], position=[200,200]),
    
    Math(3*x+2, position=[100,100]),
    
    Text("This is text!", position=[400,400])]):
    
    ShareCanvas(canvas);

    And in the end, your scripted document looks like this.

    We hope this helps you get started with Maple Scripting. There will be another post on even more of what we can do with Maple Scripting, and how we can make these documents even more interactive. Let us know if there’s anything specific you want to see in that post!

     

    We've just released Maple Flow 2022.2. The update enhances the user experience in many areas, including user interaction, performance, and the interface.

    Performance is a signficant focus.

    • Maple Flow prioritizes the evaluation of the math you see on screen, giving you faster calculation updates for the part of the worksheet you’re working on, with more math being evaluated as you scroll down.
    • We also have more users developing larger documents. Adding white space to large documents, and interacting with sections is now more response and snappier.

    In response to many user requests for faster interaction, a new optional evaluation method lets you simply hit equals to evaluate math and display results.

    We've also refreshed the in-product Application Gallery with a new look and many new applications (this includes a library of section properties).


     

    You can also optionally restrict printing to the left-most column of pages, allowing you to have off-screen supporting calculations not displayed in the final report.

    You'll find a complete list of enhhacements here, and you can download the update here.

    There is something wrong with the search in mapleprimes. 

    I noted one users comment last week about using the search to find something being very difficult to find.  The results don't often match the search.  Only just this morning I was looking for something and the results were less than satisfying often pointing to a list of more results which didn't seem to help. 

    This has been a problem for a long time, is this going to be looked at or fixed soon?

    Greetings, fellow educators, researchers, engineers, students, and folx who love mathematics! 

     

    I believe in the importance of mathematics as a structure to our society, as a gateway to better financial decision making, and as a crucial subject to teach problem solving. I also believe in the success of all students, through self-discovery and creativity, while working with others to create their own knowledge. Consequently, I’ve designed my examples in the Maple Learn gallery to suit these needs. Many of my documents are meant to be “stand-alone” investigations, summary pages, or real-world applications of mathematical concepts meant to captivate the interest of students in using mathematics beyond the basic textbook work most curricula entail. Thus, I believe in the reciprocal teaching and learning relationship, through the independence and creativity that technology has afforded us. The following is an example of roller coaster track creation using functions. Split into a five part investigation, students are tasked to design the next roller coaster in a theme park, while keeping in mind the elements of safety, feasibility, and of course fun!

    Common elements we take for granted such as having a starting and ending platform that is the same height (since most coasters begin and end at the same location), boarding the coaster on a flat surface, and smooth connections between curves translate into modeling with functions. 

     

    Aside from interning with Maplesoft, I am an educator, researcher, student, financial educator, and above all, someone who just loves mathematics and wishes to share that joy with the whole world. As a practicing secondary mathematics and science teacher in Ontario, Canada, I have the privilege of taking what I learned in my doctorate studies and applying it to my classrooms on a daily basis. I gave this assignment to my students and they really enjoyed creating their coasters as it finally gave them a reason to learn why transformations of quadratics, amongst other functions, were important to learn, and where a “real life” application of a piecewise function could be used. 

    Graphical user interface, text, application, Word

Description automatically generated

     

    Having worked with the Ontario and International Baccalaureate mathematics curricula for over a decade, I have seen its evolution over time and in particular, what concepts students struggled to understand, and apply them to the “real world.” Concurrently, working with international mathematics curricula as part of my collaboration with Maplesoft, I have also seen trends and emergent patterns as many countries’ curricula have evolved to incorporate more mathematical literacy along with competencies and skills. In my future posts, you will see Maple Learn examples on financial literacy since working as a financial educator has allowed me to see just how ill prepared families are towards their retirement and how we can get lost amongst a plethora of options provided by mass media. Hence, I have 2 main goals I dedicate to a lifelong learning experience; financial literacy and greater comprehension of mathematics topics in the classroom. 

     

     

    Welcome back to another Maplesoft blog post! Today, we’re looking at how math appears in nature. Many people know that there’s math within the mysteries of nature, but don’t know exactly what’s going on. Today we’ll talk about some of the examples but remember that there’s always more.

    Let’s start with a well-known example: The Fibonacci sequence! This is a recursive sequence, made by adding the previous two terms together to make the next term. The Fibonacci sequence starts with 0, then 1. So, when modelling this sequence, you get “0, 1, 1, 2, 3, 5, 8,” and so on.

    Now, where can this sequence be seen? Well, the sequence forms a spiral. This spiral can be seen in fingerprints:

    Image: Andrea Greengard/Mindful Living Network

    Eggs:

    A picture containing orange, sport, pool ball

Description automatically generated

    Image: Andrea Greengard/Mindful Living Network

    And, in some cases, spiral galaxies. For more examples of the Fibonacci sequence, check out a blog on examples of the Fibonacci Sequence by Andrea Greengard!

    A picture containing star

Description automatically generated

    Image: Andrea Greengard/Mindful Living Network

    Another interesting intergalactic math fact is that celestial bodies are typically spherical, such as stars and planets. As well, orbits tend towards spherical, often being ellipses. It’s fascinating to see how many spheres there are in nature!

    Moving away from spirals in nature, another example of math in nature, although there are many more, is the Hardy-Weinburg Equilibrium.  When in Hardy-Weinburg Equilibrium, a population’s allele and genotype frequencies, in the absence of certain evolutionary factors, stay constant through generations. The Hardy-Weinburg Equilibrium is used to predict genotypes from phenotypes of certain populations, as one example. Come check out our documents on this topic for more details, both on the Hardy-Weinburg Equilibrium and some practice examples.

    Chart, line chart

Description automatically generated

    Image: Maplesoft

    In the end, math is incredibly ingrained in nature. We can use mathematical formulas and patterns to predict how plants will grow, or population genetics, and much more! Please let us know if there’s any examples you’d like to see in more depth, and we can see if writing a blog post on it is possible, or even a Maple Learn document for the gallery!

     

    Vectorial ODEs and vectorial integration constants

    In physics, it is traditional to work with vectors, as in analytic geometry, i.e. symbolic vectors, abstract as in `#mover(mi("A"),mo("→"))`, or projected into orthonormal basis such that the unit vectors appear explicitly. In Maple, that is implemented by the Physics:-Vectors  package. The underlying idea is the extension of the Maple computational domain to include a new category of objects: vectors, and related unit vectors and vectorial differential operators all based on `≡`(Nabla, VectorCalculus[Nabla]).

     

    But then, with paper and pencil, we frequently write vectorial differential equations, that when solved imply on vectorial integration constants, none of which were implemented; now they are, within the Maplesoft Physics Updates v.1341. As with everything new, there is more work to be done, mainly additional checks for consistency here and there, but the work is advanced; time to tell the story and we are grateful in advance for the always useful opinions / corrections if any.

     

    The input/output below illustrate the new features, which by the way compose on top of the new subscripted arbitrary constants by dsolve; this time extended to also be vectorial. The presentation has for context typical material of a first undergrad course in Mechanics. The purpose, anyway, is only to illustrate the new solving of vectorial differential equations and vectorial integration constants.

    NULL

    Download Vectorial_ODEs_and_integration_constants.mw

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

    The first day of Maple Conference 2022 is coming up on November 2 and it's not too late to register! Please go to our conference home page and click on the "Register Now" button. This is a free virtual event open to all.

    The schedule is available on the conference agenda page.

    Come join us to see recent developments in research, education and applications, find out about new and upcoming features in our products, talk to Maplesoft staff and other members of the Maple community and view (and vote on) Maple and Maple Learn artwork.

    We hope to see you at the conference!

    It seems to me that Draghilev's method can be applied quite successfully to the solution of Diophantine equations. Here is a simple example where we find two solutions at the intersection line of two ellipsoids:
      x1^2-x1*x2+x2^2+x2*x3+x3^2-961=0;
      (x1-3)^2+10*x2^2+x3^2-900=0;

    Solutions: (11, -4, -26) and (10, 1, 29).

     


    Based on the text of the program, it is possible to solve various examples with Diophantine equations.
    3d_1.mw

    Explanations.
    f3 is an auxiliary equation for finding the starting point, NPar is a procedure that implements the Draghilev method, the red color of the text is the place where the integer values of the points on the integral curve are filtered.

     Can be compared with the solution of the
    isolve function
     

     restart:
      f1 := x1^2-x1*x2+x2^2+x2*x3+x3^2-961;
      f2 := (x1-3)^2+10*x2^2+x3^2-900;
      isolve({f1, f2})

     

    Any chance to have "Evaluate->Remove Output From Worksheet" become active and usable when one is still running something in the worksheet?  May be in 2023 version?

    This is something that has been missing in Maple for ages.

    Maple definitely slows down when the worksheet becomes full of output (from print messages) when a command has been running for long time. Now there is no way to remove the output in the worksheet until the command completes which can take hours. May be this slow down because the scrolling/writing to the worksheet slows down, and this affects how long it takes to complete as the engine is waiting for the frontend to finish writing to the worksheet?. I do not know. I just know Maple slows down when this happens.

    I do not understand why Maple can't implement this. Is there a tehnical reson which will make removing current output in the worksheet not possible while a command is running?

    We have just released the 2022.2 updates for Maple and MapleSim. These updates are freely available to all customers who have the 2022 version of these products.

    Maple 2022.2 includes improvements to worksheet performance, the math engine, and more. As always, we recommend that all Maple 2022 users install this update. It is available through Tools>Check for Updates in Maple, and is also available from our website on the  Maple 2022.2 download page, where you can also find more details.

    The MapleSim 2022.2 family of products offers an enhanced user experience through an expansion of the modeling libraries, a range of new productivity features, and several new options requested by users. See the MapleSim 2022.2 update page for details on new features, and for instruction on how to obtain your update.

    Physics is a very diverse field with a vast array of different branches to focus on. One of the most interesting areas of physics is optics - the study of light.

    It's common to think of light as some super-fast form of matter that just bounces around at 300,000 km/s and never slows down. However, light can actually slow down when it moves through different substances. Imagine dropping a baseball from the air into a deep pool of water. It would slow down, right? Well, what happens for light isn't too different.

    We call the air or the water in the previous example 'mediums' (or media). Light moves through each of these mediums differently. For example, light moves close to the speed of light in vacuum, 299 792 458 m/s, in air, but it moves considerably slower in water, closer to 225 000 000 m/s. Take a look at Indices of Refraction for more details on how we can quantify this change in speed and Dispersion for some information on the role that the wavelength of light plays.

    So light slows down when it enters a medium with a higher refractive index. It also speeds up when it moves from a higher refractive index to a lower one. But did you know that it also bends? Unlike in the example of the baseball falling into the pool, light that changes speeds moving between mediums will also change direction.

    Snell's Law is our way of determining how much light bends between mediums. Try playing around with the values of the indices of refraction and the incident angle and see what effect that has on the refracted ray. Is there a combination of parameters for which the refracted ray disappears? The answer can be found in Critical Angle and Total Internal Reflection.

    Want to learn about how principles from optics can be applied in the real world? See Fiber Optics - Main Page for information on one of optics' most impactful applications.

    Welcome back to another Maple Learn blog post! We know it is midterm season, and we’re here to help. Maple Learn can be used to study in many different ways, and I’m sure you’ve already tried some of them. One way is making your notes in Learn, or making your own examples, but have you taken a look at our document gallery? We have a wide range of subjects and types of documents, so let’s take a look at some documents!

    I’m going to start by talking about the documents in the gallery which are content learning focused, then move into practice problems and a special document for studying.

    First, let’s look at some calculus content learning documents! The calculus collection is our largest, reaching over 250 documents and still counting. The two documents I’ve picked from this category are our documents on the Fundamental Theorem of Calculus and a Visualization of Partial Derivatives. See a screenshot of the visualisations for each document below!

     

    Are there other subjects you’d like to look at? Well, take a look at our list below!

    Algebra: Double Vertical Asymptote Slider Graph

    Graph Theory: Dijkstra’s Algorithm for Shortest Paths

    Economics: Increase in Demand in a Market

    Chemistry: Combined Gas Law Examples

    Biology: Dihybrid Cross Punnett Squares

    Physics: Displacement, Velocity, and Acceleration

    We have many other subjects for documents, of course, but they wouldn’t fit in this post! Take a look at our entire document gallery for the others.

    Another class of documents we have are the practice problems. Perfect for studying, we have practice problems ranging from practicing the four color theorem, to practicing mean, median, and mode, to even practicing dihybrid cross genotypes!

    Now for, in my opinion, our most useful document for the midterm season: A study time calculator!

    This document allows you to put in the amount you want to study each class over the day or week, and breaks down visually what that would look like.  

    This allows you to make sure you’re taking enough time for breaks and sleep, and not overloading yourself. Feel free to customise the document to make it work better for you and your study style!

    We hope you enjoyed this post, and that we could help you study! Let us know below if there’s anything else you’d want to see to support you during midterms and exams.

    The search query in the new Maple Application center is broken.  There is no advanced search options and a search for mapleflow or maple flow brings up 0 results.  There should at least be one found, for example the search should have at least brought up The Liquid Volume in a Partially-Filled Horizontal Tank".

    Maple, please fix.

     

    Maple allows to extract, manipulate, and optimize equations from a MapleSim model. Code can be generated from the equations in various programming languages. To verify the code, C code can be imported back into the original MapleSim model and compared to the model.

    This verification step is not an everyday task, but it is advisable before the code is used elsewhere (e.g., in a controller). This post summarizes helpfull links and provides an additional example with equations that are too large to be efficiently verified by code review.

    Comparison to a physical model is demonstrated here on an older version of MapleSim (~2015). In newer versions the import has changed (basics are described in Tutorial 6.6: Using the External C Code/DLL Custom Component App). An external C compiler must be set-up to make the import work.

    The attached MapleSim model verifies against an optimized custom component. Instead of manually entering and modifying the code as described in the Tutorial 6.6, the model uses a Maple worksheet that programmatically generates C code from Maple equations and modifies the C code (sets C definitions and parameters) to be usable for MapleSim’s External C/Library Block App.

    The Maple worksheet to generate and modify C code has been improved in many details with support from MaplePrime users for which I would like to express my thanks.

    C_code_generation_of_optimised_code_for_MapleSim.mw

    C_code_generation_of_optimised_code.msim

     

     

    Have you heard the news yet? Maple Learn has had a major update! You may be wondering what this means, and what all the shiny new features are. Let’s go through them together.

    First, as with many updates, we’ve improved performance with Maple Learn. Longer documents will load and perform faster, requiring less computing power for operations, and as a result your browser will be more responsive. Performance on Chromebooks is also improved.

    Operations that previously would have needed to be refreshed now automatically calculate. Up until now, if you performed a menu operation on an expression and then changed the value of the expression, the result would turn orange to warn you that the result was no longer valid. You would then have to refresh manually. Now, this is no longer the case, the orange refresh button has been removed from Maple Learn, and results are never out of date.

    The plot window, inline plots, and the context panel are all resizable now. This means that, for example, if you’re presenting using Maple Learn, you can enlarge the plot window to be the focus of the presentation, and shrink the context panel out of the way. Take a look at the difference, with our animation of it in action!

    Sliders are also more flexible now! Bounds for sliders can be expressed in terms of variables or symbols like π. As well, you can now animate sliders, animating the graph. This allows for more interactivity in documents. See the old view on the left, and the new view on the right! Make sure to take a look at an example of the animated slider below the views as well. 

       

    You can also now snap groups to a grid, allow them to automatically adjust their position as other groups adjust. This ensures better alignment of groups. It also allows you to easily rearrange elements of your documents.

    Next, Maple Learn could handle 3D plots before, but now Maple Learn supports 3D parametric plots!

    Finally, Maple Learn now has printing! This means you can print out your Maple Learn documents, with two options: to print just the canvas, or to print just the plot. This was requested by many users.

    Multiple selection is also possible, allowing you to select multiple cells in a group by holding down the Ctrl/Command key while clicking and dragging.

    That’s all for the updates in this version, but keep an eye out for our other updates! For more details, please take a look at our What’s New In Maple Learn page. We hope you enjoy our new features, and let us know if there are any more features you’d like to see in Maple Learn below.

    First 8 9 10 11 12 13 14 Last Page 10 of 297