Milan Lukic | 3 Sep 2004 05:00

A strange plot2d result

I  attempted to verify graphically the following trig identity:

sin(x) + cos(x) = sqrt(2)*cos(x-%pi/4);

so I did:

(%i1) sin(x)+cos(x)-sqrt(2)*cos(%pi/4-x);
   -- skip the output --
(%i2)
plot2d(%o1,[x,0,2*%pi]);
  I can send the eps file to anyone interested to see the weird
	picture I got.																				 

Here is the result of build_info(); 

Maxima version: 5.9.0.9beta2
Maxima build date: 14:27 8/11/2004
host type: i686-pc-linux-gnu
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL 2.6.4

*****
Maxima 5.9.0 produced a correct plot. Another observation, the plot
in maxima-5.9.0 came out quite quickly, while maxima-5.9.0.9beta2
took a long time to calculate and produce the plot.
"time(%o2)" shows [13.6].

Milan
Camm Maguire | 3 Sep 2004 17:29

Re: A strange plot2d result

Greetings!  I believe the output is correct to within double floating
point precision.  I don't think that either version is explicitly
simplifying the trigonometry to 0 (though I could be mistaken), so it
is simply an issue that gnuplot autoscales the y axis, whereas the
older native plotter doesn't seem to do so.  The newer behavior (if
described correctly above) would appear to be better.

Take care,

Milan Lukic <lmilan <at> shell.core.com> writes:

> I  attempted to verify graphically the following trig identity:
> 
> sin(x) + cos(x) = sqrt(2)*cos(x-%pi/4);
> 
> so I did:
> 
> (%i1) sin(x)+cos(x)-sqrt(2)*cos(%pi/4-x);
>    -- skip the output --
> (%i2)
> plot2d(%o1,[x,0,2*%pi]);
>   I can send the eps file to anyone interested to see the weird
> 	picture I got.																				 
> 
> Here is the result of build_info(); 
> 
> Maxima version: 5.9.0.9beta2
> Maxima build date: 14:27 8/11/2004
> host type: i686-pc-linux-gnu
> lisp-implementation-type: Kyoto Common Lisp
(Continue reading)

Milan Lukic | 3 Sep 2004 23:47

Re: A strange plot2d result

You guys are, of course, right. What probably threw me off was that
my gnuplot window did not show the values on the y-axis, Also, I do
not see anymore the feature from maxima-5.9.0 where you would move
the mouse over the plot window and read the coordinates of the
cursor position. 
Sorry for the false alarm.

Milan

Camm Maguire [03/09/04 11:29 -0400]:
> Greetings!  I believe the output is correct to within double floating
> point precision.  I don't think that either version is explicitly
> simplifying the trigonometry to 0 (though I could be mistaken), so it
> is simply an issue that gnuplot autoscales the y axis, whereas the
> older native plotter doesn't seem to do so.  The newer behavior (if
> described correctly above) would appear to be better.
> 
> Take care,
> 
> Milan Lukic <lmilan <at> shell.core.com> writes:
> 
> > I  attempted to verify graphically the following trig identity:
> > 
> > sin(x) + cos(x) = sqrt(2)*cos(x-%pi/4);
> > 
> > so I did:
> > 
> > (%i1) sin(x)+cos(x)-sqrt(2)*cos(%pi/4-x);
> >    -- skip the output --
> > (%i2)
(Continue reading)

C Y | 4 Sep 2004 01:27
Picon
Favicon

Re: A strange plot2d result


--- Milan Lukic <lmilan <at> shell.core.com> wrote:

> You guys are, of course, right. What probably threw me off was that
> my gnuplot window did not show the values on the y-axis, Also, I do
> not see anymore the feature from maxima-5.9.0 where you would move
> the mouse over the plot window and read the coordinates of the
> cursor position. 

Yes, gnuplot is unfortunately not quite the ideal plotter for Maxima. I
seem to get y value labels though, at least in the X plot (dunno about
eps).  I think there is a way to get gnuplot to show coordinates under
the mouse, but as usual I'm having a hard time finding the particular
magic to make it work.  My guess is it involves setting some options
for the new 4.0 features.

CY

		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush
Milan Lukic | 4 Sep 2004 02:45

Re: A strange plot2d result

A part of the problem (with the y-axis values) might be that my
gnuplot is 3.7.3. I will try to install the latest version one of
these days.

Milan

C Y [03/09/04 16:27 -0700]:
> 
> --- Milan Lukic <lmilan <at> shell.core.com> wrote:
> 
> > You guys are, of course, right. What probably threw me off was that
> > my gnuplot window did not show the values on the y-axis, Also, I do
> > not see anymore the feature from maxima-5.9.0 where you would move
> > the mouse over the plot window and read the coordinates of the
> > cursor position. 
> 
> Yes, gnuplot is unfortunately not quite the ideal plotter for Maxima. I
> seem to get y value labels though, at least in the X plot (dunno about
> eps).  I think there is a way to get gnuplot to show coordinates under
> the mouse, but as usual I'm having a hard time finding the particular
> magic to make it work.  My guess is it involves setting some options
> for the new 4.0 features.
> 
> CY
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
(Continue reading)

Vadim V. Zhytnikov | 5 Sep 2004 10:48
Picon

Maxima on GCL Win32 status report

I'd like to report on the status of Maxima 5.9.0.9 prerelease
on Windows.  In brief - it is ready with Paths.tcl I posted
a while ago and GCL 2.6.3.  On the other hand there is some
strange problem with GCL 2.6.5.

