Edwin Woollett | 1 Sep 23:33 2015
Picon

Re: Ch 3 and Ex 3: Computational Physics with Maxima or R

Thanks for the information about this bvp code.
The four examples worked out are a little hard to
follow with no background given for the meaning of
the variables that have to be defined to get the code
to work.

I notice that you mentioned in an earlier post that
you were working on some documentation and a
simple interface??

Ted
===============================================

-----Original Message----- 
From: Michel Talon
Sent: Monday, August 31, 2015 2:00 PM
To: Edwin Woollett
Subject: Re: Ch 3 and Ex 3: Computational Physics with Maxima or R

Le 31/08/2015 21:50, Edwin Woollett a écrit :
> Chapter 3 (Two Point Boundary Value and Eigenvalue Problems)
> and Example 3 ( time independent Schroedinger's Equation in 1D)
> of the new series:  ‘Computational Physics with Maxima or R’
> have been posted on my CSULB webpage.
>  From that webpage:
> -------------------------------------------------------------------------------------
> Chapter 3, Two Point Boundary Value and Eigenvalue Problems
> Chapter 3 Topics
>      Shooting Methods for 2nd Order ODE's
>      Using the R Package bvpSolve
(Continue reading)

Ingo Feinerer | 1 Sep 18:09 2015
Picon

Failing tests

Hi,

with Maxima 5.37.1 (compiled from source) the regression tests fail on OpenBSD:

Making check in tests
gmake[1]: Entering directory 'maxima-5.37.1/tests'
gmake  check-TESTS
gmake[2]: Entering directory 'maxima-5.37.1/tests'
gmake[3]: Entering directory 'maxima-5.37.1/tests'
gmake[3]: *** No rule to make target 'test.sh.in', needed by 'ecl-test.sh'.  Stop.
gmake[3]: Leaving directory
'maxima-5.37.1/tests'
Makefile:656: recipe for target 'check-TESTS' failed

Maxima 5.36.1 worked (5.37.0 did not but I think there the test files
are just missing).

Any ideas?

Best regards,
Ingo

------------------------------------------------------------------------------
Stanislav Maslovski | 1 Sep 12:30 2015
Picon

scope of the function symbol used as a formal parameter

Hi,

What should I do to avoid the following behavior?

(%i1) display2d: false;
(%o1) false

(%i2) f(x) := x^2;
(%o2) f(x):=x^2

(%i3) fun(f, x) := f(x);
(%o3) fun(f,x):=f(x)

(%i4) fun(sin, x);
(%o4) x^2

In %o4 I want sin(x), not x^2.

--
BR,
Stanislav
------------------------------------------------------------------------------
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
mark harmer | 1 Sep 10:34 2015

#$ macro

Hi,

 

I am trying to use the #$ macro (which translates a symbol, say 2*x+3=5, into the Maxima internal representation:

 

? (in-package :maxima)

? (setf $exp1 #$2*x+3=5$)

((MEQUAL SIMP) ((MPLUS SIMP) 3 ((MTIMES SIMP) 2 $X)) 5)

 

). I would like to use the #$ macro on the value of a symbol. For instance in

 

? (setf answer '2*x+1=2)

? (setf $exp2 #$answer$)

$ANSWER

 

#$ is clearly translating the symbol ‘answer instead of evaluating to the symbol ‘2*x+1=2 and then translating. As you would expect.

Is there some way to get #$ to evaluate the symbol 'answer before translating? I have tried combinations of ` , without success.

 

Apologies if this is a basic question / has been answered previously or there is some well known way to do this.

Also apologies if this has been double posted, I had a problem with the mailing list recognising my email address.


Thanks,

Mark

------------------------------------------------------------------------------
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Robert Dodier | 1 Sep 06:47 2015
Picon

Fwd: Maxima 5.37.1

Hi Nicholas, I've taken the liberty of forwarding your message to
the Maxima discussion list.

I used Clisp to compile the rpms (Redhat Linux installation files,
which can also be used on Ubuntu via alien).

best

Robert Dodier

---------- Forwarded message ----------
From: Nicholas Jankowski <jankowskin <at> asme.org>
Date: Mon, Aug 31, 2015 at 6:33 PM
Subject: Re: [Maxima-discuss] Maxima 5.37.1
To: Robert Dodier <robert.dodier <at> gmail.com>

Which Lisp did you compile this with or rather, which is the Windows
version being compiled with? Last time there were three of them and I
think one or two caused DEP problems with Windows.

------------------------------------------------------------------------------
Robert Dodier | 1 Sep 00:42 2015
Picon

Maxima 5.37.1

I've tagged 5.37.1 and uploaded rpms & tar.gz to the file manager.
http://sourceforge.net/p/maxima/files

Can anyone who is working on the Windows build please verify whether
5.37.1 builds & packages successfully.

I merged several commits from master onto branch-5_37, including some
bug fixes and changes to the build system; the Git log tells the whole
story if anyone cares to look.

The only merge conflict I ran into was for
crosscompile-windows/CMakeLists.txt. The version which is included in
5.37.1 was merged from master and it is a little different from a
version which was committed to branch-5_37. Can anyone who is using that
file please say whether the 5.37.1 version is OK or if there needs to be
another releaase to update it.

best,

Robert Dodier

------------------------------------------------------------------------------
Edwin Woollett | 31 Aug 21:50 2015
Picon

Ch 3 and Ex 3: Computational Physics with Maxima or R

 
Chapter 3 (Two Point Boundary Value and Eigenvalue Problems)
and Example 3 ( time independent Schroedinger's Equation in 1D)
of the new series:  ‘Computational Physics with Maxima or R’
have been posted on my CSULB webpage.
 
From that webpage:
-------------------------------------------------------------------------------------
Chapter 3, Two Point Boundary Value and Eigenvalue Problems
 
Chapter 3 Topics
 
    Shooting Methods for 2nd Order ODE's
    Using the R Package bvpSolve
    Mono-Implicit Runge-Kutta R Method bvptwp
    Poisson's Equation
    Wave Equation
 
Example 3: Schroedinger's Equation
 
Detailed investigation of energy levels and corresponding wave
  functions for the finite rectangular potential well and
  the Lennard-Jones 6-12 Potential.
 
Runge-Kutta integration is used for the finite well problem,
and the Numerov method is used for the Lennard-Jones potential problem.
 
Files for Ch. 3 and Example 3
 
    --cp3.zip : zip file, Aug. 24, 2015 , Maxima 5.31.2, R 3.0.2
    --cp3.tar.gz : tar.gz file, Aug. 24, 2015 , Maxima 5.31.2, R 3.0.2
    --cp3.pdf : Ch. 3 pdf file, Aug. 24, 2015
    --cp3.tex : Ch. 3 latex file, Aug. 24, 2015
    --cp3.mac : Maxima code for Ch. 3, Aug. 24, 2015, Maxima 5.31.2
    --cp3.R : R code for Ch. 3, Aug. 24, 2015, R 3.0.2
    --example3.pdf : Example 3 pdf file, Schroedinger's Equation, Aug. 24, 2015
    --example3.tex : Example 3 latex file, Schroedinger's Equation, Aug. 24, 2015
    --FW.mac : Maxima code for Finite Rectangular Well, Aug. 24, 2015, Maxima 5.31.2
    --FW.R : R code for Finite Rectangular Well, Aug. 24, 2015, R 3.0.2
    --LJ6-12.mac : Maxima code for Lennard-Jones Potential, Aug. 24, 2015, Maxima 5.31.2
    --LJ6-12.R : R code for Lennard-Jones Potential, Aug. 24, 2015, R 3.0.2
 
ch3.zip and ch3.tar.gz contain all the example3 files as well.
-----------------------------------------------------------------------------------------------------
 
Ted Woollett
 
 
------------------------------------------------------------------------------
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Jorge Calvo | 31 Aug 16:24 2015

Problem installing on a Mac

Dear Maxima gurus:

One of my students is having trouble installing Maxima on her Mac (running OS 10.10.3 Yosemite).  She has
downloaded the appropriate files and successfully completed the first two steps in the .rtf (installing
Maxima and installing wxMaxima).  The difficulty comes when she tries to install GNUPLOT.  When she runs
GNUPLOT she gets the following error in the Terminal window:

OSXs-MacBook-Pro:~ Admin$ exec '/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot'
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 61:   397 Illegal instruction: 4 
GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}"
DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}"
DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}"
DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-5.0.0" "$ <at> "

[Process completed]

I had her install the X11 libraries (Xquartz), but the error persists.  We also tried the fix noted in the .rtf
for a possible “error regarding ‘DISPLAY :0.0’” to no avail.  This is the first time I encounter
this error and do not know how to proceed.  Any ideas for a fix would be most appreciated!

Thanks!

Jorge
--
Dr. Jorge Alberto Calvo
Associate Professor of Mathematics
Department of Mathematics
Ave Maria University

Phone: (239) 280-1608
Email: jorge.calvo <at> avemaria.edu<mailto:jorge.calvo <at> avemaria.edu>
Web: http://sites.google.com/site/jorgealbertocalvo


------------------------------------------------------------------------------
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Picon

Re: output multiavariate monomial order.

(please keep the list on the mail thread)

You can also define 

/* p is the polynomial, v is the variable ordering */
grob_order(p) :=
  block([poly_return_term_list: true],
        simpfunmake(verbify("+"), reverse(poly_add(p,0,listofvars(p)))))$

if you don't want to explicitly control the variable ordering. (Which probably isn't that useful anyway since the individual terms' multiplicative ordering isn't changed by grob_order.)


