## Bug in evalf@Int

Let us consider

```restart; Digits := 20; evalf(Int(abs(cos(1/t)), t = 0 .. 0.1e-1), 3);
-0.639e-2```

Pay your attention to the minus sign. Simply no words. Mma produces 0.006377.

evalf@Int.mw

## new book: "Understanding Maple"

by: Maple

Ian Thompson has written a new book, Understanding Maple.

I've been browsing through the book and am quite pleased with what I've read so far. As a small format paperback of just over 200 pages it packs in a considerable amount of useful information aimed at the new Maple user. It says, "At the time of writing the current version is Maple 2016."

The general scope and approach of the book is explained in its introduction, which can currently be previewed from the book's page on amazon.com. (Click on the image of the book's cover, to "Look inside", and then select "First Pages" in the "Book sections" tab in the left-panel.)

While not intended as a substitute for the Maple manuals (which, together, are naturally larger and more comprehensive) the book describes some of the big landscape of Maple, which I expect to help the new user. But it also explains how Maple is working at a lower level. Here are two phrases that stuck out: "This book takes a command driven, or programmatic, approach to Maple, with the focus on the language rather than the interface", followed closely by, "...the simple building blocks that make up the Maple language can be assembled to solve complex problems in an efficient way."

## Logistic Model with Harvesting

by: Maple

A population  governed by the logistic equation with a constant rate of harvesting satisfies the initial value problem . This model is typically analyzed by setting the derivative equal to zero and finding the two equilibrium solutions . A sketch of solutions  for different values of a suggests that the larger equilibrium is stable; the smaller, unstable.

When a is less that the unstable equilibrium,  becomes zero at a time , and the population becomes extinct. If  is not interpreted as pertaining to a population, its graph exists beyond , and actually has a vertical asymptote between the two branches of its graph.

In the worksheet "Logistic Model with Harvesting", two questions are investigated, namely,

1. How does the location of this vertical asymptote depend on on a and h?
2. How does the extinction time , the time at which , depend on a and h?

To answer the second question, an explicit solution , readily provided by Maple, is set equal to zero and solved for . It turns out to be difficult both to graph the surface  and to obtain a contour map of the level sets of this function. Instead, we solve for  and obtain a graph of  with  as a slider-controlled parameter.

To answer the first question, the explicit solution, which has the form , exhibits its vertical asymptote when . Solving this equation for  gives the time at which the vertical asymptote is located, a function that is as difficult to graph as . Again the remedy is to solve for, and graph, , with  as a slider-controlled parameter.

## Realizing measurements from a sheet of paper using...

Ever needed to measure something and all you had was a piece of paper?  This leads us to how we can use maple to figure out what we can measure using a sheet of standard 8-1/2" x 11" paper.

Can we measure 6" with a sheet of paper?

```> eq := (17/2)*x+11*y = 6;
17
eq := -- x + 11 y = 6
2
> eq2 := isolve(eq, a);
eq2 := {x = -20 - 22 a, y = 16 + 17 a}
> subs(a = 0, b = 0, eq2);
{x = -20, y = 16}
```

So that is the simplest case, stacking up 16 pieces on the long side and subtracting 20 on the short side.  A total of toppling the piece of paper over 36 times.  That's a high percentage of of error.

But wait!  haha.   Wouldn't a fold make it simpler?  Sure!  Fold the 8.5" across and we now have 2.5" to work with.

```> eq := (17/2)*x+11*y+(5/2)*z = 6;
17            5
eq := -- x + 11 y + - z = 6
2             2
> eq2 := isolve(eq, {a, b});
eq2 := {x = a, y = 1 + 4 a + 5 b, z = -2 - 21 a - 22 b}
> subs(a = 0, b = 0, eq2);
{x = 0, y = 1, z = -2}
```

Less toppling of pieces of paper and much less error.

## Maple Goes on Display at the Science Museum, Londo...

by: Maple

Last week Michael Pisapia, Maplesoft European VP, attended the opening reception of Mathematics: The Winton Gallery at the Science Museum in London. Ahead of being open to the public on 8th December, contributors and donors were invited to take a look behind the scenes of the new gallery, which explores how mathematicians, their tools and ideas have helped to shape the modern world over the last four hundred years.

The gallery is a spectacular space, designed by the world-renowned Zaha Hadid Architects, housing over a hundred artefacts of mathematical origin or significance. It is divided up into disciplines ranging from navigation to risk assessment, and gambling to architecture. Inspired by the Handley Page aircraft, the largest object on display, and suspended as the centrepiece, the gallery is laid out using principles of mathematics and physics. It follows the lines of airflow around it in a stunning display of imagined aerodynamics, brought to life using light and sculpture. You can learn more about its design in this video.