A few days ago my Windows XP crashed and after complete
reinstall I made fresh MSYS/MinGW installation and
tried to build GCL and Maxima.  Now my primary platform is
Windows Me instead of Windows XP.

I installed MSYS 1.0.10, gcc 3.3.1, binutils 2.14.90,
msysDTK 1.0.1, tcltk 8.4.1-1, Inno Setup 4.2.7,
starkit.  Here is the msysinfo output
===============================================================
$ msysinfo
msysinfo-1.3: Send this to the MSYS support list:

MSYS 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown; targ=MINGW32
GNU bash, version 2.04.0(1)-release (i686-pc-msys); ENV=.profile
GNU Make version 3.79.1,Built for i686-pc-msys; MAKE_MODE=unix
gcc.exe (GCC) 3.3.1 (mingw special 20030804-1); targ=MINGW32
GNU ld version 2.14.90 20040120
   789320 Tue Mar 16 09:32:50 2004 /bin/msys-1.0.dll
    52064 Thu Jan 02 04:05:28 2003 /bin/msysltdl-3.dll
   135680 Tue Mar 16 09:32:48 2004 /bin/make.exe
    84992 Thu Aug 07 22:29:00 2003 /mingw/bin/gcc.exe
   617472 Tue Jan 20 21:57:52 2004 /mingw/bin/ld.exe
HOME=/home/vadim
Sysname=MINGW32_ME-4.90  OSTYPE=msys  TERM=msys
PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/gcl/bin:/c/maxima/bin:/
(Continue reading)

Albert Reiner | 6 Sep 2004 15:56
Picon
Favicon

Lisp code from maxima calculation

Hi,

I hope you don't mind if I ask another one of what must be pretty
trivial questions: being new to maxima, I always suspect I miss the
obvious, or that a solution may already exist.

My current conundrum to poner is about finding the most convenient way
to massage a symbolic result from maxima into code to be run in a Lisp
program.

An example may be clearer:  Suppose I have this trivial maxima code

    foo(x) := cos(2*x)+3 $

so that

    foo(x) ==> COS(2*x)+3

from maxima, and

    (mfuncall '$|foo| 'x) ==>
        ((MPLUS SIMP) 3 ((%COS SIMP) ((MTIMES SIMP) 2 X)))

Eventually, I will want to make use of the result of foo in CL
through, e.g., macros expanding to

    (labels ((foo (x) (declare ...) (+ 3d0 (cos (* 2d0 x))))) ...)
    (defun foo (x) (declare ...) (+ 3d0 (cos (* 2d0 x))))

or through
(Continue reading)

Camm Maguire | 7 Sep 2004 18:31

Re: Maxima on GCL Win32 status report

Greetings!

Vadim, hope I'm reading this right -- 2.6.5 is no problem once stdio.h
is in the include path, right?

Take care,

"Vadim V. Zhytnikov" <vvzhy <at> mail.ru> writes:

> I'd like to report on the status of Maxima 5.9.0.9 prerelease
> on Windows.  In brief - it is ready with Paths.tcl I posted
> a while ago and GCL 2.6.3.  On the other hand there is some
> strange problem with GCL 2.6.5.
> 
> A few days ago my Windows XP crashed and after complete
> reinstall I made fresh MSYS/MinGW installation and
> tried to build GCL and Maxima.  Now my primary platform is
> Windows Me instead of Windows XP.
> 
> I installed MSYS 1.0.10, gcc 3.3.1, binutils 2.14.90,
> msysDTK 1.0.1, tcltk 8.4.1-1, Inno Setup 4.2.7,
> starkit.  Here is the msysinfo output
> ===============================================================
> $ msysinfo
> msysinfo-1.3: Send this to the MSYS support list:
> 
> MSYS 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown; targ=MINGW32
> GNU bash, version 2.04.0(1)-release (i686-pc-msys); ENV=.profile
> GNU Make version 3.79.1,Built for i686-pc-msys; MAKE_MODE=unix
> gcc.exe (GCC) 3.3.1 (mingw special 20030804-1); targ=MINGW32
(Continue reading)

Vadim V. Zhytnikov | 7 Sep 2004 18:42
Picon

Re: Maxima on GCL Win32 status report

Camm Maguire writes:

>Greetings!
>
>Vadim, hope I'm reading this right -- 2.6.5 is no problem once stdio.h
>is in the include path, right?
>
>  
>

Perfectly right.

>Take care,
>
>"Vadim V. Zhytnikov" <vvzhy <at> mail.ru> writes:
>
>  
>
>>I'd like to report on the status of Maxima 5.9.0.9 prerelease
>>on Windows.  In brief - it is ready with Paths.tcl I posted
>>a while ago and GCL 2.6.3.  On the other hand there is some
>>strange problem with GCL 2.6.5.
>>
>>A few days ago my Windows XP crashed and after complete
>>reinstall I made fresh MSYS/MinGW installation and
>>tried to build GCL and Maxima.  Now my primary platform is
>>Windows Me instead of Windows XP.
>>
>>I installed MSYS 1.0.10, gcc 3.3.1, binutils 2.14.90,
>>msysDTK 1.0.1, tcltk 8.4.1-1, Inno Setup 4.2.7,
(Continue reading)

Eric Delevaux | 7 Sep 2004 19:17
Favicon

define a sequence

Hi everybody
is there a way to define a sequence in maxima by recurrence?
for example

u_n+1 = 3*u_n + 2
with
u_0 = 5

I read help, doc and faq, browse the web but didn't find anything...

Thanks for help.

Eric

PS : sorry for my poor english, I'm french...

Gmane