# Manual of Maxima

1. Apr 12, 2010

### Jomapil

Hello, everyone.

Excuse me but I think I should post this question in sub-forum Calculus & Beyond Learning Materials but I can't access to that sub-forum and so...

The question is:
I began to learn to work with Maxima and I have several doubts. The help of the program is a little difficult for me. Is there another manual more explainable?
For example 1) I can't display the components of Rieman Tensor.
2) In the stateman Rieman(dis) what are the "values" to dis?
3) christof (lcs) ou christof(mcs) sometimes displays those components sometimes nothing. Why?

Good evening and till the next.

2. Apr 13, 2010

### Mentz114

Here is a link to the user manual for Maxima.

maxima.sourceforge.net/docs/manual/en/maxima.pdf

or

"michel.gosse.free.fr/documentation/fichiers/maxima.pdf"[/URL]

[QUOTE]2) In the stateman Rieman(dis) what are the "values" to dis? [/QUOTE]
'dis' is 'true' or 'false'

[QUOTE]christof (lcs) or christof(mcs) sometimes displays those components sometimes nothing.[/QUOTE]
Sometimes they are zero !

Last edited by a moderator: Apr 25, 2017
3. Apr 13, 2010

### Jomapil

Thank you, Mentz114 for your answer, but I continue with the doubts.
I'm initiating the use of Maxima.
I'm going to display a summary to you better understand my problem.

csetup();
dimension - 3;
diagonal - 1;
"enter the 3 diagonal elements" ( spherical coordinates )
display the metric? - Y or N;

and now:

dis= TRUE;
riemann(dis);

and it only displays "done" or sometimes "The spacetime is flat"

I hope anyone understand my "summary". Why it doesn't display Riemann Tensor?

Good evening and till the next.

4. Apr 14, 2010

### Mentz114

Hi,

it is much easier to use scripted batch files. I list a simple script below that works out the tensors for the Schwarzschild solution.

If the message 'This spacetime is empty or flat' comes, it means all the components of the Riemann tensor are zero.

I have other scripts also.

Code (Text):

/*
Schwarzschild simple

save as name.mac

*/
kill(all);
/* set some flags */
cframe_flag: false;
ratchristof: true;
ratriemann : true;
ratfac : true;
ctrgsimp: true;
/* define the dimension */
dim: 4;
/* list the coordinates */
ct_coords: [t,r,theta,phi];
/* set up the metric */
/* assign to lg a matrix of zeros  ':' means 'assign' */
lg:zeromatrix(4,4);
/* now add the Schwarzschild coefficients */
lg[1,1]:-c^2*(1-2*m/r);
lg[2,2]:1/(1-2*m/r);
lg[3,3]:r^2;
lg[4,4]:r^2*sin(theta)^2;
/* make the inverse matrix */
ug:invert(lg);
/* get Christoffels */
christof(mcs);
/* calculate and display Ricci tensor, ( 'dis' = true ) */
ricci(true);
/* Riemann with all indexes down */
lriemann(true);
/* Riemann with all indexes up */
uriemann(false);
/* calculate Einstein tensor */
einstein(false);
/* show Einstein tensor as a matrix */
cdisplay(ein);
/* Kretschmann scalar */
rinvariant();
/* Geodesic equations */
cgeodesic(true);

5. Apr 14, 2010

### Jomapil

The file you sent me is a great help.
The manual of Maxima, opposite to other manuals, isn't much explainable with very few examples.
Your file will be my initiation to the learning of Maxima.

Till the next.

6. Apr 16, 2010

### Jomapil

Hello, Mentz114.
Your help was very important for me to learn Maxima. I think my error was not to use DEPENDS. I think it was so because I wasn´t be able to obtain Christoffel symbols or Riemann tensor. But in your script you don't use that statement! I don't understand the explanation of the manual. So I (we) don´t need such thing... In your message I see that you say you have more scripts. I did't want to trouble you but if it doesn't cause much work I would appreciate some of those scripts to learn anything more.
Thank you very much for your help.

Best regards and till the next.

7. Apr 17, 2010

### Mentz114

Most of my scripts deal with solutions of the GR field equations. Is that what you want learn or just how to use Maxima for general algebra and equation solving ?

8. Apr 17, 2010

### Jomapil

The basics of Maxima are easy to understand and to perform. My problem was those special packages such ctensor and other ones probably that are not well explained ( for me ). But now with the copy of your batch I could practise and understand a little more.

But I have a problem that I ask you if you knows the answer:

I solved the problem 8.13 of David Kay's Schaum Outline Tensor Calculus manually and it was correct with the solution of the book. But using Maxima with "My" batch I obtained a result a "little" different - The components of Ricci Tensor of the book ( and mine ) are ALL negative. But the results of Maxima are ALL positive. Christoffell symbols and Riemann Tensors are concordant. But as you can see Ricci have + --> - .
Do you know why that?

My batch is:

/*

Schwarzschild simple

save as name.mac

*/

kill(all);

/* set some flags */

cframe_flag: false;

ratchristof: true;

ratriemann : true;

ratfac : true;

ctrgsimp: true;

/* define the dimension */

dim: 3;

/* list the coordinates */

ct_coords: [x1,x2,x3];

/* set up the metric */

/* assign to lg a matrix of zeros ':' means 'assign' */

lg:zeromatrix(3,3);

/* now add the Schwarzschild coefficients */

lg[1,1]:1;

lg[2,2]:2*x1;

lg[3,3]:2*x2;

/* make the inverse matrix */

ug:invert(lg);

/* get Christoffels */

christof(mcs);

christof(lcs);

/* calculate and display Ricci tensor, ( 'dis' = true ) */

ricci(true);

/* Riemann with all indexes down */

lriemann(true);

/* Riemann with all indexes up */

uriemann(true);

/* calculate Einstein tensor */

einstein(false);

/* show Einstein tensor as a matrix */

cdisplay(ein);

/* Kretschmann scalar */

rinvariant();

/* Geodesic equations */

cgeodesic(true);

Thank you very much and a good week-end.

Last edited: Apr 17, 2010
9. Apr 19, 2010

### Mentz114

If the Riemann tensor agrees with your calculation, then so should the contraction to give the Ricci. If you raise the first index of uriem and contract on the first and third indexes then I would expect the result to be positive.

10. Apr 19, 2010

### Jomapil

Thank you, Metz114.

But now it emerges a doubt. If there are several Ricci Tensor according to the contraction selected, there are several solutions for a problem of GR using Ricci tensor!!!

I thought the selected contraction was a general convention.

Good night.

11. Apr 19, 2010

### Mentz114

I made an error. I should have said "If you raise the first index of lriem ..."

The only meaningful contraction is 1st and 3rd indexes.

12. Apr 20, 2010

### Jomapil

At this moment I'm completely explained. Thank you for your kindness and patience with me. I hope to meet you again.

Till the next.