## A simple limit - bug...

L := sum( 1/ln(k), k=2..n ) * ln(n)/n;

limit(L, n=infinity);
0
# Should be 1

Just curious: in Maple 2017, is it OK?

## Bugs in is and coulditbe commands

Maple

The is and coulditbe commands of Maple are known to be buggy.
Here are some math inventions done by these commands in Maple 2016.2.

```restart; assume(x::real, y::real);
is(exp(x+I*y) <> 0);
false
coulditbe(exp(x+I*y) = 0);
true
coulditbe(exp(x+I*y) = infinity);
true
coulditbe((x+I*y)^2 = infinity);
true
```

It should be noticed that

```is((-infinity)::real);
false```

though

```exp(-infinity+0*I);
0```

The latter means

```limit(exp(x),x=-infinity);
0```

, no more and no less.

## Bug in pdsolve, numeric

Maple

Let us consider

```sol := pdsolve({diff(u(x, t), t)-(diff(v(x, t), x))+u(x, t)+v(x, t) = (1+t)*x+(x-1)*t^2, diff(v(x, t), t)-(diff(u(x, t), x))+u(x, t)+v(x, t) = (1+t)*x*t+(2*x-1)*t}, {u(0, t) = 0, u(x, 0) = 0, v(0, t) = 0, v(x, 0) = 0}, time = t, numeric, timestep = 0.1e-1, spacestep = 0.1e-1, range = 0 .. 1);
sol:-plot3d(v(x, t), x = 0 .. 1, t = 0 .. 1);```

A nice plot similar to the one produced by Mma (see the  attached pdf file pdesystem.pdf) is expected.
The exact solutions u(x,t)=x*t,v(x,t)=x*t^2 are known

```pdetest({u(x, t) = x*t, v(x, t) = x*t^2}, {diff(u(x, t), t)-(diff(v(x, t), x))+u(x, t)+v(x, t) =
(1+t)*x+(x-1)*t^2, diff(v(x, t), t)-(diff(u(x, t), x))+u(x, t)+v(x, t) = (1+t)*x*t+(2*x-1)*t});
{0}```

But the wrong result

module() ... end module
Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.26000000000000006):
solution becomes undefined, problem may be ill posed or method may be ill suited to solution

is obtained. Also

`sol:-plot3d(v(x, t), x = 0 .. 1, t = 0 ..0.1);`

The plot

`sol:-plot3d(v(x, t), x = 0 .. .5, t = 0 .. .1);`

is not better.

## evalf random results - serious bug...

 > restart;
 > Digits:=10; to 10 do evalf(add(sin(k), k = 1 .. 10000)) od;
 (1)
 > restart;   # execute several times to obtain randomness
 > interface(version);
 (2)
 > Digits:=18;
 (3)
 > to 10 do   evalf(add(sin(k), k = 1 .. 10000)) od;
 (4)
 >

## Bug in Probability

Maple 2016

Let us consider

```with(Statistics);
U := RandomVariable(DiscreteUniform(-10, 10)):
V := RandomVariable(DiscreteUniform(-10, 10)):
Probability(U^2-V^2 <= 1/9, numeric);
0.
```

, whereas a positive number greater than 1/21 is expected.

## Bug in ProbabilityFunction

Let us consider the example from Maple help to ?ProbabilityFunction (also see ?Geometric)

```with(Statistics):
ProbabilityFunction(Geometric(1/3), 5);
32 /729
```

Let us continue the investigation

```ProbabilityFunction(Geometric(1/3), 5.1);
0.4215152817e-1
ProbabilityFunction(Geometric(1/3), 5.12);
0.4181109090e-1
ProbabilityFunction(Geometric(1/3), 51/10)
(32/2187)*2^(1/10)*3^(9/10)```

whereas the result 0 is expected in all the three cases up to Wiki. I am aware of the line

"t-algebraic; point (assumed to be an integer)"

in the help. However,

```ProbabilityFunction(Geometric(1/3), -.5);
0
```

The same issue with the DiscreteUniform distribution. This bug lasts from  at least Maple 16. The question arises: may we trust Maple?

## a bug in package MmaTranslator...

Hello;

Maple can't translate this valid Mathematica expression, it gives error

restart;
with(MmaTranslator):
eq:=FromMma(`x^2(a+y[x])^2 y'[x]==(1+x^2)(a^2+y[x]^2)`);

Error, (in MmaTranslator:-FromMma) The form, a^b^c, is found in the expression. It means either (a^b)^c or a^(b^c). Please use parentheses to clarify the meaning

But there is nothing wrong with the above expression. It is valid Mathematica expression. I found why Maple is confused. It needed a SPACE after the first x^2. So the following works in Maple

eq:=FromMma(`x^2 (a+y[x])^2 y'[x]==(1+x^2)(a^2+y[x]^2)`);

And now the error went away.  But a space not needed in Mathematica. It works either way.

Maple 2016.1 on windows.

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

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

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

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

## 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);