maxima-discuss — Maxima discussion list

You can subscribe to this list here.

 2014 2015 2016 Jan Feb (232) Mar (323) Apr (383) May (359) Jun (435) Jul (252) Aug (172) Sep (265) Oct (263) Nov (350) Dec (359) Jan (267) Feb (220) Mar (311) Apr (269) May (388) Jun (403) Jul (172) Aug (399) Sep (364) Oct (269) Nov (357) Dec (468) Jan (618) Feb (157) Mar Apr May Jun Jul Aug Sep Oct Nov Dec
S M T W T F S

1
(7)
2
(14)
3
(22)
4
(14)
5
(9)
6
(8)
7
(18)
8
(8)
9
(1)
10
(4)
11
(4)
12
(22)
13
(10)
14
(8)
15
(6)
16
(6)
17
(15)
18
(1)
19
(13)
20
(15)
21
(7)
22
(12)
23
(17)
24
(13)
25
(10)
26
(12)
27
(8)
28
(9)
29
(14)
30
(10)
31
(6)

Showing 12 results of 12

 Re: [Maxima-discuss] DataTypes.texi MathFunctions.texi integral/integer From: Jorge Barros de Abreu - 2014-03-22 23:41:48 ```On Sun, Mar 23, 2014 at 12:39:40AM +0700, Andrey G. Grozin wrote: > These two expressions are synonims. It is very difficult for me. -- Data Estelar 2456739,485637 http://sites.google.com/site/ficmatinf Desejo-lhe Paz, Vida Longa e Prosperidade. São Bem Vindas Mensagens no Formato texto UTF-8 com Acentos. ```
 Re: [Maxima-discuss] DataTypes.texi MathFunctions.texi integral/integer From: Jorge Barros de Abreu - 2014-03-22 23:31:34 ```On Sat, Mar 22, 2014 at 10:35:15PM +0000, Leo Butler wrote: > I think that, in general, it is better to use a slightly longer but > potentially less ambiguous construction: > > Thus, when @var{x} is an integer, > genfact (x, x, 1) = x! and genfact (x, x/2, 2) = x!!. Seems to me that, due to Maxima manual be (also) a mathematics manual, it is more suitable. ?And in the DataTypes.texi situation?? "It is also an @mrefcomma{evflag} @code{float} causes non-integral rational numbers and bigfloat numbers to be converted to floating point." -- Data Estelar 2456739,468299 http://sites.google.com/site/ficmatinf Desejo-lhe Paz, Vida Longa e Prosperidade. São Bem Vindas Mensagens no Formato texto UTF-8 com Acentos. ```
 Re: [Maxima-discuss] DataTypes.texi MathFunctions.texi integral/integer From: Leo Butler - 2014-03-22 22:35:39 ```"Andrey G. Grozin" writes: > On Sat, 22 Mar 2014, Jorge Barros de Abreu wrote: >> Thus, for integral @var{x}, >> genfact (x, x, 1) = x! and genfact (x, x/2, 2) = x!!. >> >> Is it not "integer" rather than "integral"?? > These two expressions are synonims. Not exactly synonyms. "Integral", which is used as adjective in this context, means "whole" here; "integer" is a noun that refers to a number which is whole or integral. I think that, in general, it is better to use a slightly longer but potentially less ambiguous construction: Thus, when @var{x} is an integer, genfact (x, x, 1) = x! and genfact (x, x/2, 2) = x!!. -- Leo Butler leo.butler@... SDF Public Access UNIX System - http://sdf.lonestar.org ```
 Re: [Maxima-discuss] customized takewhile From: Stavros Macrakis - 2014-03-22 21:10:49 Attachments: Message as HTML ```On Fri, Mar 21, 2014 at 11:19 PM, Bill Wood wrote: > ... > > I notice that "%take_accumulate" and "%take_search" look nicely tail > recursive. Is that of any value other than elegance in maxima code? > Does the interpreter do Tail Recursion Optimization? Does the execution > engine for compiled code do TRO? Does it matter with modern high-speed > big-memory computers? Neither the Maxima interpreter nor compiler optimize tail recursion, so the bind stack will overflow with long arguments. Without tail recursion optimization, it's generally not a good idea to use this style of coding for arguments which could be very long lists. Yes, the bind stack could be made bigger, but the main effect of that would simply be that it would take longer for the very common error of infinite recursion to be reported! -s ```
 Re: [Maxima-discuss] DataTypes.texi MathFunctions.texi integral/integer From: Andrey G. Grozin - 2014-03-22 17:39:51 ```On Sat, 22 Mar 2014, Jorge Barros de Abreu wrote: > What is a non-integral rational number ?? > What is a integral rational number ?? The set of integers is a subset of rational numbers. So, a non-integer (or non-integral, both forms are equivalent) rational numbers are those which don't belong to this subset, e.g., 3/4. Ingerer (or integral) rational numbers belong to it, e.g., 3 > Is it not "integer" rather than "integral"?? These two expressions are synonims. Andrey ```
 Re: [Maxima-discuss] prettified PDF/LaTeX session From: Leo Butler - 2014-03-22 15:37:48 ```Tamas Papp writes: > On Mon, Mar 17 2014, Leo Butler wrote: > >>> I have some Maxima code that shows some results analytically for a >>> paper. The paper has proofs that I wrote up manually, but a lot of the >>> non-essential algebra steps are skipped ("relegated to the appendix"), >>> they were done with Maxima. >>> >>> I would like to have the Maxima session (inputs and outputs) available >>> as a PDF appendix. I will of course include the Maxima source, too, but >>> I have to think of readers (especially referees) who don't want to run >>> it (either because they are not computer-savvy, or don't want to invest >>> the time in learning yet another framework). >>> >>> It would be very nice to have outputs formatted with LaTeX, or have the >>> session as LaTeX code which I could compile to a PDF, maybe after some >>> manual editing. >>> >>> The question is: what's the recommended way of doing this? >> >> It sounds to me like you want to use emaxima. > > Hi Leo, > > For the archives, the following solution works perfectly for me: > > 1. When I want to produce an appendix, I send the whole buffer to > imaxima, then use imaxima-latex from Emacs. This creates a nice LaTeX > document which I can then tweak manually. Hi Tamas, I think that I misunderstood your use case. From your description, you have a buffer of Maxima code, not LaTeX, and you want to create a pretty standalone pdf of a Maxima session produced by running this code. The pdf you include as an appendix in a document produced by LaTeX. Is that correct? My question: if you put the same Maxima code in a LaTeX file inside of a maximasession environment and use emaxima to create the output, is the quality inferior to that produced by imaxima? -- Leo Butler leo.butler@... SDF Public Access UNIX System - http://sdf.lonestar.org ```
 Re: [Maxima-discuss] ordering in sums From: Richard Fateman - 2014-03-22 15:30:21 ```On 3/22/2014 1:30 AM, Tamas Papp wrote: > Hi, > > I have three variables qL, lEI and lUI. I know that > 0 <= qL <= min(lUI,lEI) and I would like factored expressions to reveal > their signs at a glance. But maxima always puts qL before lEI and lUI. > > Minimal example: > > --8<---------------cut here---------------start------------->8--- > (%i1) (lEI-qL)*(lUI-qL); > (%o1) (lEI - qL) (lUI - qL) > (%i2) factor(%); > (%o2) (qL - lEI) (qL - lUI) > --8<---------------cut here---------------end--------------->8--- > > Is there a way I can make factor((lEI-qL)*(lUI-qL)) give > (lEI - qL) (lUI - qL) ? I tried orderless and similar but it did not > change anything (maybe I am not using it correctly). You didn't say what you actually tried. This suggests you are not using it correctly. You could also mess with powerdisp. Suggestions. 1. Don't bother. You are human and can adapt more easily to the form as given, conventionally simplified. Maxima has its own idea of simplification which is an attempt to meld many sometimes-conflicting rules. It is risky to try to impose a conflicting notion of simplification because internal programs may depend on the simplifier. For example, would your change make it impossible to collect terms when simplifying a sum? 2. Alternatively, you have decided that you want to control how to simplify this expression, so do simp:off; reverse(%o2); Or whatever. In general if you apply reverse to a product it will reverse the order of terms. I would be surprised if this did what you want in more complicated expressions, but frankly you haven't really specified that. 3. Change the names of the variables so they are alphabetized in the way you wish. For example, use zlEI instead of lEI, allowing Maxima to order the variables, or use orderless(). This may be harmless. I recommend solution 1. ```
 [Maxima-discuss] DataTypes.texi MathFunctions.texi integral/integer From: Jorge Barros de Abreu - 2014-03-22 15:13:27 ```Hi again. :-) In DataTypes.texi: It is also an evflag, float causes non-integral rational numbers and bigfloat numbers to be converted to floating point. What is a non-integral rational number ?? What is a integral rational number ?? Also in MathFunctions.texi: Thus, for integral @var{x}, genfact (x, x, 1) = x! and genfact (x, x/2, 2) = x!!. Is it not "integer" rather than "integral"?? Thanks. -- Data Estelar 2456739,132708 http://sites.google.com/site/ficmatinf Desejo-lhe Paz, Vida Longa e Prosperidade. São Bem Vindas Mensagens no Formato texto UTF-8 com Acentos. ```
 [Maxima-discuss] MathFunctions.texi "complex characteristic?" From: Jorge Barros de Abreu - 2014-03-22 13:00:40 ```Hi In MathFunctions.texi have: The symmetries that cabs understands are: mirror symmetry, conjugate function and complex characteristic. mirror symmetry - OK conjugate function - OK complex characteristic - ????? What is complex characteristic???? Can someone send a link with "complex characteristic" definition ??? Thanks. -- Data Estelar 2456739,037708 http://sites.google.com/site/ficmatinf Desejo-lhe Paz, Vida Longa e Prosperidade. São Bem Vindas Mensagens no Formato texto UTF-8 com Acentos. ```
 Re: [Maxima-discuss] prettified PDF/LaTeX session From: Tamas Papp - 2014-03-22 08:31:42 ```On Mon, Mar 17 2014, Leo Butler wrote: >> I have some Maxima code that shows some results analytically for a >> paper. The paper has proofs that I wrote up manually, but a lot of the >> non-essential algebra steps are skipped ("relegated to the appendix"), >> they were done with Maxima. >> >> I would like to have the Maxima session (inputs and outputs) available >> as a PDF appendix. I will of course include the Maxima source, too, but >> I have to think of readers (especially referees) who don't want to run >> it (either because they are not computer-savvy, or don't want to invest >> the time in learning yet another framework). >> >> It would be very nice to have outputs formatted with LaTeX, or have the >> session as LaTeX code which I could compile to a PDF, maybe after some >> manual editing. >> >> The question is: what's the recommended way of doing this? > > It sounds to me like you want to use emaxima. Hi Leo, For the archives, the following solution works perfectly for me: 1. When I want to produce an appendix, I send the whole buffer to imaxima, then use imaxima-latex from Emacs. This creates a nice LaTeX document which I can then tweak manually. 2. I am currently experimenting with ways to automate the tweaking of the resulting LaTeX output every time I generate the file. Saving the changes as a patch (with diff) and then applying it seems to work. Best, Tamas ```
 [Maxima-discuss] ordering in sums From: Tamas Papp - 2014-03-22 08:30:23 ```Hi, I have three variables qL, lEI and lUI. I know that 0 <= qL <= min(lUI,lEI) and I would like factored expressions to reveal their signs at a glance. But maxima always puts qL before lEI and lUI. Minimal example: --8<---------------cut here---------------start------------->8--- (%i1) (lEI-qL)*(lUI-qL); (%o1) (lEI - qL) (lUI - qL) (%i2) factor(%); (%o2) (qL - lEI) (qL - lUI) --8<---------------cut here---------------end--------------->8--- Is there a way I can make factor((lEI-qL)*(lUI-qL)) give (lEI - qL) (lUI - qL) ? I tried orderless and similar but it did not change anything (maybe I am not using it correctly). Best, Tamas ```
 Re: [Maxima-discuss] customized takewhile From: Bill Wood - 2014-03-22 03:24:46 ```On Fri, 2014-03-21 at 19:33 +0000, Leo Butler wrote: . . . > takewhile(l,p) := %take_search(l,p,1); > %take_search(l,p,n) := if l=[] then l else if p(first(l)) then > %take_accumulate(rest(l),p,[[n,first(l)]],n+1) else %take_search(rest(l),p,n+1); > %take_accumulate(l,p,r,n) := if l#[] and p(first(l)) then > %take_accumulate(rest(l),p,cons([n,first(l)],r),n+1) else r; > > This produces: > > (%i4) takewhile([2,1,2,3,4,5,7,4,1,4,5,2,1,7,8],lambda([x],x>3)); > (%o4) [[8,4],[7,7],[6,5],[5,4]] I knew something about this thread was confusing me, and I finally figured out what. The OP's "takewhile" is not the same as Haskell's. In Haskell "takeWhile" returns the longest prefix all of whose elements satisfy the predicate, so the example in %i4 above would return the empty list since the predicate fails on the first element. Haskell also has the function "dropWhile" which returns the longest tail whose first element fails the predicate. If it weren't for accumulating those pesky indices then, judging by the OP's example (truncated a little) Usage :: takewhile([2,1,2,3,4,5,7,4,1,4,5],lambda([x],x>3)); OUTPUT :: [[4,5],[5,6],[7,7],[4,8]] his "takewhile" would amount to takeWhile(dropWhile([2,1,2,3,4,5,7,4,1,4,5], lambda([x],x<4)), lambda([x],x>3)) using Haskell's takeWhile and dropWhile with maxima syntax. Leo Butler's "%take_accumulate" seems to be a version of takeWhile that manages the indices as well, and "%take_search" is a similar variant of dropWhile, so his solution is like to the one above with the call to "%take_accumulate" wired into the body of "take_search". I notice that "%take_accumulate" and "%take_search" look nicely tail recursive. Is that of any value other than elegance in maxima code? Does the interpreter do Tail Recursion Optimization? Does the execution engine for compiled code do TRO? Does it matter with modern high-speed big-memory computers? -- Bill Wood ```

Showing 12 results of 12