Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I have two symmetric real matrices as below (Mt,Kk).

I multilpy them in Mt.Kk.Mt.

But the result is not symmetric.!!!!why????



restart; with(LinearAlgebra)

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman


Mt := ImportMatrix("C:/Mt.mpl"); -1; Norm(Mt-LinearAlgebra:-HermitianTranspose(Mt), 2)



Kk := ImportMatrix("C:/Kk.mpl"); -1; Norm(Kk-LinearAlgebra:-HermitianTranspose(Kk), 2)



Aa := Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(Mt, Kk), Mt); -1; Norm(Aa-LinearAlgebra:-HermitianTranspose(Aa))




RTABLE(18446744074182082558, complex[8], Matrix, rectangular, Fortran_order, [], 2, 1 .. 45, 1 .. 45)
















I couldnt upload Kk.mlp and Mt.mlp so changed their extensions to mw. for using please change them to .mlp




I have been looking at a method for computing the inverse of a periodic, tridiagonal, matrix (tridiagonal with non-zero elements in (1,n) and (n,1), where n is the order of the matrix).

Using test matrices with rational elements I get a good improvement in execution time compared to Maple's MatrixInverse procedure from LinearAlgebra. However when I use algebraic elements I get faster times with small orders but from around
n=25 (for a particular example matrix) my method is running slower than MatrixInverse.

If I look at the element (1,1) of the inverse returned by both procedures I see that the Maple inverse is quite compact while the value returned by my procedure is very complex (on printing Maple extracts 17 subexpressions of varying complexity). I
have a check in the test rig to determine if the two inverses are the same; this uses


and all the elements do agree.

The Maple MatrixInverse appears to be able to simplify the elements of the inverse; is this a feature of the algorithm that's being used or is there some mechanism I should be using to achieve this?

The source code of the procedure I've written (first 100 odd lines) and the test rig are attached. The file is set up to run the algebraic test (Test4) for n=20 and to print the (1,1) inverse elements generated by both the Maple and my procedures.

Any help in improving my code to produce simplified forms of the elements would be greatfully received.

Maple source as text file: KilicInv.txt

Hi everybody,

The Collatz conjecture can be used to give students a taste of a topic in Number Theory.  See the Wikipedia article for a good explaination.

Also, a conjecture is something that is probrably true.  Enjoy my little Maple procedure.  (in .mw and .pdf forms)


Comments are appreciated.



I have two figures that's generated in Maple (by plot), then pasted them to a worksheet, which I would like to export them to PDF format with exactly the same as it seems on Maple, meaning that these two figures need to be on the same row.

However, in the exported PDF, these two figures are always in two rows: see and Fig_1.pdf 

What I tried was: to really resize these two figures into very small size, and the export works, however, I also need three figures or four figures in one row. See and Fig_2.pdf

So there is actually two questions:

1. Can I specify some parameters in Maple such that the exported PDF is exactly 'what I see is what I get'?

2. If #1 is impossible, where can I get the information on: width of the exported PDF, how to specify the precise size of plot command etc


does anybody know how to copy a rtable structure in a worksheet and paste it on the other worksheet?

I copy it by right click and paste on the other one but no data transfered.

How to express a chemistry equation in prefix expression

I have noticed this a couple of times now. If I  do a Saveas on a workbook document A to a new name B. Close maple. Reopen and load the new workbook document B it retains the old file name in the header bar and at the top of the workbook document list. The new filename is shown across the dark part at the top along with the old file name. The only fix I found the last time was to export the workbook as, then saveas to B.maple and reattach documents. Painful.



Hi everyone!

I would really appreciate if someone could give me a hand on telling me what is wrong with this problem! pdsolve gives the error: Error, (in pdsolve/sys/info) found functions with same name but depending on different arguments in the given DE system: {f(0, y), f(x, 0), f(x, y), (D[2](f))(0, y), (D[2](f))(x, 0)}.

Thanks in advance!!! 




I want to check via Maple whether the term is always bigger than c/4 (it is), but using verify(TERM, c/4, greater_than) just returns FALSE. I did assume(a > 0, b > 0, -1 <= c and c <= 1); It would be nice if you could tell me what exactly is causing the problem and how to solve it.

Thanks in advance



Here, I have a 3D map T=(T1,T2,T3) with




How can I use  IterativeMaps:-Attractor obtain the attractor for T.

After 3 hrs trying I give up.  I am a Maple newbie.

I need to read a plain text file, where each line contains 12 fields in it.

The fields are comma separated.  But some of the fields are quoted strings. Here is an example of one line below. I can read the line OK, as a string, using readline(), but I do not know how to split it correctly into 12 fields inside Maple once read, so I can access each field easily and make any changes I want.

The problem is that, once I read the line using readline(), it comes in as string. But it has string embeded in it allready, since the line in the file, allready has quoted string as fields.

Here is one line in file foo.txt

1,2,3,4,0.1,5,"int(x^2,x)","\frac{x^3}{3}",6,7,"(2*x + 1)^(3/2)/3","A"

Each line has the same number of fields. 12.  Now I do this:


And now current_line is

"1,2,3,4,0.1,5,"int(x^2,x)","\frac{x^3}{3}",6,7,"(2*x + 1)^(3/2)/3","A""

And here I am stuck. I tried StringTools[Split], I tried sscanf, tried readata, and nothing worked. For example, if I do


The result is

[1, 2, 3, 4, .1, 5, ""int(x^2,x)","\frac{x^3}{3}",6,7,"(2*x"]

The fields are


The problem is the embeded string. I am sure there is a Maple function to do this easily, I just can't find it.

What is the correct way to read these lines, and split them into a Matlab list (of lists) so I can access them easily inside Maple?

Using Maple 2016.2



I tryed this, because i thought i might be abel to shade this new piecewise function later on, but i dont know how to tell maple that there is 2 y-axes values in the interval from (2;3):

so it failed. 

pleace help regards Niklas.


The commands below are from a response by Carl Love to a question posed on February 27, 2016.

Variable t is not mentioned in the plot of f. Does t assume one or more particular values in the construction of the plot?

When t is given a specific value before executing the plot command, the resulting plot appears to be independent of t's value.

What is the logic behind the plot's construction?

f:= cos(2*t/m) + cos(2*(t+5)/m):
plot('maximize'(f), m= 1..10);


I have a nonlinear PDEs, solved using finite difference in the square

I get the following nonlinear system of equation. Is there any idea how correct the code and display the solution.

I will appreciate any help in this question.



# Boundary condition

for j from 0 by 1  to n+1 do
u[0, j] = 0;
u[n+1, j] = 0;
u[j, 0] = 0;
u[j, n+1] = 0 ;
end do;
## Loop for interior point in the square
for i from 1 by 1 to  n do
for j from 1 by 1 to  n do
(u[i+1, j]-u[i, j])*(u[i+1, j]-2*u[i, j]+u[i-1, j])+h*(u[i, j+1]-2*u[i, j]+u[i, j-1]) = 0;
end do;
end do;

How can I solve this system of equations with unknown u[i,j], where i,j=1,..,n


Many thanks for any help

Generate 8 random 3 by 3 matrices using the RandomMatrix command from the  LinearAlgebra package. As each matrix is generated use Eigenvalues to compute its eigenvalues. Then take the product of the eigenvalues, and check that for each matrix, this product is equal to the determinant of the matrix.  

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