Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Manual of Maxima

  1. Apr 12, 2010 #1
    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?

    Thank you for your help.

    Good evening and till the next.
     
  2. jcsd
  3. Apr 13, 2010 #2

    Mentz114

    User Avatar
    Gold Member

    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]

    Your questions are answered in the ctensor section.

    [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
  4. Apr 13, 2010 #3
    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.
     
  5. Apr 14, 2010 #4

    Mentz114

    User Avatar
    Gold Member

    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

    Load from the file menu - > File|Batch file
    */
    kill(all);
    load(ctensor);
    /* 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);
     
     
  6. Apr 14, 2010 #5
    Your help, Mentz114, is valuable.
    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.

    Thank you for your kindness.

    Till the next.
     
  7. Apr 16, 2010 #6
    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.
     
  8. Apr 17, 2010 #7

    Mentz114

    User Avatar
    Gold Member

    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 ?
     
  9. Apr 17, 2010 #8
    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





    Load from the file menu - > File|Batch file


    */


    kill(all);


    load(ctensor);


    /* 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
  10. Apr 19, 2010 #9

    Mentz114

    User Avatar
    Gold Member

    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.
     
  11. Apr 19, 2010 #10
    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.
     
  12. Apr 19, 2010 #11

    Mentz114

    User Avatar
    Gold Member

    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.
     
  13. Apr 20, 2010 #12
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Manual of Maxima
  1. Integrating in Maxima (Replies: 1)

Loading...