Maplesoft Blog

The Maplesoft blog contains posts coming from the heart of Maplesoft. Find out what is coming next in the world of Maple, and get the best tips and tricks from the Maple experts.

A few mornings ago, I drove to the office, bleary-eyed and still waiting for my first liter of coffee to kick in.  I parked, exited my car, and started walking to the entrance.  Someone a few meters ahead of me held the door open, but let go while I was still about a meter away.  Judging the closing speed of the door, I thought I had enough time to sneak in.  However, during the latter stages of its closing sweep, it suddenly sped up, and slammed shut. Not yet being suitably caffeinated, I uttered a small curse, damning the door and all its close mechanical relatives, and reached for my key fob.

Modelica is an open language for (lumped parameter) modeling and simulation and is generating a growing following, especially in Europe. Modelica is also at the heart of simulation tools like MapleSim. We are generally not making a big deal of that fact and as a result we have a regular stream of actual and potential customers asking us why we are not more vocal about our use of Modelica. Do we not believe in open...

It was twenty years ago in May that I started with Maplesoft (known then as Waterloo Maple Software) in a tiny office at 608 Weber Street North in Waterloo, Ontario. After having done my graduate work under Maple co-founder Gaston Gonnet, I was invited to join the fledgling company as Technical Manager and the first full-time employee.

The SAE (Society of Automotive Engineers) World Congress is an annual event in April that draws automotive engineers from around the world to Detroit to learn about and share thoughts on new techniques and technologies. Once again this year, Maplesoft was an active participant. This was a milestone event for us as it was the first SAE Congress where we could show off and fully demonstrate the potential of the MapleSim/Maple solution. Even in these trying times in the auto industry, our corner remains vibrant and very optimistic about the future.  In no particular order, here are some highlights.

I don’t think anyone would argue that the last few years have been pretty eventful. Modern industry is facing critical challenges, as design tasks become increasingly complex. Fortunately, we are seeing the development of new technologies that are allowing us to rise to the challenge. Techniques like rapid plant modeling for control applications, robust formulation techniques for automatic model generation, and the application of symbolic computation technology are accelerating the modeling process while ensuring correctness and sound scientific principles. The world of engineering is changing, and I’ve been fortunate to watch some of these developments first-hand.

When I was a toddler and learning about the concept of numbers, I used to play a simple game with my parents.  They’d think of a number, and I’d try to guess it.  They would shout “hotter!” if I were getting closer to the number and “colder!” if I was getting further away.  I’m still fascinated by number games, but now it’s Sudoku, the Countdown numbers game… or balancing my bank account at the end of the month.

I spent many of my callow teenage years playing games of chance involving dice and cards.  But it was only after I stopped playing that I stopped losing money. I guess at that time I never really understood the Gambler’s Fallacy, or probability itself.

(Pop quiz: Toss a coin 40 times - what are the chances of getting six heads or six tails in a row? The answer’s in a post script below, together with some Maple code.)

At university, I became fascinated by a UK quiz show called Countdown (and not just because I had a crush on Carol Voderman – an ex-presenter).  In one of the rounds, the contestants have to find the combination of additions, subtractions, multiplications and divisions to make six seed numbers equal a target. 

I’ve attached a Maple worksheet that automatically solves the Countdown numbers game (a simple click of a button asks Maple to find the solution for you).  Kent – one of the sales people I work with – was so fascinated by the worksheet that he spent an entire weekend playing with it, much to the displeasure of his wife and kids. 

Now, if I want some mental stimulation, I often crack open a book of Sudoku puzzles I’ve got lying around. By the time I’m bored, I usually break out Joe Riel’s fantastic Maple-based Sudoku solver.

P.S The following Maple procedure gives the probability of k heads (or k tails) in a row out of n coin tosses.

Many people underestimate the chances of getting 6 heads in a row out of 40 coin tosses, and find it hard to accept it’s as high as 26%.  Given a large enough sample size, the improbable is likely to happen.  How else do you explain the English football team finally having a run of wins?

Download the attachment: CountdownNumbersGam.mw

Over the past few months, a team of dedicated staff has been working hard on a project that has recently come to fruition: I’d like to introduce you to Maplesoft’s new and improved Application Center. The Application Center provides one central place where you can find “thousands of free applications from the Maplesoft community”, such as Maple documents, graphics, animations, and packages; and MapleSim models, components, and templates.

While visiting a cathedral in Germany, Bob Schipke, a retired Harvard mathematician was astounded to find a glyph in a 13th century manuscript that looked remarkably like the Mandelbrot set.  This led to a remarkable voyage of discovery that was publicised in a

A prolonged winter is one of the challenges of living where I do. But each year, we also get the pleasure of experiencing the very first spring day and that’s a special feeling that I would not trade for all the tropical weather in the world. For me, spring in my town is not defined by the temperature or amount of sunshine. It’s defined, oddly enough, by robots … the third week in March is typically the week of the FIRST Robotics Waterloo Regional Tournament. FIRST stands for “For Inspiration and Reward of Science and Technology”. It is an international team sport where high-schools from around the world compete in complex robotic games with full sized remote controlled and autonomous robots on the playing field about the size of half a basketball court.

As I was preparing for an upcoming presentation, I stumbled on a graphic that I always thought was one of the best ones in my endless collection of Powerpoint slides. This particular graphic portrays the evolution of engineering modeling software and I always thought it was an incredibly impactful and clear view on a very complex topic. Unfortunately, I really can’t take any credit for it. The basic concept was created by Mr. Alex Ohata of Toyota. I remember the first time I saw it at a conference.  It really was one of those light-bulb moments where the Universe unfolded as it should … and now I pay due homage to this work of scientific art.

