Why don't these structured types work?...

Why don't these structured types work? > type(Pi, symbol); > evalb(Pi::symbol); > type(Pi, constant); > evalb(Pi::constant); > type(x, symbol); > evalb(x::symbol); > type(x, constant); > evalb(x::constant); > type(Pi, symbol and not constant); > evalb(Pi::(symbol and not constant)); > type(x, symbol and not constant); > evalb(x::(symbol and not constant)); I know we can do it using TypeTools[AddType]( variable, t->evalb(t::symbol and not t::constant) ); but why doesn't the simple version work? Phil

How to color a region

Maple
Wen-Xiu Ma recently asked in the maple-assist group,
```How to color the following region?
a:=plot([t^2,t^3-1,t=-3..3):
b:=plot([t^3+1,t^2-3,t=-3..3):
c:=plot([t^2+2,t^5-4,t=-3..3):
display([a,b,c],view=[0..5,-3.5..11]);```

Maplets/Lists...

How do I extract an element from a list in a Maplet? In Maple, if I wanted the 1st entry in list A, I'd just use A[1]. In a Maplet, the output of a DropDownBox is a list containing a string, but 'DDB'[1] seems to make no sense to the Maplet.

Maple Baseball

by: Maple
Early this season, after the Maplesoft team came out on the wrong side of a 13-6 loss, we were frustrated by the team's inability to score more runs. The previous year we averaged 14 runs a game. This started me wondering, just how many runs can our team expect with a given lineup? Suppose you assume that it takes three hits in an inning to start scoring runs. Now, let's assume you have five .500 hitters coming up to bat. What is the probability that you'll get 3 hits among those five batters, thus scoring one run?

Ponder This

Maple
Joe Riel and Thomas Richard posted in their blogs solutions to the latest IBM Ponder This challenge and some related questions. From the name of the attached files, one can deduct that Thomas Richard is user No. 50 and Joe Riel is user No. 84. Being curious about my user number, I also decided to attach a worksheet.

stack limit

by: Maple

Chi^2 calculations above some "size" or "complexity", using Maple 9.5 and Global Optimization Toolbox (GOT), may produce after some time of calculation error messages like:

"Execution stopped: stack limit reached.
The kernel has been shut down. Further computation cannot be performed."

Seeking workarounds, I have looked for information at ?kernelopts for kernelopts(stacklimit), but it was not very useful:

"Limits may be raised or lowered. Maple limits may not be raised above any system defined hard limits. "

spin coefficients using npspin...

I need to calculate spin coefficients using a tetrad of null vectors, {l, n, m and m*} that I constructed for a certain metric. The brute tensor calculations are very lengthy, especially for this metric. On the other hand I have tried to use Maple (9.5) npspin; and the example given on the use of npspin. It's not clear from the example whether the entries (1,1),...(2,3)...etc are: 1) from setting the rows of the covariant vectors l, n, m and m* adjuscent to each other(?) to form some 4 X 4 matrix; or 2) from the metric g (elements) through dyadic combinations (1/2)ln+(1/2)nl-(1/2)mm*-(1/2)m*m that form it.

A brute force search for a certain 9-digit number

Maple

Here's a quick and dirty solution to the following task:
Arrange digits 1,...,9 so that the first two form a number divisible by 2, the first three form a number divisible by 3, etc..

Communicate with Help Browser from outside Maple...

Has anyone attempted to communicate with the help browser from outside Maple? Specifically, to request it to display a particular help topic? I have occasional use for this. My current approach is to use cmaple; that's easy to launch with a help request, however, sometimes I prefer the additional capability of the gui browser.

Changing background color of the help browser

by: Maple
Previously I described how to change the default zoom setting for the Maple gui by modifying the appropriate initialization file. Another useful setting to change is the default background color of the help browser. This is done by modifying, in the initialization file, the line HelpBGColor=. I set it to HelpBGColor=240 240 240, that gives a light gray background that is less harsh on my eyes. The three fields should be integers from 0 to 255; they correspond to the red, green, and blue components of the color.

Setting nonstandard default zoom

by: Maple
A poster on comp.soft-sys.math.maple recently asked how to set the default zoom for worksheets to a non-standard value; the jump from 100% to 150% being rather large. Standard GUI This can be readily accomplished by modifying the proper Maple initialization file.
Linux
the file is ~/.maple10rc
Mac OS X
the file is Maple 10 Preferences in Library/Preferences under your user directory (thanks to Tim Lahey).
Windows
the file is Maple10.ini (not maple.ini). The maple help pages do not mention this file and I do not have Windows, so cannot check. I have received reports that it is located in the users subdirectory under the Maple installation directory, but also reports that it is in c:\Documents and Settings\JoeUser, where JoeUser is your user name. My advice, until this is cleared up, is to search for all instances of this file and use the newest one. Maple writes to this file whenever the gui exits, so the newest one should be the right one. You might send me a note on what you've found (along with which version of Maple you are using); I'll update this accordingly.

How to run old versions of Maple in new versions...

by: Maple
When I upgraded my Mac G5 from OS 10.3 to OS 10.4, the OS X versions of Maple (Maple 9.5 and Maple 10) continued to work. But the classic versions of Maple (Maple 7 and Maple Vr5) quit working. It turns out that the classic versions will run in OS 10.4 if the following files (perhaps from an old "System Folder") are moved into the "Extensions" folder of the active classic OS 9 "System Folder":