## (if true then ...) seems to have a weird bug...

In Maple 2017.2:

```if true then print(1);print(2);print(3);print(4);print(5) end if;
1
3
5
```

## Issues with integrating exp and trigs

by: Maple 2016

There seems to be a bug with improper integration:

integrate(cos(t)*exp(-x*t),t=-infinity..infinity)

gives

0

Substituting any number for x, or assuming x >= 0  (or x<=0) does give the correct result,

The problem also persists when assuming x>-1 (or x>-Maple_floats(MIN_FLOAT))

## Maple 2017 Copying matrix gives _rtable...

Hey there.

And in the new version, whenever i want to copy a matrix from a result, it gives me an _rtable, and a number. The result is the same, but it makes it harder to read and i am not able to edit values in this copied matrix.

How do i change this?

## Issues with pdsolve...

will give me

which is indeed a solution of the PDE1

will give me

which is not a solution of the PDE2

However, both differential equations are equal, only the arguments are swapped around. Am I doing something wrong, or is this a bug?

Thanks

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