## 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
```

## Bug in MultiSeries:-series

Maple 2016

Let us consider

```MultiSeries:-series(Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)), x = 0);

x-(1/2)*x^2+(1/4)*x^4-(1/2)*x^6 +O(x^7)
```

```MultiSeries:-limit(diff(Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)), x), x = 0);
undefined
MultiSeries:-limit((Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)))/x, x = 0, right);
1
MultiSeries:-limit((Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)))/x, x = 0, left);
undefined
plot((Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)))/x, x = -0.1e-1 .. 0.1e-2, discont, y = -5 .. 5);
```

## Integrate Heaviside bugs

by: Maple

Correct computatiton for

for reasonable expressions f(x,y), g(x,y) would be very useful in double integrals.

For the moment this is not possible. Too many bugs:

int(Heaviside(1-x^2-y^2), x=-infinity..infinity, y=-infinity..infinity); #should be Pi
undefined
int(Heaviside(1-x^2-y^2), x=-1..1, y=-1..1); #should be Pi
0
int(Heaviside(y-x^2), x=-1..1, y=-1..1); #should be 4/3
-2

int(Heaviside(y-x^2), y=-1..1, x=-1..1); #This one is OK!
4/3

## Bug in Probability

Maple 2016
```restart; with(Statistics):
X := RandomVariable(Normal(0, 1)): Y := RandomVariable(Uniform(-2, 2)):
Probability(X*Y < 0);```

crashes my comp in approximately 600 s. Mma produces 1/2 on my comp in 0.078125 s.

## Bug in Statistics:-CDF

Maple 2016

Let us consider

```with(Statistics):
X1 := RandomVariable(Normal(0, 1)):
X2 := RandomVariable(Normal(0, 1)):
X3 := RandomVariable(Uniform(0, 1)):
X4 := RandomVariable(Uniform(0, 1)):
Z := max(X1, X2, X3, X4); CDF(Z, t);

