Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

In ScientificConstants, the density of carbon is given as 2.2 g/cm^3. That happens to be the value for graphite. Carbon comes in different states with different density, diamond being one of them, amorphous being another. Is this somewhere in ScientificConstants where just I cannot find it, or is it not there?



PS: I do know the values and where to find them (Particle Data Group). I'd like to use ScientificConstants so I can write a more general piece of code.

The curve is defined by

I am trying to add a specific property (radiation length) to the Elements in ScientificConstants.

To do this  I first 

ScientificConstants:-AddProperty(radiationlength); # this seems to work

I then load a table of element name - radiationLength pairs (it is really a bigger table but only these are of interest):

                       datatype=anything,delimiter="\t"); # works too

(I made the file using downloaded data).

I then want to fill the radiationlength properties for all elements for which I've got the value:

for i from 1 to LinearAlgebra:-RowDimension(data) do
  elemt:=data[i,1]; # the element name as a string
end do;

which fails with the error

Error, (in ScientificConstants:-ModifyElement) element ``H `` is not known

H is the first element in the table of radiation lengths so it is getting the right one.

At  issue is that somehow the element name (called descriptor in the Help files) does not seem to get properly evaluated. In fact I tried various ways "by hand", none except just the unevaluated element name (i.e H,He etc. worked).

There must be a way to set these in a loop. Does someone know how?


Mac Dude



I am writing a small code to find median and mean. The code works for an even number of terms, not for an odd number of terms. I tried to find the error but cannot.

restart:medianmean:= proc(x) local a,b,c,d,m,g;
a:=sort(x); b:=nops(x); c:=nops(x)/2; d:=(nops(x)+1)/2;
m:=(a[c]+a[c+1])/2; g:=add(a)/b;
if (b mod 2 = 0) then evalf([a,m,g]) ;
else evalf([a,a[d],g]);
end if; end proc:


I am not sure why I am getting this RootOf result when I solve for x.

Here is my code.

deq:=solve(  diff(eq,x), diff(y(x),x) ):

The last equation we are solving is  -2x / y = 3.
So we should get y  = -2/3 x and  x = -3/2 y.

The Maple software correctly solves for y in terms of x,
but gives an odd Rootof answer when solving for x. Why is that?

I am not sure how to intepret RootOf(2*_Z+3*y(_Z)).

Dear All,

I have two beta distributed r.v. as:

p1 := RandomVariable(BetaDistribution(1, 100));

p2 := RandomVariable(BetaDistribution(1, 50));

my Maple stucks when i try to calculate numerically:

evalf(int(z*PDF(0.3*p1+0.7*p2, z), z = 0 .. 1))

Any help to speed this up or other solutions?

It seems PDF(0.3*p1+0.7*p2, z) is the pain.




I need to simplify a differential equation by ignoring higher order terms. The terms are of the following form:


Here beta, zeta and theta are hinge deflections for a helicopter blade and thus can be assumed to be small. Everything other than delta__3 is a function of time, _dot represents a derivative wrt time. Higher order terms, such as those containing betan, zetan, thetan where n > 1, and terms containing combinations of the hinge deflections, i.e. betaj.zetak, betaj.thetak or zetaj.thetak where j,k >= 1 need to be neglected. Since beta, zeta and theta are functions of time, and the equation contains derivatives, maple functions like 'degree' and 'match' don't seem to work. Also, the solution suggested over here does not seem to be suitable for this problem, since my equation is very long (~70 pages) and the various derivatives appearing in it are not known.

Thanks in advance!



Hi. I wrote a command for finding second derivative.

#secondderiv test of f(x,y)

Everything runs fine ... except if I change the function f to
Then I get error :
Error, invalid input: nops expects 1 argument, but received 2

I sort of understand the error, when there is a single solution
{x=0,y=0} , then the op removes the parentheses to get x=0, y=0
which is now two arguments, and nops requires one argument.
I tried to use  nops(op({soln} ) , but that is not the correct approach
since it overcounts. Also it throws an error if change back f to the original expression.



 f(a)(x) = a*x mod 256  for all x in Z[256]

I am a little bit clueless here, about how to use maple to calculate Christoffel symbol and Ricci tensor and scalar?


I read the help, but it got me confused; I have the metric ds^2 = du*dv+F(y,z)du^2+dy^2+dz^2

It's not Minkowski nor Cartesian, so how to use maple to calculate these symbols?


I am sure it's easy, but I didn't quite follow maple's instructions.



I am interested in plot the so-called "free space diagram", please see for a formal definition. Essentially, given two curves (i.e., two polygonal from [0,1] to the plane) the "free space" is the points (s,t) in the square [0,1]x[0,1] such that the distance from P(s) to Q(t) (if P and Q are the parametrizations of the curves) is less or equal than a prefixed epsilon>0. An image can be the following (the free space is, in the image, the area not colored in black):



I have found nothing about this topic in Maple, any suggestion will be welcome!




In Maple 2017, a simple one-liner can crash the current worksheet (in any mode with any text type it seems).



Note that z and x can be any two letters, and that you can replace z[x] with the equivalent z+(ctrl shift _)+x (which displays as zx)

Hi all. I have two questions about polynomials over Q.

i) Let f,g be polynomials over Q. How to show (with Maple) that the decomposition field of f is included in the decomposition field of g?

ii) Let f be a polynomial of degree n  over Q with Galois group C_n, the cyclic group of order n. Then, there is a polynomial P with coefficients in Q, of degree n-1, s.t. the iteration: u0=some root of f, u_{k+1}=P(u_k) gives all the roots of f; how to find P (with Maple)?

Thanks in advance.

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