772 Reputation

12 Badges

3 years, 104 days

MaplePrimes Activity

These are questions asked by mmcdara

I'm presently interested in PDE and I have just discovered the impressive work Nasser Abbasi,has done, and keeps doing, concerning the solution of PDE benchmarks with Maple and Mathematica.

It seems that the result Maple returns for the test case below is not the general solution.

  • 4.19 first order PDE of three unknowns
    problem number 19
    (from example 3.5.4, p 212, nonlinear ode’s by Lokenath Debnath, 3rd edition)

It is rather simple to see that any spherical function u(x, y, z) =f(x^2+y^2+z^2) is a solution of the PDE.
Then any function of the form u(x, y, z) = f(x^2+y^2+z^2) * exp(x+y+z) *C1 (C1 being any constant) is also a solution.
Maple returns only the solution u(x, y, z) = exp(C2*(x^2+y^2+z^2)) * exp(x+y+z) * C1



u := (x, y, z) -> f(x^2+y^2+z^2)

proc (x, y, z) options operator, arrow; f(x^2+y^2+z^2) end proc


expr := (y-z)*diff(u(x, y, z), x)+(z-x)*diff(u(x, y, z), y)+(x-y)*diff(u(x, y, z), z)






u := (x, y, z) -> C*f(x^2+y^2+z^2)*exp(x+y+z)

proc (x, y, z) options operator, arrow; C*f(x^2+y^2+z^2)*exp(x+y+z) end proc


expr := (y-z)*diff(u(x, y, z), x)+(z-x)*diff(u(x, y, z), y)+(x-y)*diff(u(x, y, z), z)






pdsolve((y-z)*diff(U(x, y, z), x)+(z-x)*diff(U(x, y, z), y)+(x-y)*diff(U(x, y, z), z)=0, U(x,y,z),'build')

U(x, y, z) = exp((1/2)*x^2*_C2)*exp(_C1*x)*exp((1/2)*y^2*_C2)*exp(_C1*y)*_C3*_C5*_C4*exp((1/2)*z^2*_C2)*exp(_C1*z)


combine(rhs(%), exp)






In a recent question (a few hours ago) Teep failed to compute quantiles of a negative binomial random variable as soon as the probability of success is small (even for a value of 0.05 the computational time is very prohibitive).
Teep used the package Statistics:

I discovered inadvertently that the package Student[Statistics] worked perfectly on the same problem, even for a success probability as small as 3e-10

What is the necessity to have two packages that share theoritically some features especially if one of them (Statistics) contains a lot of flaws and is not capable to return an answer as the other (Student[Statistics]) does?
In the present case of numerically computing quantiles, why people decide to implement a good algorithm in one package and a poor one in the other? Or why they didn't verify if the two packages gave identical answers on the same problem?



I would like to have some references about the function PolyhedralSets:-PolyhedralSet.
I used it very recently before constructing the convex hull  (PolyhedralSets:-ConvexHull) of a set of 50 points.
After some minutes spent to wait for a solution, I was forced to stop the computation.
I randomly sampled 10 points, next 20, 30, ... from the original set of points and observed that the computational time was growing very fast with the number of points.

Could you please inform me about the algorithm Maple uses and about its complexity?

Last point: the original points are floating numbers and I used the transformation  T: x -->  rounf(10k*x) / 10(PolyhedralSets:-PolyhedralSet operates only on rationals).
It seems that the computational time increases strongly as k increases too.

What are the limitations and best practices to use PolyhedralSets:-PolyhedralSet?



Somewhere in the code I've written I've made a mistake: A being a table, I wrote B := eval(A) instead of B := copy(A).
Next A and B were saved in a .m file.

I became aware of my mistake when I read this file in another Maple session.
I modified some entry of B and the corresponding entry of A became modified too.
But this raise the first question: let's say the command B:=eval(A) creates a bon between A and B, why this "bond" is not limited to the current session and by what process is it conserved through  the save/read operations?

To investigate this I wrote this notional piece of code:

A := table([1=x]);
B := eval(A);
FA := "......";   # the name of some file
FB := "......";   # the name of some file
FC := "......";   # the name of some file
save A, B, FC;  # basically what I do in my true code
save A, FA;
save B, FB;

# first attempt
FC := "......";   # the same name as above
read FC;
B[1] := y;

# second attempt
FA := "......";   # the same name as above
FB := "......";   # the same name as above
read FA;
read FB;
B[1] := y;

Why is the "bond" between A and B lost in this second case ?


Could the Maplesoft staff change the definition of the GammaDistribution in package Statistics?

In the all the papers or courses in the fiels of Probability or Statistics, the shape parameter is the first parameter of this distribution, while the scale (or "rate") parameter is the second.

From versions to versions the Maple definition of this distribution switches these parameters.
It's really a pain in the ass when you want to implement algorithms that use this distribution*

Thanks for your understanding

* for specialists, the Clayton copula uses as an ingredient a sample from Gamma(1/theta, 1) where theta is an adhoc parameter.
In Maple you must code s:=Sample(GammaDistribution(1, 1/theta)).

OK, you could reply me that once I know the trick it is the simplest thing at world to do the switch myself: nevertheless it's really boring, to say the least

4 5 6 7 8 9 10 Page 6 of 11