int((1/2)*(_t0*Heaviside(_t0-1)-_t0*Heaviside(_t0)-Heaviside(1-_t0)*Heaviside(-_t0)+Heaviside(-_t0)+Heaviside(1-_t0)-1)*(1+erf((1/2)*_t0*2^(1/2)))*(2^(1/2)*Heaviside(_t0-1)*exp(-(1/2)*_t0^2)*_t0-2^(1/2)*Heaviside(_t0)*exp(-(1/2)*_t0^2)*_t0-2^(1/2)*Heaviside(-_t0)*Heaviside(1-_t0)*exp(-(1/2)*_t0^2)-Pi^(1/2)*undefined*erf((1/2)*_t0*2^(1/2))*Dirac(_t0)-Pi^(1/2)*undefined*erf((1/2)*_t0*2^(1/2))*Dirac(_t0-1)+2^(1/2)*Heaviside(-_t0)*exp(-(1/2)*_t0^2)+2^(1/2)*Heaviside(1-_t0)*exp(-(1/2)*_t0^2)-Pi^(1/2)*undefined*Dirac(_t0)-Pi^(1/2)*undefined*Dirac(_t0-1)+Pi^(1/2)*Heaviside(_t0-1)*erf((1/2)*_t0*2^(1/2))-Pi^(1/2)*Heaviside(_t0)*erf((1/2)*_t0*2^(1/2))-exp(-(1/2)*_t0^2)*2^(1/2)+Pi^(1/2)*Heaviside(_t0-1)-Pi^(1/2)*Heaviside(_t0))/Pi^(1/2), _t0 = -infinity .. t)```

whereas Mma 11 produces the correct piecewise expression (see that here screen15.11.16.docx).

`Edit. Mma output.`

## Discordance of outputs of two limit commands

Maple
```limit((x^2-1)*sin(1/(x-1)), x = infinity, complex);
infinity-infinity*I
MultiSeries:-limit((x^2-1)*sin(1/(x-1)), x = infinity, complex);
infinity```

whereas the same outputs are expected. The help http://www.maplesoft.com/support/help/Maple/view.aspx?path=infinity&term=infinity does not shed light on the problem. Here are few pearls:

• infinity is used to denote a mathematical infinity, and hence it is usually used as a symbol by itself or as -infinity.
• The quantities infinity, -infinity, infinity*I, -infinity*I, infinity + y*I, -infinity + y*I, x + infinity*I and x - infinity*I, where x and y are finite, are all considered to be distinct in Maple. However, all 2-component complex numerics in which both components are infinity are considered to be the same (representing the single point at the "north pole" of the Riemann sphere).
• The type cx_infinity can be used to recognize this "north pole" infinity.

## Bug in implicitplot

Maple

The command

```plots:-implicitplot(evalc(argument((1+x+I*y)/(1-x-I*y))) <= (1/4)*Pi, x = -5 .. 5, y = -5 .. 5, crossingrefine = 1, gridrefine = 2, rational = true, filled, signchange = true, resolution = 1000);
```

produces an incorrect result

in view of

```evalf(argument((1-4+4*I)/(1+4-4*I)));
2.889038378
```

There is a workaround

`plots:-inequal(evalc(argument((1+x+I*y)/(1-x-I*y))) <= (1/4)*Pi, x = -5 .. 5, y = -5 .. 5);`

Maple

The command

`restart; st := time(): FunctionAdvisor(EllipticE); time()-st;`

produces the result on my comp in 805.484 s. Too much time.

## Bug in int

The command

`J := int(sin(x)/(x*(1-2*a*cos(x)+a^2)), x = 0 .. infinity)assuming a::real,a^2 <>0;`

outputs

`(infinity*I)*signum(a^3*(Sum(a^_k1, _k1 = 0 .. infinity))-a^2*(Sum(a^_k1, _k1 = 0 .. infinity))-a*(Sum(a^(-_k1), _k1 = 0 .. infinity))+a^2+Sum(a^(-_k1), _k1 = 0 .. infinity)+a)`

which is wrong in view of

```evalf(eval(J, a = 1/2));
Float(undefined) I```

The correct answer is Pi/(4*a)*(abs((1+a)/(1-a))-1) according to G&R 3.792.6. Numeric calculations confirm it.

## Bug in implicitplot

Maple

The following three commands

```plots:-implicitplot(3*cos(x) = tan(y)^3, x = -Pi .. Pi, y = -(1/2)*Pi-1 .. (1/2)*Pi+1, thickness = 3, crossingrefine = 1, rational = true, signchange = true, resolution = 1000, gridrefine = 2);
plots:-implicitplot(3*cos(x) = tan(y)^3, x = -Pi .. Pi, y = -(1/2)*Pi-1 .. (1/2)*Pi+1, thickness = 3, crossingrefine = 1, rational = true, signchange = false, resolution = 1000, gridrefine = 2);
plots:-implicitplot(3*cos(x) = tan(y)^3, x = -Pi .. Pi, y = -(1/2)*Pi-1 .. (1/2)*Pi+1, thickness = 3, crossingrefine = 1, rational = true, resolution = 1000, gridrefine = 2);```

produce the same incorrect plot

It is clear the sraight lines given by y=Pi/2 and y=-Pi/2 are superfluous. It should be noticed that the Mmma's ContourPlot command without any options produces a correct plot.

## Critical bug in solve

Maple 2016
 • If the solve command does not find any solutions, then if the second argument is a name or set of names, then the empty sequence (NULL) is returned; if the second argument is a list, then the empty list is returned. This means that there are no solutions, or the solve command cannot find the solutions. In the second case, a warning is issued, and the global variable_SolutionsMayBeLost is set to true.

Let us consider

```solve({x > -Pi, (tan(x)-tan(x)^2)^2-cos(x+4*tan(x)) = -1, x < Pi}, [x]);
[]
```

We see the command omits the solution x=0 without any warning. It should be noticed that Mathematica solves it, outputting

{{x -> 0}, {x -> 0}}

and the warning

Solve::incs: Warning: Solve was unable to prove that the solution set found is complete.

One may draw a conclusion on her/his own.

## Incorrect calculation of definite integral...

Quite accidentally I discovered incorrect calculation of the simple definite integral:

int(1/(x^4+4), x=0..1);

evalf(%);

1/8*ln(2)-1/16*ln(5)+1/32*Pi+1/8*arctan(1/3)   # This is incorrect result

0.1244471178

Is this a known bug?

If  first we calculate corresponding indefinite integral, and then by the formula of Newton - Leibniz, that everything is correct:

F:=int(1/(x^4+4), x):

eval(F, x=1)-eval(F, x=0);

evalf(%);

1/16*ln(5)+1/8*arctan(2)

0.2389834593

## Maple TA 2016: Lists depopulate in adaptive questi...

I am currently working on an adaptive question in Maple TA 2016 and it seems that there is a bug in the drop - down list functionality:

After I click "Verify" in a section, the answer disappears even though I choose it to be displayed. The window simply goes back to showing (Click for List) instead of keeping the answer, see the screenshot below.

Perhaps I am doing something wrong, though I have used Lists extensively in the previous version and never had that problem ..

Elisabeth

## Hot key F1 does not work in 2016.1

Maple 2016

Hello All,

(I also sent this fact to Maplesoft Support).

Since I updayed to 2016.1 the F1 key does bring a menu witch send to..F5 only.

No way to have a "full" Help Menu.(See the attached file)

I guess a silly bug jumped in :)

Kind regards,

Jean-Michel

## Bugs in parsing?...

Hello there! Maple 2016.1 sometimes gets crasy about parsing input strings. I managed to capture this behaviour in the attached file. It looks like below. I am not sure what exactly triggers it. It just starts happening all of a sudden. What might be the cause...?

 >
 >
 >
 >