On Sun, Aug 30, 2015 at 10:07 PM, Herman Jaramillo <jaramillo.herman <at> gmail.com> wrote:
This is very useful. Thank you so much!

I only need this for display purposes. I love the way the "grobner" basis package works.
I wish I did not have to type the variables "v'" each time (they are 3,4, or 5 of them) but....

Thanks again.


On Sun, Aug 30, 2015 at 6:45 PM, Stavros Macrakis (Σταῦρος Μακράκης) <macrakis <at> alum.mit.edu> wrote:
If you like the order given by the grobner package, it is easy enough to convert your expressions into a non-standard form that will print as you want it:

load("grobner")$
load("simplifying")$
/* if you don't set this flag, -x+y will print as y-x */
negsumdispflag: false$

/* p is the polynomial, v is the variable ordering */
grob_order(p,v) :=
  block([poly_return_term_list: true],
        simpfunmake(verbify("+"), reverse(poly_add(p,0,v))))$

Note that the variable ordering within terms remains the Maxima default.

Since the output of lexicopol is not in a Maxima normal form, you should not use it for further calculation, only for display.  To convert it back to the Maxima simplified form, you can use expand(<expr>,0,0).

Hope this is useful,

              -s



On Fri, Aug 28, 2015 at 8:22 PM, Herman Jaramillo <jaramillo.herman <at> gmail.com> wrote:
Dear Stavros:

