## Bug in the D operator?...

In the following, the diff operator calcuates the derivative correctly, but the D operator doesn't.  A bug?

 > restart;
 > f := x -> a[1][2]*x;    # the double index on a[][] is intended
 > diff(f(x), x);
 > D(f)(x);

Here is a worksheet containing the commands above in case you want to try it yourself: mw.mw

## Bug in CodeGeneration package for Python

by: Maple

There seems to be a bug in the CodeGeneration package for Python which leads to a deletion of braces in some cases.

# E.g.

CodeGeneration[Python](Pi*(a+2));

cg5 = math.pi * a + 2

which is obviously wrong.

## Could possibly (still) be a bug? Rank of a symboli...

I am a research student and I am writing up my thesis. I was reading one of the paper written earlier by authors in 2003.

The authors calculated a symbolic rank of a matrix A, and got 9, using Maple 6.

Then new methods developed in 2012 and proved that the "true" rank should be 8. The later paper that "Most  recent versions of Maple have this simplification built in and are able to return a rank of 8.".

I just noticed that in Maple 18.01, this matrix was still evaluted for a symbolic rank 9, if no simplifcaiton was done before using Rank(), see attached.

I didnt explore a lot, but just as a notice. I am a bit concerned as most of my research was trying to deal with exponentials.

Is that something to be fixed in future versions?

Thanks!

## Bug in VectorCalculus:-int...

In Maple 16  (obviously, the result must be positive):

VectorCalculus:-int(x+y, [x, y] = Sector(Ellipse((1/4)*x^2+(1/9)*y^2-1), 0, (1/2)*Pi));

-2

Probably, this error occurs only in the latest versions, as in Maple 12 the output is correct. It would be interesting to know the reason for this behavior.

## Solving for function of float...

To me the following behavior of solve is surprising:

restart;
solve(f(0.5)=7,f(0.5)); #Output NULL
solve(f(1/2)=7,f(1/2)); #Output as expected 7

Debugging solve suggested to me that the following might work
solve(f(0.5)=7,f(1/2));
and indeed it did (outout the float 7.).
This behavior seems to have started in Maple 10. I checked Maple V,R3 and several other old versions including Maple 9.5. All behaved as I would have expected. MapleV,R3 gave the float 7. in the first case, the other the integer 7.
I take this to be a bug and shall file an SCR.

## Fsolve and Isolate Missing Solutions...

To motivate some ideas in my research, I've been looking at the expected number of real roots of random polynomials (and their derivatives).  In doing so I have noticed an issue/bug with fsolve and RootFinding[Isolate].  One of the polynomials I came upon was

f(x) = -32829/50000-(9277/50000)*x-(37251/20000)*x^2-(6101/6250)*x^3-(47777/20000)*x^4+(291213/50000)*x^5.

We know that f(x) has at least 1 real root and, in fact, graphing shows that f(x) has exactly 1 real root (~1.018).  However, fsolve(f) and Isolate(f) both return no real roots.  On the other hand, Isolate(f,method=RC) correctly returns the root near 1.018.  I know that fsolve's details page says "It may not return all roots for exceptionally ill-conditioned polynomials", though this system does not seem especially ill-conditioned.  Moreover, Isolate's help page says confidently "All significant digits returned by the program are correct, and unlike purely numerical methods no roots are ever lost, although repeated roots are discarded" which is clearly not the case here.  It also seems interesting that the RealSolving package used by Isolate(f,method=RS) (default method) misses the root while the RegularChains package used by Isolate(f,method=RC) correctly finds the root.

All-in-all, I am not sure what to make of this.  Is this an issue which has been fixed in more recent incarnations of fsolve or Isolate?  Is this a persistent problem?  Is there a theoretical reason why the root is being missed, particularly for Isolate?

Any help or insight would be greatly appreciated.

## pointplot3d symbol=point .. no points...

with pointplot3d and 14,000 points when I enter symbol=point I get an empty plot.

Only when I set symbolsize=1 (a point) do I get points appearing in the graph.  Bug?

## Problem with elliptic integrals and assuming...

Hi there

There seems to be a bug when evaluating elliptic integrals using assuming. Here's an example:

INT:=Int(1/sqrt(a*x^3+1),x=0..X);

is our integral for some a. Now evaluate the integral using assuming on X in different ways:

INT2:=simplify(value(INT)) assuming X>0, a>0, a<1;

INT3:=simplify(value(INT)) assuming X<0, a>0, a<1;

These give analytic solutions which are different. Now plot them both and compare to the numeric solution

plot([subs(a=0.1,INT2),subs(a=0.1,INT3),subs(a=0.1,INT)],X=-1..1,colour=[red,green,blue]);

