MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Level: Idiot (Me)

I have a matrix of 3 columns and lots of rows M

  • First column is latitude in degrees
  • Second column is longitude in degrees
  • Third column is data

So I set lambda:=M(..,1) and phi_g:=M(..,2) giving me two column vectors.

I want to convert lambda and phi_g to polar coordinates theta and phi

theta:=90-lambda produces "Error, (in rtable/Sum) invalid arguments"


I also want to convert phi_g to phi where phi=phi_g when phi_g is 0...180 and phi=phi_g +360 when phi_g <0

How do I create a conditional function like this?

How can I get the Automorphism Group of a group G as a Permutationgroup?


Best regards


Kurt Ewald


this is the second time I'm writing.

I posted this question in June

This time I have  a similar problem because I'm trying to find a solution for a parametric system of equations but the number of equations and parameters is much bigger and using the tips you gave me last time I couldn't reach any result.

Here is the system:

1) alpha[1]=v*a*u*b ;
2) alpha[2]=v*a*u*(1-b);
3) alpha[3]= v*z*c*(1-a) ;
4) alpha[4]=v*z*(1-a)*(1-c) ;
5) alpha[11]=1/2*v*a* u* b* (-p*u*b+p*u*b*a+b*g-g);
6) alpha[22]=1/2*v*a*u*(1-b)* (p u b-p u b a-b g-p u+p u a);
7) alpha[33] =1/2*v*c*z*(1-a)* (c* (-z*p*a+q)-q);
8) alpha[44]=1/2*v*z*((1-a)*(1-c)* (c*z*p*a-z*p*a-q*c);
9) alpha[12]=v*a*u*b*(1- b)*(-p*u+p*u*a+g) ;
10) alpha[13]=v*a*u*b*z*c*p*(1-a) ;
11) alpha[14]=a*u*b*z*(1-a)*(1-c) ;
12) alpha[23]=a*u*z*c*(1-a)*(1-b);
13) alpha[24]=v*a*u*z*p*(1-a)*(1-b)*(1-c);
14) alpha[34]= v*c*z*(1-a)*(1-c)*(-z*p*a+q);


I have 14 equations/unknowns and 8 parameters (a, b, c, u, v, z, p, q).

I would like to write this system only in terms of alphas. In order to do so, I usually try to find the value for the parameters and the substitute them into the equations (and I have already found b,c,g,q using this technique) but I couldn't manage to find all of them. 

Howveer, as you suggested me, with Maple there is the command "eliminate" that implement exactly what I'm looking for but I can't make it work.

This is my code:

> sys := {alpha[1] = v*a*u*(1-b), alpha[2] = v*a*u*b, alpha[3] = v*z*c*(1-a), alpha[4] = v*z*(1-a)*(1-c), alpha[11] = (1/2)*v*a*u*(1-b)*(p*u*b-p*u*b*a-b*g-p*u+p*u*a), alpha[12] = v*a*u*b*(1-b)*(-p*u+p*u*a+g), alpha[13] =      z*c*a*u*(1-a)*(1-b), alpha[14] = v*z*a*u*p*(1-a)*(1-b)*(1-c), alpha[22] = (1/2)*v*a*u*b*(-p*u*b+p*u*b*a+b*g-g), alpha[23] = v*z*c*a*u*b*p*(1-a), alpha[24] = z*a*u*b*(1-a)*(1-c), alpha[33] = (1/2)*v*c*z*(1-a)*(c*(-z*p*a+q)-q), alpha[34] = v*c*z*(1-a)*(1-c)*(-z*p*a+q), alpha[44] = (1/2)*v*z*(1-a)*(1-c)*(c*z*p*a-z*p*a-q*c)};

> eliminate(sys, {a,b,c, p, q, u, v, z});

> simplify(%, size);


I also tries to substitute in the system the four parameters I already found but still I can't find a solution.

What am I doing wrong? Or the problem is that it is too complicated?


Thank you for your attention,


Solve Problems ...

July 17 2014 MSac 15


I can't solve the problem to have the right solution of


while solve works with


Any ideas on why this happen?






eval(_C2, s);

Any idea?


We know that sum can return an symbolic summation, for example,


But sometime the relation of parameters in series cannot be defined easily. And it seems that sum cannot correctly determine the symbolic summation of this kind of series:

Maybe it's due to the value of _C(infinite) is undefined. Does anyone have good idea to compute the symbolic summation of this series?

I'd appreciate any help on this topic. Thank a lot.

Dear all,

I tried to display an animation which can zoom as the time goes.

But it seems that if I display several animations in one plot window, it will display the animation with the maximum view size from these animations, not separately display these animations with their view size.


There are two examples:


a1 := animate(plot, [x^2, x = -1 .. t, view = [-1 .. 1, 0 .. 1]], t = -1 .. 1);