I really appreciate your interest on this question. 

I have tried "rat" and "ratvars" with no luck. 

I want to print (for example) g: x*y^2 - x*z + y   in this (lexicographic) order but it has been impossible. Can you try?

Here a few lines of my Maxima screen:

%i7) ratvars(x,y,z);
(%o7)                              [x, y, z]
(%i8) g : x*y^2-x*z + z;
                                              2
(%o8)                          - x z + z + x y
(%i9) g;
                                              2
(%o9)                          - x z + z + x y
(%i10) rat(z);
(%o10)/R/                              z
(%i11) rat(g);
                                               2
(%o11)/R/                     (- x + 1) z + x y
(%i12) expand(rat(g));
                                              2
(%o12)                         - x z + z + x y


Yes, the "local variable" tip is really good. I should have thought about that.

Again, thank you so much!

H.




On Fri, Aug 28, 2015 at 1:55 PM, Stavros Macrakis (Σταῦρος Μακράκης) <macrakis <at> alum.mit.edu> wrote:
The poly_monomial_order variable is only used by the poly_* functions, which are part of the grobner package.

For normal polynomial manipulations, you can just use the core CRE (canonical rational expression) functionality:

rat((x+y)^2-(x-z)^2,x,y,z) => -z^2+2*x*z+y^2+2*x*y
rat((x+y)^2-(x-z)^2,z,y,x) => (2*y+2*z)*x+y^2-z^2

​Also look at ? ratvars

​By the way, to set a variable locally, you can use, e.g.:

​      block( [ poly_return_term_list : true ],
                     ... )

This will restore the value of the variable even if there is an error in (...).​


         -s​


On Fri, Aug 28, 2015 at 12:58 PM, Herman Jaramillo <jaramillo.herman <at> gmail.com> wrote:
Why is not "Maxima" respecting the order provided by "poly_monomial_order"  in the output?

This is quite annoying.  Debugging a multivariate polynomial in more than 2 variables and with more than 4 term is tedious if the order is not the correct order.

I wrote the following way around this , but this is not optimal.  There should be a function that do this better:

list_me(p) :=
block ( 
   poly_return_term_list :true,
   terms : poly_add(p,0,[x,y,z]),
   print(terms),
    terms, poly_return_term_list :false)$


Instead of giving me back the polynomial this gives me a list, but in the "correct" order, then I have
to set the "poly_return_term_list" to false, since it mess up my operations.