In the media today, there continues to be much discussion about how students in North America are moving away from the math, science, and engineering disciplines. It is an established fact that countries such as China, South Korea, and Taiwan graduate a much higher number of engineering students than those in North America. This is a cause for great concern in today’s highly complex world, and schools are attempting to solve the problem with math in a variety of ways, with varying success rates.

I suspect many of our readers are already on to this, but for the few uninformed among us, tomorrow is the 21st annual Pi Day. On March 14, this “holiday” is celebrated by those of us geeky enough to realize that this date, 3/14, is also the common approximation of the number π. The first Pi Day celebration was held in 1988 at the San Francisco Exploratorium, led by its creator, Larry Shaw. Those attending this year’s festivities have a chance to work on pi puzzles, sing pi songs, and of course, eat lots of tasty pie. Their Pi Day website includes lots of fun information and activities you can even do at home. If you’re not in the area, be sure to check out their webcast, or join the revels on Second Life at the ‘Splo, the online version of the Exploratorium.

Hi. I am the Marketing Communications Manager at Maplesoft. This is the first piece of writing where you get to know who I am, but many of you have probably already read a lot of what I’ve written. I am responsible for the promotion of Maplesoft products. It’s my job to take what the really smart Maplesoft employees create and turn it into something engaging (and typically say all I need to say in 3 paragraphs or less, or in the case of subject lines, 49 characters or less). Within every piece of highly technical math-filled piece of writing is a gem of a story waiting to be brought out. I try (sometimes successfully, I hope) to bring out these stories. Every time you’ve read our newsletter “The Maple Reporter,” an email, or a letter from Maplesoft, you’ve read my work. My goal is for people to read what I write and say “I want that!” or “how do I do that?”

It’s no secret that I have a soft spot for matters of space and space exploration … so even if we have all sorts of great news about modeling advancements in automotive, or electronics, it will never be as thrilling (yes this is the right word) as the things I encounter through my work at Maplesoft that deal with space. In countless blog posts, I’ve commented on aerospace engineering and space exploration, and once again this week, several events have confirmed that inside me, there is still this wide eyed boy staring into the night sky in amazement …

Great playwrights and poets are drummers – they craft the written word so that the rhythm and the cadence of their dialogue when spoken are a drumbeat, and combine with the meaning of the language to create emotion.  Shakespeare, for example, used syllables as his drumbeats (as did many other playwrights and poets).  Analyzing linguistic structure isn’t a common application for a math tool (and for a very good reason), but can Maple tell us more about Shakespeare’s favourite drumbeat?

We need to find some way of programmatically counting the number of syllables in a word. In an irregular language like English, this is a hit-and-miss affair.  Maple’s SyllableLength command, for example, tallies the number of vowel-consonant changes in a word to calculate the number of syllables (but increases the count by one if the word ends in a “y”.)  While this is a good start, for many words it’s merely an approximation. Conscious and serious, for example, have the same number of vowel-constant changes, but a different number of syllables when spoken.

I chose to modify the basic premise of SyllableLength with several empirical adjustments that give a more accurate tally of the number of syllables in a word.  This simply involves increasing or decreasing the calculated number of vowel-consonant changes if a word contains a particular letter structure.  For example, terrible has two vowel-consonant changes, but we increase this count by one (to calculate the number of syllables) because it ends in ble.

Although we can implement a number of these workarounds, this (admittedly very clumsy) approach is never going to account for the full irregularity of the English language, and we have to accept the results in that light.  The attached worksheet contains the chosen approach, and I’d appreciate feedback on more accurate ways of programmatically counting the number of syllables in a word.

So, let’s start by examining the monologue in Act 3 Scene 1 of Henry V.  Here’s the number of syllables per line as computed by the attached worksheet.

“Once more unto the breach, dear friends, once more;”
10 syllables

“Or close the wall up with our English dead”
10 syllables

“In peace there’s nothing so becomes a man”
10 syllables

“As modest stillness and humility”
10 syllables

“But when the blast of war blows in our ears,”
10 syllables

“Then imitate the action of the tiger”
11 syllables

So it looks like Shakespeare used ten beats, or syllables, per line, but placed an extra syllable in the final quoted line.  In fact, he often wrote monologues in a style called iambic pentameter, in which each line consists of five syllable-pairs (the first syllable in each pair being unstressed and the second stressed)

In much the same way that the darkening of a cinema is a visual cue that implies that a movie is about to begin, Shakespeare used iambic pentameter as an audio cue to signify emotionally resonant or particularly important dialogue, occasionally varying the number of syllables (or the number of polysyllabic words) per line to create a sense of discord, or a quickening or slowing of pace.

You might want to check out the following video – it’s Kenneth Brannagh’s version of the full speech in his 1989 film adaptation of Henry V.

Here’s another example from Romeo and Juliet (Act 3 Scene 5), together with the syllable counts given by Maple.

“Wilt thou be gone? It is not yet near day”
10 syllables

“It was the nightingale, and not the lark”
10 syllables

“That pierced the fearful hollow of thine ear”
11 syllables

“Nightly she sings on yond pomegranate tree”
11 syllables

“Believe me, love, it was the nightingale”
10 syllables

Again, Shakespeare shifts between 10 and 11 syllables per line to indicate emotionally resonant and poetic dialogue.

Shakespeare did not write entirely in verse with a defined metric structure.  He also wrote in free prose with no defined syllable structure, sometimes to indicate that the speaker was vulgar or mentally unbalanced, or in short question-answer dialogue.

Given the limitations of a purely programmatic approach, we’re never going to fully deconstruct the beauty of Shakespeare’s language.  Maple can, however, offer a small insight into how he controlled the rhythm and pace of his dialogue.

Download the attachment: Shakespeare.mw

First 19 20 21 22 23 24 Page 21 of 24