a2 := animate(plot, [x, x = -1 .. t, view = [-1 .. 1, -1 .. 1]], t = -1 .. 1);

display(a1, a2);



animate(plot, [x^2, x = -1 .. 1, view = [t .. 1, 0 .. 1]], t = 0 .. -1)

Is it possible to zoom the animation with time? What parameter should I set?

The related maple file is attached.

suppose W1 is weight matrix of graph G1 and W2 is weight matrix of graph G2 (G1 and G2 has same vertices and same edges but with different edge weights)

we want to create graph G3 that has a weight matrix W3. suppose w3[i][j] is an element of W3. we must have :


w1[i][j] and w2[i][j] are elements of W1 and W2,respectively.

how can we create such graph G3 ?

When I enter the following code from the help file:


textplot3d([[1,2,3,"antelope", 'font'=["times","roman",20]], [3,2,1,"tiger"]], 'axes'='boxed', 'view'=[0..4, 0..4, 0..4]);


I receive the error message:

Plotting error, invalid FONT specification

I am trying to reduce the font size to fit many closely spaced strings in the plot.

Can anyone help.  I am running maple 16 on  Windows 7 machine.

Dear all, 

I'm trying to extract the coefficients from the equation below, the fat expressions in the equation. I don't have any trouble seperating the sine or cosine functions. But the constants are a problem. Since t is the only variable in the function i tried, coeff(R, t, 0). This does not work apparantly. Any suggestions? 


R:=(1/12)*C2^3*cos(2*t) - (1/48)*C2^3*cos(4*t) - C2^3*sin(t) + C2^3*sin(3*t)-C2^2*C4*cos(t) + C2^2*C4*cos(3*t) - (1/8)*C2^2*C4*sin(2*t) + (1/16)*C2^2*C4*sin(4*t) + (1/16)*C2*C4^2*cos(4*t) - C2*C4^2*sin(t) - C2*C4^2*sin(3*t) - C4^3*cos(t) - C4^3*cos(3*t) - (1/24)*C4^3*sin(2*t) - (1/48)*C4^3*sin(4*t) - (1/16)*C2^3 - (1/16)*C2*C4^2 - (1/2)*C2*cos(2*t) + C2*sin(t) + C4*cos(t) + (1/2)*C4*sin(2*t) + (1/2)*C2

It says at

"When generating matrices and vectors of floats and integers, these flavors are very fast. "

But when I compare the new

time[real](Generate(('Matrix')(float, 300, 300)))


time[real](RandomMatrix(300, 300))

I find RandomMatrix over 300 times faster. Am I doing something wrong, or is RandomMatrix still the fastest way to generate random numbers?



Hello everyone,

i'm trying to simulate a diffusion problem. It contains two connected regions in which a species is diffusing at different speeds. In one region (zeta) one boundary is set to be constant whereas in the other region (c) there is some oscillation at the boundary.The code i try to use is as follows:

sys1 := [diff(c(x, t), t) = gDiffusion*10^5*diff(c(x, t), x$2), diff(zeta(x, t), t) = KDiffusion*10^6*diff(zeta(x, t), x$2)]

pds := pdsolve(sys1, IBC, numeric, time = t, range = 0 .. 3000, spacestep = 3)

However the main problem are my boundary conditions:

IBC := {c(0, t) = 0, c(x > 0, 0) = 0, zeta(0, t) = .4, zeta(x > 0, 0) = .4, (D[1](c))(3000, t) = sin((1/100)*t), (D[1](zeta))(0, t) = 0}

Like this it principally works (however it is apparently ill-posed).

Now what i do like is that the two equations are coupled at x=2000 with the condition that c(2000,t)=zeta(2000,t). This however i dont seem to be able to implement.

I appreciate your comments



Two related questions: I'd like to measure the CPU time used by a computation. Should I use with(CodeTools)? or use  time[real]? What would be the most accurate way to measure the CPU time used by one call, say dsolve()?

Also, How would one return both the result of the computation and the time used in one call so that one does not have to make two separate calls: to obtain the result and to obtain the CPU time?


ode:=2*a*x^3*y(x)^3+2*x*y(x)+diff(y(x), x);

Gives result:=0.141 while

ode:=2*a*x^3*y(x)^3+2*x*y(x)+diff(y(x), x);

Gives result:= 0.145

But in both cases, I have to make another call to get the result of the DSolve in this example. result:=dsolve(ode=0,y(x)); which I'd like to avoid if possible. 

I am using Maple 18


I'm not being notified anymore about responses to answers or comments to MaplePrimes. I'm assuming that I'm not the only one (?). This has happened before.

Hello, everyone.

There are two variables: n1 and n2, how to define n1+n2=1 (not n1:=1-n2).



4 5 6 7 8 9 10 Last Page 6 of 1032