## Maple 2018 is here!

by: Maple

Today we are pleased to announce the release of Maple 2018.

For many people, today is just another day in March. It’s not like the release of a new version of a software product is a world-shaking event. But for us here at Maplesoft, these first few days after the latest version of Maple is released are always a bit more special. There’s always a nervous energy whenever we release Maple and everyone else gets to see what we’ve been pouring our efforts into for the past year.

I’m not going to start this post by calling the latest version of Maple “game-changing” or “cutting edge” or any other marketing friendly platitude. I’m well aware that the latest version of Maple isn’t going to change the world.

What I would say though is that with every new release of software comes an opportunity. Every new software release is an opportunity to re-evaluate how that software has evolved to better suit your needs and requirements. So… if you've been sitting on the sidelines and watching version after version go by, assuming that it won't affect you, that's wrong! There's a lot that you could be missing out on.

The way that these release announcements usually work is that we try to amaze and astound you with a long list of features. Don’t worry, I’ll get into that in a bit. But first I wanted to walk through a simple exercise of release arithmetic.

I’ll start with one of those basic truths that has always been hiding in plain sight. The build number # for Maple 2018 is 1298750. Here at Maplesoft, every time our developers make a change to Maple this build number goes up by 1. These changes are sometimes small and sometimes very big; they can be as small as fixing a documentation typo or they can constitute implementing a major feature spread across numerous files in our source tree.

I have come to look at these build numbers in a slightly different way. I look at build numbers as representing all of the small to large sized steps our developers take to get you from one version to the next (or put another way, how many steps behind you are if you are using the older versions). With that in mind, let’s do some quick math:

If you are using Maple 2017 (2017.0 was build # 1231047), there have been 1298750 – 1231047 = 67703 steps since that release (these numerous "steps" are what built the "long list" of features below). If you’re using Maple 2016 (#1113130) this number grows to 185620. And so it goes… Maple 2015 (#1022128) = 276622 steps, Maple 18 (#922027) = 376723, Maple 17 (#813473) = 485277, you get the idea. If you’re using a really old version of Maple – there’s a good chance that we have fixed up a bunch of stuff or added something that you might find interesting in the time since your last upgrade!

Every new release of Maple adds functionality that pushes Maple into new domains, rounds out existing packages, fills gaps, and addresses common user requests. Let's explore some additions:

Clickable Math - a.k.a. math that looks like math and can be interacted with using your mouse - has evolved. What was once a collection of operations found in the right-click or main menu items or in interactive smart-popups or in many additional dialogs, has been brought together and enhanced to form the new Context Panel.

We can summarize the Context Panel as follows: Enter an expression and relevant operations that you can apply to that expression appear in a panel on the right side of your screen. Easy, right? It's a great change that unlocks a large part of the Maple library for you.

The addition of the Context Panel is important. It represents a shift in the interaction model for Maple – you’ll see more and more interaction being driven through the context panel in future releases. Already, the changes for the Context Panel permeate through to various other parts of Maple too. You’ll see an example in the Units section below and here’s another for coding applications.

The Context Panel also gives you access to embedded component properties – this makes it much easier to modify parts of your application.

There’s much more we can say about the Context Panel but in the interest of keeping this post (somewhat) concise I’ll stop there. If you are interested and want to see more examples, watch this video.

Coding in Maple - For many of us, using the Maple coding language is fundamental; it's just what we do. Whether you write a lot of procedures, or modify the start-up code for your worksheet, or put a sequence of commands in a code edit region, or include a button or slider in your application, you’ll find yourself using Maple’s code editing tools.

For Code Edit Regions and the Maple Code Editor, there’s automatic command completion for packages, commands, and even file paths.

maplemint has been integrated into the Code Editor, providing code analysis while you write your code.

mint and maplemint have been unified and upgraded. If you’ve never heard of these before, these are tools for analysing your Maple code. They provide information on procedures, giving parameter naming conflicts, unreachable code, unused parameters or variables, and more. Mint is available for use with external text files and maplemint runs directly inside of Maple.

For more, I’ve got another video.

For many engineers and scientists, units are intrinsically linked with calculations. Here's something else in Maple 2018 that will improve your everyday experience – units are now supported in many core routines such as in numeric equation solving, integration, and optimization.

Here’s a quick example of using units in the int command with some thermophysical data:

We define an expression that gives the pressure of methane as a function of the specific volume V.

P := ThermophysicalData:-Property("pressure", "methane", "temperature" = 350*Unit('K'), "density" = 1/V):
-(int(P, V = 1.0*Unit('m'^3/'kg') .. .5*Unit('m'^3/'kg'), numeric));

You'll also find unit formatting in the Context Panel.

Near and dear to my heart, data analysts also have some occasion to rejoice. Maple 2018 finally adds an Interpolate command that supports irregular data! This is one of those items that users have been requesting for a long time and I'm very happy to say that it's finally here.

Furthering the data story, there are new sources for thermochemical data as well as updates to ensure that existing datasets for thermophysical data and scientific constants are up to date.

If you're interested in protecting your content in Maple, listen up:

You can now encrypt procedures; anyone can use your code, but they can't see the source!

You can also lock your Maple documents - effectively protecting them from accidental changes or other unintended modifications.

Of course, I won't leave mathematics out of this. As always, there’s a ton of new and updated stuff here.

There's a new computational geometry package. There are improvements across all fields of mathematics including group theory, graph theory, integration, differential equations and partial differential equations. And there's a ton of new work in Physics (many of you who have been following the Physics project will already know about these).

You can recreate some of the visualizations above as follows:

Here’s an example of the new VoronoiDiagram Command:

m := LinearAlgebra:-RandomMatrix(40, 2):
ComputationalGeometry:-VoronoiDiagram(m, showpoints, symbol = solidcircle, symbolsize = 7,colorregions=ColorTools:-GetPalette("Dalton"));

Here’s another change that I’ve seen mentioned several times on MaplePrimes – the ability to control the  border of arrows:

plots:-display(plottools:-arrow([0, 0], [2, 2], 0.5e-1, .2, .1, border = false, color = "DarkGrey", legend = "A+B"),
plottools:-arrow([0, 0], [1, 2], .15, .3, .15, border = false, color = "Crimson", legend = "A"),
plottools:-arrow([1, 2], [2, 2], .15, .3, .15, border = false, color = "CornflowerBlue", legend = "B"),
size = [600, 400]);

You can rotate Tickmarks in plots using the rotation option. Some plots, such as those in the TimeSeriesAnalysis package, use rotation by default.

ts := TimeSeriesAnalysis:-TimeSeries([7, 23, 21, 19, 13, 46, 42, 30, 31, 26, 19, 9, 16, 26, 17, 33, 31, 46, 42, 35, 45, 30, 11, 17, 23, 20, 15, 36, 31, 55, 49, 39, 36, 28, 12, 11, 21, 23, 27, 33, 36, 49, 42, 37, 33, 45, 12, 7, 23, 32, 25, 42, 27, 52, 50, 34, 41, 40, 16, 14], frequency = monthly, startdate = "2005-09");
TimeSeriesAnalysis:-SeasonalSubseriesPlot(ts, startingperiod = 9, seasonnames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], space = .25, size = [800, 400]);

