Menu

operations in Euler Math with Maxima

serguei
2019-10-21
2019-10-22
  • serguei

    serguei - 2019-10-21

    Hi all,
    I am rooky in Euler Math and Maxima. Could anybody how I may operate with output after calculations with symbolic expressions. See, for example below:

    a = 0.5
    0.5
    b = 1.57075
    1.57075
    c = 0.8
    0.8
    &elliptic_pi(@a,@b,@c^2)

                           2.947723693174529
    

    u = &elliptic_pi(@a,@b,@c^2)

                           2.947723693174529
    

    v = 10.*u
    Wrong argument!

    Cannot combine a symbolic expression here.
    Did you want to create a symbolic expression?
    Then start with &.

    Error in:
    v = 10.*u ...

    So, I just would like to calculate 10*u and store it in v,
    How I may do it?
    thank you

     
  • Rene Grothmann

    Rene Grothmann - 2019-10-22

    The interaction between EMT and Maxima is based on strings, because the man point of Maxima is to help EMT with symbolic computations. Thus the return value of Maxima is always a string.

    You can evaluate any string in EMT with brackets like string() as long as EMT understands it. E.g., if you use Maxima for numerical computations you will not get a number but a string containing the number which needs to be evaluated.

    Your example works as follows:

    v = 10*u()
    29.4772369317

    Of course, you can also stay inside Maxima for the complete computation.

    a &= 0.5;
    b &= 1.75075;
    c &= 0.8;
    u &= elliptic_pi(a,b,c)
    2.636381880138503
    v &= 10*u
    26.36381880138503

    &= interprets the right hand side as an expression, sends it to Maxima which will assign the result to a Maxima variable. The result is also stored in EMT as a string. So "a" is a string in EMT, and a "float" value in Maxima.

    There is also &:= which interprets the right hand side by EMT and sets an EMT numerical variable. But it also transfers this numerical value to Maxima.

    By the way, EMT does have functions for elliptical integrals. The documentation is not optimal here. But they can be found in the help systems (enter "&ellipt" or "functions.e") and in this file:

    http://euler-math-toolbox.de/reference/functions.html

    But the third kind is not there and no incomplete integrals. I believe, I implemented them somwhere numerically, but could not find that at the moment.

    You can make an EMT funciton that uses Maxima by

    function ellpi (a,b,c) := mxm("elliptic_pi(@a,@b,@c)")()
    ellpi(0.5,1.75075,0.8)
    2.63638188014

    But the numerical functions in EMT for elliptic integrals are using an iteration.

     
  • serguei

    serguei - 2019-10-22

    thank you

     

Log in to post a comment.

MongoDB Logo MongoDB