Items tagged with bug

Let us consider the linear integer programming problem:

A := Matrix([[1, 7, 1, 3], [1, 6, 4, 6], [17, 1, 5, 1], [1, 6, 10, 4]]):
 n := 4; z := add(add(A[i, j]*x[i, j], j = 1 .. n), i = 1 .. n):
restr := {seq(add(x[i, j], i = 1 .. n) = 1, j = 1 .. n), seq(add(x[i, j], j = 1 .. n) = 1, i = 1 .. n)}:
 sol := Optimization[LPSolve](z, restr, assume = binary);

Error, (in Optimization:-LPSolve) no feasible integer point found; 
use feasibilitytolerance option to adjust tolerance

sol1 := Optimization[LPSolve](z, restr, assume = binary, feasibilitytolerance = 100, integertolerance = 1);

Error, (in Optimization:-LPSolve) no feasible integer point found;
 use feasibilitytolerance option to adjust tolerance

That was OK in Maple 16, outputting


The bug in one of the principal Maple commands lasts since Maple 2015, where the above code causes "Kernel connection has been lost". The SCRs about it were submitted three times (see

It is well known that fsolve usually increases (internally) Digits in order to obtain the desired accuracy.

But in the following example, it seems that fsolve highly exaggerates :-)   


Error, (in fsolve) Digits cannot exceed 38654705646

Note that the bug does not appear if e.g. F:=expand(mul(x-k-I, k=1..N)):



Let us consider 

MultiSeries:-limit(sin(n)/n, n = infinity, complex);

The answer is wrong: in view of the Casorati-Weierstrass theorem the limit does not exist. Let us try another limit command of Maple

limit(sin(n)/n, n = infinity, complex);

(lim) (sin(n))/(n)

which fails. Therefore, Maple user does not obtain the correct answer. 

Let us consider 

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

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


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

ProbabilityFunction(Geometric(1/3), 5);
                              32 /729

Let us continue the investigation

ProbabilityFunction(Geometric(1/3), 5.1);
ProbabilityFunction(Geometric(1/3), 5.12);
ProbabilityFunction(Geometric(1/3), 51/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);

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



I.e. f is a standard Gaussian PDF.

Then (in Maple 2016.1):




However (again in Maple 2016.1):




This is clearly incorrect, as the integral of a positive function must be positive.

This also seems to be a problem in which ever version of Maple is used behind the scenes on this forum.





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

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.



Let us consider

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

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

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. 

Let us consider 

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

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

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


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)



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)


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



X := Statistics:-RandomVariable(Normal(0, 1)):

PDF(sin(X), t)

piecewise(t <= -1, 0, t < 1, 2^(1/2)*exp(-(1/2)*arcsin(t)^2)/(Pi^(1/2)*(-t^2+1)^(1/2)), 1 <= t, 0)


int(%, t = -1 .. 1)







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.



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/3)*(-1)^(2/3)*((2/3)*x*(-1)^(1/3)*Pi*3^(1/2)/(GAMMA(2/3)*(-x^3)^(1/3))-x*(-1)^(1/3)*GAMMA(1/3, -x^3)/(-x^3)^(1/3))


int(exp(x^3), x=1..2); #?

int(exp(x^3), x = 1 .. 2)


int(exp(x^3), x=1..2, method=FTOC); #??

int(exp(x^3), x = 1 .. 2, method = FTOC)


int(exp(x^3), x=0..2); #?

int(exp(x^3), x = 0 .. 2)


int(exp(-x^3), x);  #ok

(3/4)*x*exp(-(1/2)*x^3)*WhittakerM(1/6, 2/3, x^3)/(x^3)^(1/6)+exp(-(1/2)*x^3)*WhittakerM(7/6, 2/3, x^3)/(x^2*(x^3)^(1/6))


int(exp(-x^3), x=0..2);  #ok

(3/4)*2^(1/2)*exp(-4)*WhittakerM(1/6, 2/3, 8)+(1/8)*2^(1/2)*exp(-4)*WhittakerM(7/6, 2/3, 8)


int(exp(-x^3), x=0..1);  #ok

(3/4)*exp(-1/2)*WhittakerM(1/6, 2/3, 1)+exp(-1/2)*WhittakerM(7/6, 2/3, 1)


int(exp(-x^3), x=1 .. 2);  #???

int(exp(-x^3), x = 1 .. 2)



Download !

Let us consider 

restart; J := int(cos(a*x)^2/(x^2-1), x = -infinity .. infinity, CPV);

This result is not true for a=I:

eval(J, a = I);

In this case the integral under consideration diverges because of 

                            cosh(x) ^2


Let us consider 

maximize(int(exp(-x^4), x = k .. 3*k), location);

Error, (in maximize) invalid input: iscont expects its 1st argument, f, to be of type algebraic, but received x = k .. 3*k
whereas the expected output is 

[(2*((1/40)*GAMMA(1/4, (1/80)*ln(3))*5^(1/4)*ln(3)^(3/4)-(1/40)*GAMMA(1/4, (81/80)*ln(3))*5^(1/4)*ln(3)^(3/4)))*5^(3/4)*(1/ln(3))^(3/4), [k = (1/10)*10^(3/4)*ln(3)^(1/4)]]

as Mma 11 produces. The following 

RealDomain:-solve(diff(int(exp(-x^4), x = k .. 3*k), k));
  -(1/10)*5^(3/4)*ln(3)^(1/4), (1/10)*5^(3/4)*ln(3)^(1/4)

is not a workaround because of 

int(exp(-x^4), x = (1/10)*5^(3/4)*ln(3)^(1/4) .. (3/10)*5^(3/4)*ln(3)^(1/4));


1 2 3 4 5 6 7 Last Page 1 of 11