I’ll also mention some updates to the Maple language – items that the readers of this forum will likely find useful.

Dates and Times – Maple 2018 adds new data structures that represent dates and times. There are numerous functions that work with dates and times, including fundamental operations such as date arithmetic and more advanced functionality for working with Calendars.

today := Date();

Year( today ), DayOfMonth( today ), Month( today );

Date arithmetic:

One_year_ago := today - 365*Unit(d);

Until - An optional until clause has been added to Maple's loop control structure.

Here's an example, the following code finds the next prime number after 37 and then terminates the loop.

n := 37;

do n := n+1 until

isprime(n):

n;

As always with these posts, we can't cover everything. This post is really just the beginning of the story. I would love to spend another couple of pages describing the inner-workings of every single improvement to Maple 2018 for you; however I'd rather you just try these features yourself, so go ahead, get out there and try out Maple 2018 today. You won't be disappointed that you did.

### Maple 2017 Training Session

--- Prolog.ue ---

The best things in life come free of charge.

Happiness, love, and wisdom of expertise are first few that hit my mind.

As a business economist, I keep my eyes keenly open to opportunities for growth; such as Maple 2017 training session.

It was a Saturday afternoon in Waterloo, ON, this chilly Feburary which was blessed by snowstorm warning.

--- Encountering with Maple ---

I was aware of Maple for many years back when my academic career began.

In fact, Maple was available in the lab computers at university.

But I did not know what to do with it.

Nor did I use any mathematics softwares until recently, but I had this thought : one day I could learn.

The motivation for this learn how to use it' did not occur to me for a long time (14 years!!).

Things changed this year when I enrolled to an Electrical Engineering program at Lassonde.

Mind you, I have already been using various types of languages and tools such as: Python, C, Java, OpenOfficeSuites, Stata, SAS, Latex just to mention a few.

These stuffs also run on multiple platforms which I am sure you have heard of if you're reading this post; Windows, OSX and Linux. And Maple supports all these major operating systems.

--- Why do I like Maple ---

During the first week of school, Dr. Smith would ask us to purchase and practice using MATLAB because it had a relatively easy learning curve for beginners like python and we were going to use it for labs.

Furthermore, students get a huge discount (i.e. $1500 to$50) for these softwares.

