Personal Stories

Stories about how you have used Maple, MapleSim and Math in your life or work.

Since much of what I post couldn't possibly be of interest to anyone else, I thought I'd use the blog. If I remember its existence, I'll try to post here stuff to myself. After all it's less likely to be lost here than in the maze of my harddrive.

Every year my extended family does a "secret santa" gift exchange. Each person draws another person at random and then gets a gift for them. At first, none of my siblings were married, and so the draw was completely random. Then, as people got married, we added the restriction that spouses should not draw each others names. This restriction meant that we moved from using slips of paper on a hat to using a simple computer program to choose names. Then people began to complain when they would get the same person two years in a row, so the program was modified to keep some history and avoid giving anyone a name in their recent history. This year, not everyone was participating, and so after removing names, and limiting the number of exclusions to four per person, I had data something like this:

One of the most common foods prepared at this time of the year, and arguably the most common kitchen disaster, is turkey. 

There are several employees here at Maplesoft (myself included) who are full-fledged foodies:  not only do we enjoy eating good food, but we enjoy preparing it with all our cool kitchen gadgets.  Just as mathies may compare calculators, we compare chef’s knives.  So being a foodie and a mathie, I was quite intrigued when a co-worker sent me an article that found the optimal cooking temperature for a turkey.

For those of you who have had to take on the task of preparing a turkey, you’re probably familiar with this basic rule of thumb (thousands of burnt turkeys must have contributed to this rule): preheat the oven to 400°F, and then cook it for 20 min/lb at 350 °F.  Essentially what this rule means is that the time required to cook a turkey is directly proportional to the mass of the turkey.  We know that this cannot be true because some people who adhere to this rule will have a turkey that is moist and tender, and others will have a turkey that is dry and tough.  If we take more variables into account, like the size of the turkey (l), oven temperature (T), average density (ρ) and thermal conductivity (κ) we can create a function with respect to time . We can now do a bit of dimensional analysis on this to evaluate the accuracy of the traditional rule of thumb.  By using dimensional analysis, we can formulate a relation between a set of known variables, even though we are not sure of the relationship between these variables. The immediate advantage of this procedure is that less experimentation is required to establish a relationship between the variables, allowing us to take given data and see how it will fit with the equations that are created in the analysis.  I won’t go into full detail here, but I’ve created a Maple worksheet that shows the calculations used in the analysis.  The important part comes from the graphs that are generated:

The black dots represent various cooking times of various sizes of birds.  The red line is the old rule of thumb, which you can clearly see is not very reliable.  The green line represents the new rule of thumb which falls in line much better.  So, what is the magical formula that you should use?  Based on the analysis:  where x is in lbs and the resulting time is in minutes.  Now I will be honest, I haven’t put this to the test yet, but I’ll be sure to try it out this Christmas.

Eleven years ago, one of the Maplesoft developers sent around the office this Maple language port of the first example of obfuscated code here.

This code below is text, for insertion in 1D Maple Notation, and runs in

An attempt at question 2 of the xkcd Velociraptor Math problem (mentioned on this blog post). The parameters and events facilities of

There is no released Classic interface to accompany the 64 bit version of Maple (12, 13) for the 64 bit Windows XP64 operating system. Personally, I prefer running the Standard over the Classic interface, although sometimes I miss common subexpression display for lengthy symbolic output.
 
The Maple Classic interface appears to talk to the Maple kernel only over a socket (or similar), and the...

It’s a small world, but there are still too many borders.

I’ve recently become a fan of country music.  It amazes and amuses my wife and children, but I find that country music tells stories that contain some very basic truths.

Brad Paisley sings a song named “Welcome to the Future”.  He begins that song by telling his grandfather’s story of being a soldier in the Philippines fighting the Japanese during World...

There is something profoundly satisfying when something that goes “viral” on the Web has some connection to your life. This happened recently when I and my colleagues were pointed towards a video of some laboratory robots that somehow drew almost a million views on YouTube alone. For an engineer,...

I used to really enjoy reading mapleprimes and answer questions.  It was fun.  There were challenging questions, and some rather interesting design discussions.

And then I got bored.  I am not totally sure exactly why.  In some ways, I think the density of challenging questions went down.  Well, that's perhaps not quite right either -- the density of new (challenging) questions went down.

I recently ran into an interesting twist on the infamous Maple anti-pattern:

# A very garbagey way to build a list
l := [];
for i from 1 to 10000 by 100 do
l := [op(l), isqrt(abs(floor((5000-i)/2)))];
end do;

A lot of users fall prey to this method of building a list rather than using :

# generate a list without extraneous garbage
l := [seq(isqrt(abs(floor((5000-i)/2))),i=1..10000,100)];

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...

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

To celebrate 3.14 for 2009, I made the attached worksheet with an interactive Pi Chart (also a pie chart) to plot the relative frequency of the digits of pi in various bases.  Enjoy.


View 5480_PiFreq-component.mw on MapleNet or Download 5480_PiFreq-component.mw
View file details

 

The guts of the worksheet is the following:

basesymbols := Array(0..35, ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]):

n := 200; # number of digits
k := 10; # base 
N := ceil(log[10](k)*n)+1;

approxPi := round(evalf[N+1]((Pi-3)*10^(N))):

PiList := map(x->basesymbols[x],convert(approxPi, base, k)): 

PiString := cat(op(map(convert, PiList[1..n], string))):

T := [StringTools:-CharacterFrequencies(PiString)]:

Statistics:-PieChart(T, color=blue..magenta);

 

First 19 20 21 22 23 24 25 Page 21 of 27