I'm finding that the red curve which should work for X>0 is wrong, while the green one which is for X<0 is ok for X either sign. [blue is the correct answer - numerically!]

Any ideas?

## Fix a syntax error in my simple function (please h...

firstly apologies in advance for stuff in this question such as "triangle symbol",  my computer is pretty old.

ok so i was confused a bit here, what i'm trying to do is write a maple procedure that computes Af for a given f contained in V . except we only need to correct the bug in the script below. This script demonstrates such a procedure in the case that omega is a square. The domain is given here as the negative set of a function F contained in V .  I have left in notes where/what i think we need to do but i dunno how to...

N:=10 ; # Global Var
F:=(x,y)->sgn(abs(x-N/2)+abs(y-N/2)-N/4);
Average := proc(F, f0) local f, i, j;
f := f0; # !!!!!!!!!!!!!! something is bad here...
for i to N do for j to N do
if F(i, j) < 0 then
f[i, j] := (f0[i - 1, j] + f0[i + 1, j] + f0[i, j + 1] + f0[i, j - 1])/4 ;
end if;
end do;end do;
return f;
end proc;
f0:=Matrix(N,F); # just to have something to test the procedure
Average(F,f0); # does not return the expected average, modifies f0

the necessary information we were given to produce this so far was..

Let N be a positive integer and [N] = {i contained in N | 1<= i <=N }  Let "Omega" C {(i,j) contained in [N] x [N] | 2<=i,j<=N-1} be a subset. Let V = R^([N]x[N]) be the vector space of real valued functions [N]x[N] -> R
and A, "triangle symbol":V->V (average) and "triangle symbole" (Laplacian) be the linear maps such that
[Af](i; j) = f(i; j)      if (i; j) not contained in "Omega"   OR

[f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 if (i,j) is contained in "Omega"

["traingle symbol"f](i,j) =  0 if (i,j) isnt contained in "Omega"   OR

( f(i,j) - [f(i, j + 1) + f(i, j - 1) + f(i + 1, j) + f(i - 1, j)]/4 )    if (i,j) is contained in "Omega"

## how to correctly stop maple in c# after call...

in

testfunction(string hello){....stopmaple(kv));

testfunction(1);

testfunction(2);

when call testfunction again , it got error

## Bug in the DirectSearch

Maple

The DirectSearch package is a powerful Maple  tool. However, every soft has its advantages and disadvantages. In particular, the DS has problems in the case of a thin feasible set in higher dimensions. Recently a serious bug in the DS was detected by me. Solving an optimization problem, the DirectSearch produces the error communication

Warning, initial point [x1 = 1., x2 = 1., x4 = 2., y1 = 2., y2 = 3., y4 = 2.] does not satisfy the inequality constraints; trying to find a feasible initial point
Error, (in DirectSearch:-Search) cannot find feasible initial point; specify a new one
while that initial point satisfies the constraints.

## still not working with FF

by:

After disabling all security addons the Ajax gif loads, then it shows an error and after that it jumps to a page displaying "2013", but that page actually does not have any content (use ctrl + u to see it).

And the I see, that the browser tries to load from maplesoft.112.2o7.net and hangs up in that transfer (have not checked the ports).

In reality I would forbid to load from 2o7, as I receject almost all trackers.

Every reasonable person aware of security and xss forbids dubious sources from other websites (and I am not happy that this sites call Ajax at Google)

And if that is the reason for the bad behaviour of the new sites it would be a good joke, really.

For me it only works with IE and all its security issues (and I have to use "preview" before posting is possible)

## bug in type

Maple

Bug in type(HFloat(-infinity),  pos_infinity). Negative infinity is incorrectly recognized as positive one:

s:=HFloat(-infinity);
HFloat(-infinity)

type(s, neg_infinity);
type(s, pos_infinity); # bug
...

## BUG in numerical integration? with SphericalY's...

Hi,

I'm computing some difficult integrals, involving Spherical Harmonics. I've proved that the answer must be a real number, and yet Maple returns a complex number. Also Mathematica returns purely real numbers, so I wonder if there is a bug in Maple. I found if I break the integrand into real and imaginary parts, and add them I get the right answer...usually.  Anyway's here's the code and the proof, I suspect they could be a bug...

## Plotting Spherical Harmonics ERROR...

Hi,

Theres seems to be an error in the SphericalY function when the input is SphericalY( l, -l, theta, phi)

restart;

assume(phi, real):assume(theta, real):

for l from 1 to 2 do
m:=-l;
s:=SphericalY(l,m,theta, phi);
f:=s*conjugate(s);
plot3d(f, phi=0..2*Pi,theta=0..Pi,coords=spherical);#sphereplot(f, phi = 0 .. 2*Pi, theta = 0 ..Pi,  style...

 2 3 4 5 6 7 8 Page 4 of 10
﻿