Then, the professor also added; "Maple is also a great tool to use, but we won't use it for this class".

ME: ' Why not ? '

The curiosity inside me gave in and I decided to try both!

After all, my laziness in taking derivatives by hand or the possibility of making mistake would disappear if I can verify results using software.

That's it...!

Being able to check correct answer was already worth more than $50. I can not emphasize this point enough; For people in the industry being paid for their time, or students like me who got a busy schedule can not afford to waste any time. (i.e. need to minimize homework effort & frustration, while maximizing the educational attainment & final grades) Right? Time is money. Don't we all just want more spare time for things we care? Googling through many ambiguous Yahoo Answers or online forums like Stackoverflow replies are often misleading and time consuming. I have spent years (estimated 3000+ hours) going through those wildly inaccurate webpages hoping for some clearly written information with sub-optimal outcome. Diverting many hours of study time is not something a first year S.T.E.M. students can afford. --- Maple Training --- Now you know about my relationships with Maple; Let me describe how the training session went. I will begin with the sad news first, =( First of all, there was no coffee available when I arrived. It arrived only after lunch. Although it was a free event aside other best things in life, this was only a material factor I didn't enjoy at the site. Still a large portion of Canadians start their work with a zolt of caffeine in my defence. Secondly, there was a kind of assumption which expected attendee were familiar with software behavior. A handful of people were having trouble opening example file, perhaps because of their browser setting or link to preferred software by OS. Not being able to follow the tutorials as the presenter demonstrated various facets of software substantially diminished the efficacy of training session for those who could not be on the same page. These minor annoyances were the only drawbacks I experinced from the event. Here comes the happy side, =) 1. The staffs were considerate enough to provide vegetarion options for inclusive lunch as well as answering all my curious, at times orthogonal questions regarding Maplesoft company. 2. Highly respectable professionals were presenting themselves; That is, Prof. Illias Kotsireas, Dr. Erik Postma and Dr. Jürgen Gerhard. I can not appreciate enough of their contribution for the training in an eloquent and humble manners. To put it other way, leading of the presentation was well structured and planned out. In the beginning, Prof. Kotsireas presented Introduction to Maple' which included terminology and basic behaviors of Maple (i.e. commands and features) with simple examples you can quickly digest. Furthermore, Maple has internal function to interface with Latex! No more typing hours of$\$s and many frac{}{}, \delta_{} to publish. In order for me to study all this would have been two-weeks kind of commitment in which he summarized in a couple of hours time. Short-cut keys that are often used by his project was pretty interesting, which will improve work efficiency.

After a brief lunch, which was supplied more than enough for all, Dr. Erik Postma delivered a critical component of simluation. That is, Random Number Generation'. Again, he showed us some software-related tricks such as Text mode' vs. Math mode'.  The default RNG embedded in the software allows reproducible results unless we set seed and randomize further. Main part of the presentation was regarding Optimization of solution through simulation'. He iteratively improved efficiency of test model, which I will not go in depth here. However, visually and quantitatively showing the output was engaging the attendees and Maple has modularized this process (method available for all the users!!).

Finally, we got some coffee break that allowed to me to push through all the way to the end. I believe if we had some coffee earlier less attendees would have left.

The last part of the training was presented by Dr. Jürgen Gerhard. In this part, we were using various applications of Maple in solving different types of problems. We tackled combinatorics of Fibonacci sequence by formula manipulation. In this particular example he showed us how to optimize logic of a function that made a huge impact in processing time and memory usage. Followed by graph theory example, damped harmonic oscillator, 2 DOF chaotic system, optimization and lastly proof of orthocentre by coding. I will save the examples for you to enjoy in future sessions.

The way they went through examples were super easy to follow. This can only be done with profound understanding of the subject and a lot of prior effort in preparing the presentation.

I appreciate much efforts put together by whom organized this event, allocating their own precious weekend time and allowing many to gain opportunity to learn directly from the person in the house.

--- Epilogue ---

My hope for Maple usage lies in enhancing education outcome for first year students, especially in the field of Science and Economics. This is a free opportunity for economic empowerment which is uncaptured.

Engineering students are already pretty good at problem solving, and will figure things out as I witnessed my colleagues have.

However, students of natural sciences and B.A. programs tend to skimp on utilizing tools due to lack of exposure.

Furthermore, I am supporting their development of SaaS, software as service, which delivers modules like gRPC does.

Also, I hope the optimization package from prior version written by Dr. Postma will become available to public sometime.

Here's a BIG thank you to staffs once again, and forgive me for any grammatical errors from rushed writing. I tried to incorporate as much observation as possible gathered from the event.

To contact me, my email is hyonwoo.kee (at) gmail.com;

### Minimize the number of...

Minimize the number of tensor components according to its symmetries
(and relabel, redefine or count the number of independent tensor components)