Guests at the reception enjoyed a specially commissioned piece of music from the Royal College of Music titled ‘Gugnunc’, named after the aircraft and inspired by the rhythms of Morse code and mathematical and mechanical processes, and performed at the centre of the gallery.

Of course any exhibit celebrating all things maths is of great interest to us here at Maplesoft, but this one especially so, since Mathematics: The Winton Gallery showcases the earliest available version of Maple.

A copy of Maple V, from 1997, sits in ‘The Power of Computers’ section of the Winton Gallery, in an exhibit which tells the story of the significant role played by mathematical software in improving the quality of mathematics education and research. Other objects in the section include a Calculating Machine from the Scientific Service circa 1939, a PDP-8 minicomputer from the 1960s, and part of Charles Babbage’s mid-19th century analytical engine, intended as a high-powered mathematical calculator.

As many of you will remember, Maple V was a major milestone in the history of Maple, providing unparalleled interactivity, powerful symbolics and creative visualization in mathematical computation and modeling. For a walk down memory lane, check out Maple V: The Future of Mathematics (ca. 1994) on YouTube.

Seeing this copy of Maple finally in place in the exhibit marks the end of a long journey – and not just in the miles it travelled to arrive at the museum from its home in Canada. When we were first approached by the Science Museum for a donation of Maple, we launched a hunt to find not just the right copy of Maple with its box and manuals, but also artefacts that showcased the origin and history of Maple. It was a journey down memory lane for the inventors of Maple as well as the first few employees as they dug out old correspondences, photos, posters and other memorabilia that could be showcased. Today they can be proud of their contribution to this display at the Science Museum.

Although the case of historic software packages is visually less impressive than many of the other items in the gallery, it certainly attracted plenty of attention as guests made their way in for the first time.

For fans of Maple V - and there are many - it’s reassuring that the Science Museum are now entrusted with preserving not only the iconic packaging, but with telling the story of Maple’s history and marking its place in the evolution of mathematics and technology.

To see the timeline of Maple’s evolution over the years, visit:  http://www.maplesoft.com/25anniversary/

## Incompetent results of Student[Precalculus]:-Limit...

Maple 2016

Let us consider

`Student[Precalculus]:-LimitTutor(sqrt(x), x = 2);`

One expects a nice illustration of the result sqrt(2). But instead of that one reads "f(x) approaches 1.41 as x approaches 2". This is simply ignorant and forms a wrong understanding of limits. It should also be noticed that all the entries (left, 2-sided, and right) produce the same animation. The same issue with other limits I tried, e.g.

`Student[Precalculus]:-LimitTutor(sqrt(x), x = 1);`

. I think this command should be completely rewritten or excluded from Maple.

## CodeBuilder: Build a package from code edit regions...

by: Maple

A number of MaplePrimers have asked how one might use the section and subsections of a Maple worksheet to structure the source code of an extended Maple package.  The usual answer is that it cannot be done; a module-based Maple package must be assigned in a single input region in a worksheet.  A recommended alternative is to write the source in text files and use either command line tools or the Maple read command from a worksheet to assign the package.  Because the read command handles Maple preprocessor macros, specifically the \$include macro, the source can be conveniently split into smaller files.

I prefer this file-based method for development because text files are generally more robust than Maple worksheets, can be edited with the user's preferred editor, can be put under version control, and can be searched and modified by standard Unix-based tools.  However, not everyone is familiar with this method of development.  With that in mind, I wrote a small Maple package, CodeBuilder, that permits splitting the source of a Maple package (or any Maple code) into separate code edit regions in a standard Maple worksheet, using \$include macros to include the source of other regions.  To build the package, the code edit regions are written to external files, using the names of the regions as the local file name relative to a temporary directory.

The package includes a method to run mint on the source code.  The result can be either printed in the worksheet or displayed in a pop-up maplet that allows selecting the infolevel and the region to check.

CodeBuilder includes help pages and a simple example (referenced from the top-level help page) demonstrating the usage.  To install the package, unzip the attached zip file and follow the directions in the README file.

CodeBuilder-1-0-3.zip

Errata Just noticed that a last minute change broke some of the code.  Do not bother with the 1-0-1 version; I'll upload a new version shortly.  The latest version (1-0-3) is now available.

## Still undocumented RealDomain package

Maple 2016

Let us look in RealDomain and then in the RealDomain:-solve command. One is addressed to the usual solve command. The commands of the RealDomain package are not still documented since Maple 7 when the package was introduced. There is a general description only

• By default, Maple performs computations under the assumption that the underlying number system is the complex field. The RealDomain package provides an environment in which computations are performed under the assumption that the basic underlying number system is the field of real numbers.
• Results returned by procedures are postprocessed by discarding values containing any detectable non-real answers or replacing them with undefined where appropriate.