Note that this silly program only works for polynomials in [x,y,z] which is what I need for my work.
--
Herman Jaramillo

------------------------------------------------------------------------------

_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss





--
Herman Jaramillo




--
Herman Jaramillo

------------------------------------------------------------------------------
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Raymond Toy | 31 Aug 06:25 2015
Picon

Funny display with extra parens


With the current git head, I see the following:

load(stirling)$
stirling(gamma(x), 3)
=> sqrt(2)*sqrt(%pi)*x^(x-1/2)*%e^((-x)+1/(12*x)-1/(360*x^3))$

Look at the exponential: %e^((-x)+1/(12*x)-1/(360*x^3)).  I was
expecting something without the parens around -x.  It's not wrong per
se, but they don't add anything useful and actually clutter things up.

Don't know if this is something new or not.

--
Ray

------------------------------------------------------------------------------
Picon

Re: output multiavariate monomial order.

If you like the order given by the grobner package, it is easy enough to convert your expressions into a non-standard form that will print as you want it:

load("grobner")$
load("simplifying")$
/* if you don't set this flag, -x+y will print as y-x */
negsumdispflag: false$

/* p is the polynomial, v is the variable ordering */
grob_order(p,v) :=
  block([poly_return_term_list: true],
        simpfunmake(verbify("+"), reverse(poly_add(p,0,v))))$

Note that the variable ordering within terms remains the Maxima default.

Since the output of lexicopol is not in a Maxima normal form, you should not use it for further calculation, only for display.  To convert it back to the Maxima simplified form, you can use expand(<expr>,0,0).

Hope this is useful,

              -s



On Fri, Aug 28, 2015 at 8:22 PM, Herman Jaramillo <jaramillo.herman <at> gmail.com> wrote:
Dear Stavros:

I really appreciate your interest on this question. 

I have tried "rat" and "ratvars" with no luck. 

I want to print (for example) g: x*y^2 - x*z + y   in this (lexicographic) order but it has been impossible. Can you try?

Here a few lines of my Maxima screen:

%i7) ratvars(x,y,z);
(%o7)                              [x, y, z]
(%i8) g : x*y^2-x*z + z;
                                              2
(%o8)                          - x z + z + x y
(%i9) g;
                                              2
(%o9)                          - x z + z + x y
(%i10) rat(z);
(%o10)/R/                              z
(%i11) rat(g);
                                               2
(%o11)/R/                     (- x + 1) z + x y
(%i12) expand(rat(g));
                                              2
(%o12)                         - x z + z + x y


Yes, the "local variable" tip is really good. I should have thought about that.

Again, thank you so much!

H.




On Fri, Aug 28, 2015 at 1:55 PM, Stavros Macrakis (Σταῦρος Μακράκης) <macrakis <at> alum.mit.edu> wrote:
The poly_monomial_order variable is only used by the poly_* functions, which are part of the grobner package.

For normal polynomial manipulations, you can just use the core CRE (canonical rational expression) functionality:

rat((x+y)^2-(x-z)^2,x,y,z) => -z^2+2*x*z+y^2+2*x*y
rat((x+y)^2-(x-z)^2,z,y,x) => (2*y+2*z)*x+y^2-z^2

​Also look at ? ratvars

​By the way, to set a variable locally, you can use, e.g.:

​      block( [ poly_return_term_list : true ],
                     ... )

This will restore the value of the variable even if there is an error in (...).​


         -s​


On Fri, Aug 28, 2015 at 12:58 PM, Herman Jaramillo <jaramillo.herman <at> gmail.com> wrote:
Why is not "Maxima" respecting the order provided by "poly_monomial_order"  in the output?

This is quite annoying.  Debugging a multivariate polynomial in more than 2 variables and with more than 4 term is tedious if the order is not the correct order.

I wrote the following way around this , but this is not optimal.  There should be a function that do this better:

list_me(p) :=
block ( 
   poly_return_term_list :true,
   terms : poly_add(p,0,[x,y,z]),
   print(terms),
    terms, poly_return_term_list :false)$


Instead of giving me back the polynomial this gives me a list, but in the "correct" order, then I have
to set the "poly_return_term_list" to false, since it mess up my operations.

Note that this silly program only works for polynomials in [x,y,z] which is what I need for my work.
--
Herman Jaramillo

------------------------------------------------------------------------------

_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss





--
Herman Jaramillo

------------------------------------------------------------------------------
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

Gmane