The nice development described below is work in collaboration with Pascal Szriftgiser from Laboratoire PhLAM, Université Lille 1, France, used in the Mapleprimes post Magnetic traps in cold-atom physics

A new keyword in Define  and Setup : minimizetensorcomponents, allows for automatically minimizing the number of tensor components taking into account the tensor symmetries. For example, if a tensor with two indices in a 4D spacetime is defined as antisymmetric using Define with this new keyword, the number of different tensor components will be exactly 6, and the elements of the diagonal are automatically set equal to 0. After setting this keyword to true with Setup , all subsequent definitions of tensors automatically minimize the number of components while using this keyword with Define  makes this minimization only happen with the tensors being defined in the call to Define .

Related to this new functionality, 4 new Library routines were added: MinimizeTensorComponents, NumberOfIndependentTensorComponents, RelabelTensorComponents and RedefineTensorComponents

Example:

 >

Define an antisymmetric tensor with two indices

 >
 (1.1)

Although the system knows that  is antisymmetric, you need to use Simplify to apply the (anti)symmetry

 >
 (1.2)

 >
 (1.3)

so by default the components of  do not automatically reflect the (anti)symmetry; likewise

 >
 (1.4)
 >
 (1.5)

and computing the array form of we do not see the elements of the diagonal equal to zero nor the lower-left triangle equal to the upper-right triangle but for a different sign:

 >
 (1.6)

On the other hand, this new functionality, here called minimizetensorcomponents, makes the symmetries of the tensor be explicitly reflected in its components.

There are three ways to use it. First, one can minimize the number of tensor components of a tensor previously defined. For example

 >
 (1.7)

After this, both (1.2) and (1.3) are automatically equal to 0 without having to use Simplify

 >
 (1.8)
 >
 (1.9)

And the output of TensorArray  in (1.6) becomes equal to (1.7).

NOTE: in addition, after using minimizetensorcomponents in the definition of a tensor, say F, all the keywords implemented for Physics tensors are available for F:

 >
 (1.10)
 >
 (1.11)
 >
 (1.12)
 >
 (1.13)

Alternatively, one can define a tensor, specifying that the symmetries should be taken into account to minimize the number of its components passing the keyword minimizetensorcomponents to Define .

Example:

Define a tensor with the symmetries of the Riemann  tensor, that is, a tensor of 4 indices that is symmetric with respect to interchanging the positions of the 1st and 2nd pair of indices and antisymmetric with respect to interchanging the position of its 1st and 2nd indices, or 3rd and 4th indices, and define it minimizing the number of tensor components

 >
 (1.14)

We now have

 >
 (1.15)
 >
 (1.16)
 • One can always retrieve the symmetry properties in the abstract notation used by the Define command using the new , its output is ordered, first the symmetric then the antisymmetric properties

 >
 (1.17)
 • After making the symmetries explicit (and also before that), it is frequently useful to know the number of independent components of a given tensor. For this purpose you can use the new

 >
 (1.18)

and besides taking into account the symmetries, in the case of the Riemann  tensor, after taking into account the first Bianchi identity this number of components is further reduced to 20.

A third way of using the new minimizetensorcomponents functionality is using Setup , so that, automatically, every subsequent definition of tensors with symmetries is performed minimizing the number of its components using the indicated symmetries

Example:

 >
 (1.19)

So from hereafter you can define tensors taking into account their symmetries explicitly and without having to include the keyword  at each definition

 >
 (1.20)

 >
 (1.21)
 • Two new related functionalities are provided via  and , the first one to have the number of tensor components directly reflected in the names of the components, the second one to redefine only one of these components
 >
 (1.22)

Suppose now we want to make one of these components equal to 1, say

 >
 (1.23)

This nice development is work in collaboration with Pascal Szriftgiser from Laboratoire PhLAM, UMR CNRS 8523, Université Lille 1, F-59655, France.

 >

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

## why Maple mserver.exe hangs on this convert()...

Maple 2017 asked by Yesterday

## Why won't it append?  Any help would be humbly...

Maple 2017 asked by Yesterday

## How can i print maple file?

Maple 13 asked by Yesterday

## How do I use object inheritance inside a module?

Maple asked by March 19

## How to make Maple solve the beam PDE?

Maple 2017 asked by March 19

## Solving pell's equation

Maple 2017 asked by Today

## Plot inside one more plot

Maple asked by Today

## what is the integral of this function ?

Maple 2017 asked by March 19

## How to display the legend of a plot when using...

Maple 2015 asked by Yesterday

## i get wrong solution in maximize

Maple asked by Yesterday

## what is the point of adding UNTIL keyword to Maple?...

Maple 2018 asked by Today

## Maple 2018 gives wrong solution to Laplace PDE...

Maple 2018 asked by Today
﻿