MaplePrimes Questions


I'm confused about Maple's adjoint function (in the DEtools package). When I take the adjoint of the derivative operator:

DEtools:-adjoint(Dx, [Dx, x])


I get back simply "Dx". However, doing the calculation by hand and integrating by parts seems to indicate that this should return the negative of Dx. The inner product I'm using is int(f(x)*conjugate(g(x)), x=0..1). Is Maple perhaps using a different inner product? Or is this a generalization that I'm unaware of? Or is it perhaps just a bug?




I have an expression and want to find its derivative respect to T[1] but not T[2], for example: 

u[1](T[1], T[2], T[3]):=exp(T[1]*I)

If I find the 

diff(u[1](T[1], T[2], T[3]), T[1], T[2])

I would like to get something like this:

D__1*diff(u[1](T[1], T[2], T[3]), T[1])

instead of the derivative respect to T[2], which makes the result to be zero.

I need an expression that I can do other things with it.

You might say why do you just remove the diff of T[2], well I want to automate my code and this is part of the expression so I cannot write something else.




I want to find the real and Imaginary part of this equation, without losing the exponential forms. 


If I use 


then the exp changes to sin or cos forms. How can I prevent it?



I have the sequence f(n) satify the conditions

f(n) = 4*f(n-1)-2*f(n-2), f(1) = 1, f(2) = 28.

I find the formula of f(n)

rsolve({f(1) = 1, f(2) = 28, f(n) = 4*f(n-1)-2*f(n-2)}, {f})

I got

f(n) = (-25*sqrt(2)*(1/4)-6)*(2-sqrt(2))^n+(25*sqrt(2)*(1/4)-6)*(2+sqrt(2))^n

Is there an integeral number k satisfy the equation f(n) = k^2, (k <> 0) ?

I have a 3D plot as follows:



plot3d(sin(x*y), x = -2 .. 2, y = -2 .. 2, axes = framed, colorscheme = ["zgradient", ["Blue", "Green", "Yellow", "Red"]]);


I want to plot its 2d contour (i.e. graph x-y plane).

How do I plot the contour of the graph in which the color of the contour lines have the corresponding colorscheme as the 3d plot?  Thank you. 

(P.S. This question has been updated)


i want to reverse this list using seq : :L := [2, 1, -7, 8];

when i try this way it works: seq(L[i], i = nops(L) .. 1, -1) but this way doesn't work :seq(L[nops(L)-i], i = 1 .. nops(L)), can anyone explain to me why ?


Hi everyone,

i want to to skip some code lines if a certain condition is/isn't given. I would prefer using a if..then expression. Is this possible.

Thanks for your help in advance.


I combined two animations as follow, but the dash line is turned into solid line. How can I solve this?



A := animate([X, X+t, X = -10 .. 10], t = -10 .. 10, color = red, linestyle = dash);

B := animate([X, t^2+X, X = -10 .. 10], t = -10 .. 10, color = blue, linestyle = solid);

display([A, B]);

I have two equations 

(i) x=t^2;

(ii) y=t^3;

I want to plot these two equations into a single graph [i.e. combine these two graphs: graph of x versus t (solid line, bule color), and graph of y versus t (dash line, red color)].

How do I customise the location of the legend? I want the legend located inside the blank space of graph (say, at top-right corner ) with vertical alignment. Thank you.

That is something simililar to the following graph:


I've got two functions wich will deliver me coordinates to use in a CAD Drawing Software (one for the x-coordinates and one for the y coordinates). So I need to plugin multiple values in the function, lets say 0..Pi/4 in 0.1 steps and I want to export the results in an Excel Sheet.
I tried it with subs but it not supports 0..Pi/4. So i need to program a loop or something like that. 

Has anyone done this before?

best regards

As is well known, a number n is a Charmichael number if and only if for every prime factor p of n, p-1 divides n-1. 

I would like to find a way to identify the following: Odd square free composite numbers n, having at least one prime factor p, with the property that p-1 divides n-1.

obviously the Carmichael numbers are a sub sequence of this. I have already managed to write a code to identify odd square free numbers divisible by the sum of their prime divisors and am interested to see how these data will differ from those of  this new sequence. 

My problem here is to find, given an odd square free number, a way to select and test each prime divisor for the above divisibility requirement. I hope someone can help, thanks in advance

Best regards

David Sycamore.


I would like to combine and output different text modules that are saved in variables as strings but cannot get rid off the brackets and quotation marks

use DocumentTools in
textTwo:="How are you?";
SetProperty(Label0, caption,[textOne, textTwo]);
end use;

I alway get  ["Hello", "How are you?"] istead of Hello How are you?

If i remove the brackets [ ] after caption, the output is fine but only the first element appears. Hello

If I try the printf command, which apparently should remove the marks, the label won't output anything at all.

use DocumentTools in
textTwo:="How are you?";
SetProperty(Label0, caption,[printf(textOne), printf(textTwo)]);

end use;

How ist it done? Help would be much appreciated.

Thanks a lot!

Regards, Ben

I am working on a physics problem where I will need to generate random unitaries of size N x N.   

As I understand it this would require me to sample uniformly from U(N), where 'uniform' is in the sense of the Haar measure.  I believe this construction in Mathematica is called 'circular unitary ensemble' and was wondering if there was a similar routine in Maple or some simple code that would allow me to generate random unitaries of particular size.


I have the following two equations:


x = f+t-(8*(-2.28*t+.64*f))/(2.28+2*(-t+.64*f)^2+2.56*t^2);


How can I plot the contours of u in the x-t plane (with its elevation value labelled in the line of each contour)?


Thank you a lot for your help!

5 6 7 8 9 10 11 Last Page 7 of 1757