The above is not enough. Here is an example which confuses me:

```RealDomain:-solve(exp(I*x) = -1, AllSolutions);
NULL```

though

```solve(exp(I*x) = -1, AllSolutions);
Pi (2 _Z1 + 1)
```

and

```RealDomain:-solve(exp(I*x) = -1);
Pi
```

I lie awake thinking about that. Maplesoft staff help me!

## Inconsistency in DFT windowing functions????

by: Maple 2016

The DFT windowing functions in the SignalProcessing package seem to be inconsistent in the type of data they will accept, and the type they return.

BartlettHannWindow,  BlackmanHarrisWindow, BlackmanNuttallWindow,   BohmanWindow, CauchyWindow, CosineWindow, ExponentialWindow, FlatTopWindow,  GaussianWindow, HannPoissonWindow, ParzenWindow, PoissonWindow,  RectangleWindow, ReiszWindow, RiemannWindow, TaperedCosineWindow, TriangleWindow, TukeyWindow

accept Arrays, containing almost any data type (haven't tried them all!) as input. and always return a Vector[row].

But

BartlettWindow, BlackmanWindow, HammingWindow, HannWindow, KaiserWindow

require that the option datatype=float[8] be set in the Array() constructor, which is used as input and always return an hfarray.

Thus, for example

with(SignalProcessing);
sig:= Array( -50..50,
fill=1
):
BartlettHannWindow(sig); # this works
BartlettWindow(sig);# this fails with datatype unsupported error

Very confusing!!!!

## Bug in Mode

Maple 2016

Let us consider

```Statistics:-Mode(Binomial(n, p));
floor((1 + n) p)
```

Up to Wiki, the output is not correct. Simply no words.

## Can not copy paste in mapleprimes

MaplePrimes

The copy paste and snip tool used to work.  I can no longer use either to paste in mapleprimes.

## Bug in integrate

by: Maple 2016

There seems to be a bug in determining the folowing integral analytically:

integrate(-(3/2*(exp(-(1/4)*x)*x-sqrt(Pi)*erf((1/2)*sqrt(x))*sqrt(x)))/(sqrt(x)*sqrt(Pi)*erf((1/2)*sqrt(x))), x = 0..1)

Maple gives as a result

3/2

However, numerically integrating it

integrate(-(3/2*(exp(-(1/4)*x)*x-sqrt(Pi)*erf((1/2)*sqrt(x))*sqrt(x)))/(sqrt(x)*sqrt(Pi)*erf((1/2)*sqrt(x))), x=0..1,numeric)

gives

0.1195461293

In fact, integrating it from a to b,

integrate(-(3/2*(exp(-(1/4)*x)*x-sqrt(Pi)*erf((1/2)*sqrt(x))*sqrt(x)))/(sqrt(x)*sqrt(Pi)*erf((1/2)*sqrt(x))), x=a..b)

gives

-3/2 a + 3/2 b

suggesting that Maple thinks the integrand is just 3/2. If one plots it, then it becomes obvious that this is not the case.

## Bug in Statistics,PDF

Maple 2016

 (1)

 (2)

 (3)

There were recently submitted a dozen Maple bugs by me and others. Maplesoft have brought no responses. They keep strategic silence. True merit is not afraid of criticism.

## Strange bug in int

by:

I found a strange bug in int.
For some functions f(x), Maple is able to compute the antiderivative (correctly) but refuses to compute the definite integral.
Or, computes the integral over 0..1  and  0..2  but refuses to compute over 1..2.

 > int(exp(x^3), x);  #ok
 (1)
 > int(exp(x^3), x=1..2); #?
 (2)
 > int(exp(x^3), x=1..2, method=FTOC); #??
 (3)
 > int(exp(x^3), x=0..2); #?
 (4)
 > int(exp(-x^3), x);  #ok
 (5)
 > int(exp(-x^3), x=0..2);  #ok
 (6)
 > int(exp(-x^3), x=0..1);  #ok
 (7)
 > int(exp(-x^3), x=1 .. 2);  #???
 (8)

## Bug in int,CPV

Maple 2016

Let us consider

```restart; J := int(cos(a*x)^2/(x^2-1), x = -infinity .. infinity, CPV);
-(1/4)*Pi*sin(2*a)*csgn(I*a)-(1/4)*Pi*sin(2*a)*csgn(I/a)```

This result is not true for a=I:

```eval(J, a = I);
0
```

In this case the integral under consideration diverges because of

```cos(I*x)^2;

cosh(x) ^2
```

 4 5 6 7 8 9 10 Last Page 6 of 251
﻿