## maxima-discuss — Maxima discussion list

You can subscribe to this list here.

 2014 2015 2016 2017 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 (592) Mar (625) Apr (516) May (375) Jun (155) Jul (346) Aug (262) Sep (346) Oct (291) Nov (333) Dec (335) Jan (436) Feb (460) Mar (370) Apr (189) May (252) Jun (272) Jul (286) Aug (293) Sep (303) Oct (331) Nov (280) Dec

Showing results of 15535

<< < 1 2 3 4 .. 622 > >> (Page 2 of 622)
 Re: [Maxima-discuss] parametric plot parameter with plot2d and wxplot2d From: Edwin Woollett - 2017-11-21 19:28:49 Attachments: Message as HTML ```Thanks for fixing this bug. I will look forward to the next version of Maxima before attempting to revise ch 2 and ch 3 of maxima by example. Back in June 2016 you said you were aware of a different plot2d bug revealed by the command plot2d([u^3,[parametric,cos(t),sin(t),[t,-%pi,%pi]]],['u,-1.1,1.1],['x,-1.3,1.3])\$ in xmaxima, and wxplot2d([u^3,[parametric,cos(t),sin(t),[t,-%pi,%pi]]],['u,-1.1,1.1],['x,-1.3,1.3])\$ in wxmaxima. I still get syntax error responses in ver. 5.41.0 with these commands, which you agreed earlier were in conformance with the desired plot2d syntax. --------------------------------------------- Maxima 5.41.0 http://maxima.sourceforge.net using Lisp SBCL 1.3.18 (%i1) plot2d([u^3,[parametric,cos(t),sin(t),[t,-%pi,%pi]]],['u,-1.1,1.1],['x,-1.3,1.3])\$ plot-options-parser: unknown plot option: [u,-1.1,1.1] -- an error. To debug this try: debugmode(true); ----------------------------------- ------------------------------------ wxMaxima 17.10.0 (C) 2004 - 2017 Andrej Vodopivec (%i1) display2d:true; (display2d) true (%i2) wxplot2d([u^3,[parametric,cos(t),sin(t),[t,-%pi,%pi]]],['u,-1.1,1.1],['x,-1.3,1.3])\$ plot-options-parser: unknown plot option: [u,-1.1,1.1] -- an error. To debug this try: debugmode(true); ============================================ on June 31, 2016, I wrote: --------------------------------------------------------------------------------- I am revising Maxima by Example, Ch. 2. The following produced a desired plot in ver. 5.31.2 gcl, but produces an error in ver 5.36.1 SBCL. --------------------------------------------------------- Maxima 5.36.1 using Lisp SBCL 1.2.7 with Windows 7 (%i1) plot2d([u^3,[parametric,cos(t),sin(t),[t,-%pi,%pi]]],['u,-1.1,1.1],['x,-1.3,1.3])\$ plot-options-parser: unknown plot option: [u,-1.1,1.1] -- an error. To debug this try: debugmode(true); ------------------------------------------------------------------ My 2014 understanding of plot2d (used in XMaxima) was that a separate expression parameter, like u above, governed the drawing of the expression, and that we could separately control the “canvas width” using the final [‘x, xmin, xmax], and I had many examples using this method of control in Ch. 2. So what is the situation now, and why? Ted ------------------------------------------------------------------------------------------ and on June 1, 2016, you responded: --------------------------------------------------------------------------- Hi Edwin, this is a bug. Your understanding of the way polt2d should work is correct. Thanks for pointing this out. Regards, Jaime ================================= So what is the present status of this second bug? Ted =========================================== From: Jaime Villate Sent: Tuesday, November 21, 2017 1:38 AM To: Edwin Woollett ; Tomio Arisaka Cc: maxima-discuss Subject: Re: [Maxima-discuss] parametric plot parameter with plot2d and wxplot2d Hi, this was a very old bug (#2835) that I have just fixed (see: https://sourceforge.net/p/maxima/code/ci/5b0169ac5ab1dd9ab763ffdeb15e8d754eb10835/). plot2d([parametric, cos(th), sin(th), [th,0,2*%pi]], [x, -sqrt(2), sqrt(2)]); now works as expected. Best regards, Jaime On 20-11-2017 21:26, Edwin Woollett wrote: On 11/19/2017 Tomio Arisaka wrote: ------------------------------------- It seems that the function PLOT-OPTIONS-PARSER cannot parse the parameter th. The PLOT-OPTIONS-PARSER is invoked by the function DRAW2D-PARAMETRIC-ADAPTIVE in the file "src/plot.lisp". I think the parameter t is a special symbol for parametric plots. So how about the next expression? plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], [x, -sqrt(2), sqrt(2)]), th:'t\$ ---------------------------------------------------------------------- Yes, adding the extra “ th : ‘t “ to the command allows the parametric plot to succeed in versions of maxima later than ver 5.31.2. ```
 Re: [Maxima-discuss] a^b to exp(b*log(a)) From: Stavros Macrakis (Σταῦρος Μακράκης) - 2017-11-21 16:40:40 Attachments: Message as HTML ```How about subst(myexp,"^",expr)? (with opsubst:true, the default) Then define myexp as a function or macro in your target environment. Or subst(lambda([a,b],exp(b*log(a))),"^",expr)? But in that case, integer powers still simplify back to the x^2 form. On Tue, Nov 21, 2017 at 8:55 AM, Gunter Königsmann wrote: > Dear all, > > Sorry for having to ask a very basic question: > > Some programming language don't provide an a^b command, but only exp(x) > and log(x). > > Does maxima provide a function that converts expressions between these > two forms? I was convinced that it is exponentialize. But this doesn't > seem to be the case. > > Thanks a lot, > > and kind regards, > > Gunter. > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ```
 Re: [Maxima-discuss] a^b to exp(b*log(a)) From: Jaime Villate - 2017-11-21 14:36:04 ```On 21-11-2017 13:55, Gunter Königsmann wrote: > Some programming language don't provide an a^b command, but only exp(x) > and log(x). > > Does maxima provide a function that converts expressions between these > two forms? Is  f(a,b):=exp(b*log(a)) enough? Jaime ```
 [Maxima-discuss] Utility to convert integrate noun forms to quadpack numerical integration functions From: Soegtrop, Michael - 2017-11-21 14:01:36 Attachments: Message as HTML ```Dear Maxima Users, does someone happen to have an utility to convert integrate noun forms to quadpack calls? I imagine something which detects sin/cos/exp(%i*...) factors, if required does a substitution to linearize the argument, splits exp in real and imag part and converts this to calls of e.g. quad_qawo. Best regards, Michael Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, http://www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928 ```
 Re: [Maxima-discuss] a^b to exp(b*log(a)) From: David Scherfgen - 2017-11-21 14:01:11 Attachments: Message as HTML ```Hi, exponentialize converts sin, cos etc. to their exponential representations. As far as I know, there is no built-in function for what you want, but creating one yourself should be easy enough. Best regards David Sent from my mobile phone. / Von meinem Handy aus gesendet. Am 21.11.2017 14:56 schrieb "Gunter Königsmann" : Dear all, Sorry for having to ask a very basic question: Some programming language don't provide an a^b command, but only exp(x) and log(x). Does maxima provide a function that converts expressions between these two forms? I was convinced that it is exponentialize. But this doesn't seem to be the case. Thanks a lot, and kind regards, Gunter. ------------------------------------------------------------ ------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Maxima-discuss mailing list Maxima-discuss@... https://lists.sourceforge.net/lists/listinfo/maxima-discuss ```
 [Maxima-discuss] a^b to exp(b*log(a)) From: Gunter Königsmann - 2017-11-21 13:56:07 ```Dear all, Sorry for having to ask a very basic question: Some programming language don't provide an a^b command, but only exp(x) and log(x). Does maxima provide a function that converts expressions between these two forms? I was convinced that it is exponentialize. But this doesn't seem to be the case. Thanks a lot, and kind regards, Gunter. ```
 Re: [Maxima-discuss] parametric plot parameter with plot2d and wxplot2d From: Jaime Villate - 2017-11-21 09:38:33 Attachments: Message as HTML ```Hi, this was a very old bug (#2835) that I have just fixed (see: https://sourceforge.net/p/maxima/code/ci/5b0169ac5ab1dd9ab763ffdeb15e8d754eb10835/). plot2d([parametric, cos(th), sin(th), [th,0,2*%pi]], [x, -sqrt(2), sqrt(2)]); now works as expected. Best regards, Jaime On 20-11-2017 21:26, Edwin Woollett wrote: > On 11/19/2017 Tomio Arisaka wrote: > ------------------------------------- >        It seems that the function PLOT-OPTIONS-PARSER cannot parse the > parameter th. >       The PLOT-OPTIONS-PARSER is invoked by the function > DRAW2D-PARAMETRIC-ADAPTIVE in the file "src/plot.lisp". >        I think the parameter t is a special symbol for parametric plots. > >           So how about the next expression? > >           plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]],  [x, > -sqrt(2), sqrt(2)]), th:'t\$ > ---------------------------------------------------------------------- > Yes,  adding the extra  “ th : ‘t “ to the command allows the > parametric plot > to succeed in versions of maxima later than ver 5.31.2. ```
 [Maxima-discuss] parametric plot parameter with plot2d and wxplot2d From: Edwin Woollett - 2017-11-20 21:26:55 Attachments: Message as HTML ```On 11/19/2017 Tomio Arisaka wrote: ------------------------------------- It seems that the function PLOT-OPTIONS-PARSER cannot parse the parameter th. The PLOT-OPTIONS-PARSER is invoked by the function DRAW2D-PARAMETRIC-ADAPTIVE in the file "src/plot.lisp". I think the parameter t is a special symbol for parametric plots. So how about the next expression? plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], [x, -sqrt(2), sqrt(2)]), th:'t\$ ---------------------------------------------------------------------- Yes, adding the extra “ th : ‘t “ to the command allows the parametric plot to succeed in versions of maxima later than ver 5.31.2. The only working maxima versions I have from that era are 5.31.2 and 5.35.1 (windows) and the expected behavior CHANGES between these two versions. In my original example, I had an extra superfluous bracket (an artifact of my simplifying a more complicated Maxima Manual example). The plot2d commands plot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ in xmaxima and wxplot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ in wxmaxima give the expected plot in Maxima ver 5.31.2 (windows), and FAIL to give the expected plot in Maxima ver 5.35.1 (windows), as shown here: ======================================================= good 5.31.2 xmaxima plot2d and wxmaxima wxplot2d with either t or th as parameter: Maxima 5.31.2 http://maxima.sourceforge.net using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL) (%i1) plot2d([parametric, cos(t), sin(t), [t,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ --> good plot (%i2) plot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ --> good plot ----------------------------------- -------------------------------- wxMaxima 13.04.2 (C) 2004 - 2013 Andrej Vodopivec (%i1) display2d:true; (%o1) true (%i2) wxplot2d([parametric, cos(t), sin(t), [t,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ --> good inline plot (%i3) wxplot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ --> good inline plot (%i4) wxplot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)]), th:t\$ --> good inline plot =========================================================================== BUT IN ver 5.35.1 the th parameter is acceptable in neither xmaxima nor wxmaxima: ------------------------------------------- Maxima 5.35.1 http://maxima.sourceforge.net using Lisp SBCL 1.2.1 (%i1) plot2d([parametric, cos(t), sin(t), [t,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ --> good plot (%i2) plot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ plot-options-parser: unknown plot option: [th,0,2*%pi] -- an error. To debug this try: debugmode(true); ---> no plot (%i4) plot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)]),th:t\$ --> good plot ----------------------------------- ------------------------------------ wxMaxima 14.12.1 (C) 2004 - 2014 Andrej Vodopivec (%i1) display2d:true; (%o1) true (%i2) wxplot2d([parametric, cos(t), sin(t), [t,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ --> good inline plot (%i3) wxplot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)])\$ plot-options-parser: unknown plot option: [th,0,2*%pi] -- an error. To debug this try: debugmode(true); ---> no plot (%i4) wxplot2d([parametric, cos(th), sin(th), [th,0,2*%pi]],[x, -sqrt(2), sqrt(2)]), th:t\$ --> good inline plot ------------------------------------------------- So WHAT CHANGED between 5.31.2 and 5.35.1? Ted Woollett ======================================================== On 2017/11/19, Edwin Woollett wrote: > The maxima manual describes a plot option t used as [t,min,max] as: > ----------------------------- > Plot option: t [t, min, max] > Default range for parametric plots. > -------------------------------------- > how do you change the default parameter name? > ie., how can one use a different parameter name? > > I get an error with both plot2d and wxplot2d if I use a different > name for the parameter: > ------------------------------------------- > Maxima 5.41.0 http://maxima.sourceforge.net > using Lisp SBCL 1.3.18 > Distributed under the GNU Public License. See the file COPYING. > Dedicated to the memory of William Schelter. > The function bug_report() provides bug reporting information. > maxima_userdir = c:/k2 > display2d = false > > following gives good plot > (%i1) plot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], > [x, -sqrt(2), sqrt(2)])\$ > following chokes > (%i2) plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], > [x, -sqrt(2), sqrt(2)])\$ > plot-options-parser: unknown plot option: [th,0,2*%pi] > -- an error. To debug this try: debugmode(true); > ------------------------------------------------------------ > wxMaxima > 17.10.0 > (C) 2004 - 2017 Andrej Vodopivec > > (%i1) wxplot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], > [x, -sqrt(2), sqrt(2)])\$ > (%t1) wxxmltag("c:/k2/maxout_11128_1.png","img") > (%i2) display2d:true\$ > following shows plot in separate gnuplot window > (%i3) plot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], > [x, -sqrt(2), sqrt(2)])\$ > following gives error: > (%i4) plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], > [x, -sqrt(2), sqrt(2)])\$ > plot-options-parser: unknown plot option: [th,0,2*%pi] > -- an error. To debug this try: debugmode(true); > --------------------------------------------------------------------- > > Ted Woollett > ```
 Re: [Maxima-discuss] maxima-jupyter on windows - partial success From: Robert Dodier - 2017-11-20 19:29:37 ```David, thanks for your interest in maxima-jupyter, I salute your dedication. Last time I tried installing it (on an Ubuntu-derived system), I ran into a lot of trouble with pzmq. I seem to recall I had to patch the C library or something crazy like that ... The whole process took several hours but I did get the whole thing working. Most of the trouble was in pzmq and maybe another library. It occurs to me that maybe dumping the Lisp image is not really necessary -- now that I think about it, maybe loading the required files at start-up time is enough. But maybe there was some other motivation that I don't remember now. About plotting, the method which I figured out is to define a simplification for 'plot2d(...) noun expressions which returns an svg image. Did you write 'plot2d(...) instead of plot2d(...) ? Although I seem to recall plot2d(...) should also work, it just launches a separate Gnuplot viewer to display the plot. I don't know what's going on with questions from Maxima. best, Robert Dodier ```
 [Maxima-discuss] maxima-jupyter on windows - partial success From: David Billinghurst - 2017-11-20 10:29:54 ```I have been looking at Robert Dodier's maxima-jupyter on 64-bit Windows 10 - https://github.com/robert-dodier/maxima-jupyter I can report partial success but there are still issues and it isn't usable yet.  Here is a brief write-up.  I am sure to have some of the details wrong, as it was one step forwards and two steps back for a while, but here goes.  Perhaps someone with a different skill-set can push this forward The windows installer has clisp and sbcl images. Only sbcl supports threading, so that is what is used. 1. Install Anaconda3 from continuum.io.  No notes as this was done previously 2. Download windows installer maxima-clisp-sbcl-5.41.0a-win64.exe from sourceforge 3. Install maxima in default c:/maxima-5.41.0a 4. Set default lisp to sbcl 5. Install MSYS2 from https://sourceforge.net/projects/msys2/ for gcc, g++ and zmq libraries 1. download msys2-x86_64-20161025.exe installer 2.  install into default c:/msys64 3. Update MSYS2.  Open MSYS2 shell, run "pacman -Syu", close MSYS2 shell and repeat until finished 4. Open MSYS2 shell 5. Install gcc: "pacman -S mingw-w64-x86_64-toolchain" 6. Install zmq: "pacman -S mingw-w64-x86_64-zeromq" 6. Edit c:/maxima-5.41.0a/bin/maxima.bat. 1. Set "SBCL_HOME=%prefix%/bin"           # mine was set elsewhere 2. Add c:/msys64/mingw64/bin to path    # for gcc and dlls 7. Install quicklisp 1. Download quicklisp.lisp from http://www.quicklisp.org 2. Run maxima 3. :lisp (load "c:/path/to/quicklisp.lisp") 4. :lisp (quicklisp-quickstart :install) 8. Download maxima-jupytercode 9. Install lisp requirements then follow the maxima-jupyter installation instructions 1. run maxima 2. to_lisp(); 3. (load "C:/Users/username/quicklisp/setup.lisp") 4. (ql:quickload "cffi") 5. (ql:quickload "pzmq") 6. (to-maxima) 7. parse_string("1"); 8. :lisp (load "c:/path/to/load-maxima-jupyter.lisp") 9. :lisp (sb-ext:save-lisp-and-die "maxima-jupyter.core" :toplevel 'cl-jupyter:kernel-start) 10. Move 100MB maxima-jupyter.core in maxima root directory to directory containing maxima.core 11. Create batch file to run sbcl core 1. copy maxima.bat to maxima-jupyter.bat, retaining mods above 2. change sbcl core to new core name 3. remove sbcl command line options, but leave %* 12. Follow maxima-jupyter installation instructions 1. In anaconda3 python shell, "python ./install-maxima-jupyter.py --maxima-jupyter-exec=path/to/maxima-jupyter.bat 2. Install CodeMirror and Pygments files in anaconda3 tree Results Running jupyter notebook --Session.key="b''" in a directory containing the files MaximaJupyterExample.ipynb generates some results. At least two things don't work: * Questions from Maxima to the user don't open an input prompt. Get WARNING:  [Shell] message type 'comm_info_request' not (yet ?) supported, skipping... * No graphics. Note that sbcl/quicklisp dumps files in c:/Users/username/quicklisp and c:/Users/username/Appdata/Local/common-lisp ```
 [Maxima-discuss] simplification of antiderivatives, was: Differentiating the antiderivative of sin(x^3) gives -sin(x^3)/2 From: Robert Dodier - 2017-11-20 07:22:45 ```On 2017-11-19, Robert Dodier wrote: > I was looking at it too. It appears to me that the antiderivative > returned by HYPERTRIGINT1 is correct after modifying %ITOPOT to return > %i*sin(foo*%pi/2) + cos(foo*%pi/2) for %i^foo when foo is a rational > non-integer, which suppresses %i^(1/3) --> (-1)^(1/6) which seems to > cause trouble. However, TRIGIN1 which calls HYPERTRIGINT1, tries to do > some rearrangement on the antiderivative and it still gets messed up > somehow. At this point I think the problem is in general simplification > and not in the integration code per se. Here's the antiderivative returned by HYPERTRIGINT1 after modifying %ITOPOT as shown below. (-((sqrt(3)/2-%i/2)*%i*gamma_incomplete(1/3,%i*x^3))/6) -((sqrt(3)/2-%i/2)*%i*gamma_incomplete(1/3,-%i*x^3))/6 This appears to be correct: ratsimp (demoivre (diff (%, x))); => sin(x^3) Now the problem is that HYPERTRIGINT1's called, TRIGIN1, tries to simplify the result in a couple of ways. TRIGIN1 calls 'expand' and SRATSIMP -- that seems OK. But TRIGIN1 also has this: (let ((rischp var) (rp-polylogp t) \$logarc \$exponentialize result) (setq result (sratsimp (if (and (freeof '\$%i *exp) (freeof '\$li yyy)) (\$realpart yyy) (\$rectform yyy)))) i.e. take the real part of the result if the integrand doesn't contain %i (or li). I don't know if this is a good idea. realpart and friends seem to have some trouble with the antiderivative -- imagpart thinks it has a nonzero imaginary part, which can't be good news for realpart. Also in general, this heuristic seems incorrect -- surely there are integrals with nonzero imaginary part which don't have %i in the integrand. Changing TRIGIN1 so that it always calls rectform or just skips that and only calls SRATSIMP gives problematic results. On the one hand, skipping realpart and rectform enable TRIGIN1 to give the correct result for integrate(sin(x^3), x) by just ratsimp'ing what HYPERTRIGINT1 returns (shown above). But that causes some test suite failures that aren't obviously the same results in a different form (although it seems like they should be). I'll have to look at that more carefully. For what it's worth, Robert Dodier PS. Here's the modified versions of %ITOPOT and HYPERTRIGINT1. (defun %itopot (pot) (if (fixnump pot) (let ((i (boole boole-and pot 3))) (cond ((= i 0) 1) ((= i 1) '\$%i) ((= i 2) -1) (t (list '(mtimes simp) -1 '\$%i)))) (if (and (\$ratnump pot) (not (\$integerp pot))) ;; HERE'S THE NEW SPECIAL CASE !! (add (take '(%cos) (mul2 (div '\$%pi 2) pot)) (mul2 '\$%i (take '(%sin) (mul2 (div '\$%pi 2) pot)))) (power -1 (mul2 pot '((rat simp) 1 2)))))) (defun trigin1 (*exp var) (let ((yyy (hypertrigint1 *exp var nil))) (setq yyy (div (\$expand (\$num yyy)) (\$expand (\$denom yyy)))) (let ((rischp var) \$logarc \$exponentialize result) ;; JUST CALL SRATSIMP AND SKIP RECTFORM OR REALPART HERE !! (setq result (sratsimp yyy)) ;; The result can contain solveable integrals. Look for this case. (if (isinop result '%integrate) ;; Found an integral. Evaluate the result again. ;; Set the flag *in-risch-p* to make sure that we do not call ;; rischint again from the integrator. This avoids endless loops. (let ((*in-risch-p* t)) (meval (list '(\$ev) result '\$nouns))) result)))) ```
 Re: [Maxima-discuss] non linear differential equation , reply . From: nijso beishuizen - 2017-11-19 18:43:31 Attachments: Message as HTML ```What was the particular methodology? My routines give the following (some editing to make the output readable): ode:'diff(y,x,2)^2+2*'diff(y,x,2)*'diff(y,x,1)+2*'diff(y,x,1)^4-10=0; /* this is the method of cheb-terrab and Roche, integrating factors for second order ode's, it returns the reduced first order ode*/ ode2_lie(ode,y,x); warning, multiple solutions! solving only the first type: missing y 'diff(z,x,1) = (-sqrt((-2*z^4)+z^2+10))-z\$ and for this ode: /* this is the method of cheb-terrab and Roche, Symmetries and first order ode patterns */ ode1Solve(ode,z,x,'returnExplicit=true); type y' = F(y) [xi,eta]=[ 1 , 0 ] generator X= [1, 0] is a symmetry of the ode integrating factor = -1/(sqrt(5-2*z^2)*sqrt(z^2+2)+z)\$ ['integrate(1/(sqrt(5-2*z^2)*sqrt(z^2+2)-z),z) = x+%c]\$ This is less elegant than your solution, which takes into account both solutions. It would be nice to have a general method that takes into account both solutions, instead of splitting into two separate ode's and solving independently. Best regards, Nijso On Sun, 2017-11-19 at 21:02 +1300, Edward Montague wrote: Awhile ago there was a question about a non linear differential equation. Defined as : expr : 'diff(y,x,2)^2 + 2*'diff(y,x,2)*'diff(y,x,1)+ 2*diff(y,x,1)^4 - 10 After developing a particular methodology , I was able to find what appears to be an expression for y that satisfies this Non linear D.E . In this instance y is equivalent to eq3 . a:-1\$ b:5^(1/4)\$ eq3:log(a*x) + log(x)/a + b*x; expr : 'diff(eq3,x,2)^2 + 2*'diff(eq3,x,2)*'diff(eq3,x,1)+ 2*diff(eq3,x,1)^4 - 10\$ ev(expr,nouns); ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Maxima-discuss mailing list Maxima-discuss@... https://lists.sourceforge.net/lists/listinfo/maxima-discuss ```
 Re: [Maxima-discuss]   parametric plot parameter with plot2d and wxplot2d From: 有坂富雄 - 2017-11-19 14:37:02 Attachments: text/plain ```It seems that the function PLOT-OPTIONS-PARSER cannot parse the parameter th. The PLOT-OPTIONS-PARSER is invoked by the function DRAW2D-PARAMETRIC-ADAPTIVE in the file "src/plot.lisp". I think the parameter t is a special symbol for parametric plots. So how about the next expression?   plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]],          [x, -sqrt(2), sqrt(2)]), th:'t\$ Thanks, Tomio Arisaka On 2017/11/19, Edwin Woollett wrote: > The maxima manual describes a plot option t used as [t,min,max] as: > ----------------------------- > Plot option: t [t, min, max] >     Default range for parametric plots. > -------------------------------------- > how do you change the default parameter name?   > ie., how can one use a different parameter name? >  > I get an error with both plot2d and wxplot2d if I use a different > name for the parameter: > ------------------------------------------- > Maxima 5.41.0 http://maxima.sourceforge.net > using Lisp SBCL 1.3.18 > Distributed under the GNU Public License. See the file COPYING. > Dedicated to the memory of William Schelter. > The function bug_report() provides bug reporting information. > maxima_userdir =  c:/k2 > display2d =  false >  > following gives good plot > (%i1) plot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], >          [x, -sqrt(2), sqrt(2)])\$ > following chokes > (%i2) plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], >          [x, -sqrt(2), sqrt(2)])\$ > plot-options-parser: unknown plot option: [th,0,2*%pi] > -- an error. To debug this try: debugmode(true); > ------------------------------------------------------------ > wxMaxima > 17.10.0 > (C) 2004 - 2017 Andrej Vodopivec >  > (%i1)    wxplot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], >              [x, -sqrt(2), sqrt(2)])\$ > (%t1) wxxmltag("c:/k2/maxout_11128_1.png","img") > (%i2)    display2d:true\$ > following shows plot in separate gnuplot window   > (%i3)    plot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], >              [x, -sqrt(2), sqrt(2)])\$ > following gives error:            > (%i4)    plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], >              [x, -sqrt(2), sqrt(2)])\$ > plot-options-parser: unknown plot option: [th,0,2*%pi] > -- an error. To debug this try: debugmode(true); > --------------------------------------------------------------------- >  > Ted Woollett >  ```
 Re: [Maxima-discuss] Test bench failures with the Ubuntu Nightly Build From: Gunter Königsmann - 2017-11-19 09:48:50 ```> It turns out the problem is that rtest16.mac contained Unicode no-break > spaces, which are treated as white space only if *FEATURES* contains > something to indicate Unicode support, which GCL lacks. I replaced them > with ordinary spaces and now Maxima + GCL reports no errors for rtest16. Cool! Thanks a lot! Seems that at least this time the testbench found something we can affect using our code. The current nightly build no more produced a testbench failure. Kind regards, Gunter. ```
 [Maxima-discuss] non linear differential equation , reply . From: Edward Montague - 2017-11-19 08:02:50 Attachments: Message as HTML ``` Awhile ago there was a question about a non linear differential equation. Defined as : expr : 'diff(y,x,2)^2 + 2*'diff(y,x,2)*'diff(y,x,1)+ 2*diff(y,x,1)^4 - 10 After developing a particular methodology , I was able to find what appears to be an expression for y that satisfies this Non linear D.E . In this instance y is equivalent to eq3 . a:-1\$ b:5^(1/4)\$ eq3:log(a*x) + log(x)/a + b*x; expr : 'diff(eq3,x,2)^2 + 2*'diff(eq3,x,2)*'diff(eq3,x,1)+ 2*diff(eq3,x,1)^4 - 10\$ ev(expr,nouns); ```
 Re: [Maxima-discuss] Differentiating the antiderivative of sin(x^3) gives -sin(x^3)/2 From: Robert Dodier - 2017-11-19 05:49:13 ```On 2017-11-18, David Scherfgen via Maxima-discuss wrote: > I investigated further. The bug might be very difficult to fix, because it > ultimately boils down to (x^3)^(1/3) being simplified to x when domain is > real. I was looking at it too. It appears to me that the antiderivative returned by HYPERTRIGINT1 is correct after modifying %ITOPOT to return %i*sin(foo*%pi/2) + cos(foo*%pi/2) for %i^foo when foo is a rational non-integer, which suppresses %i^(1/3) --> (-1)^(1/6) which seems to cause trouble. However, TRIGIN1 which calls HYPERTRIGINT1, tries to do some rearrangement on the antiderivative and it still gets messed up somehow. At this point I think the problem is in general simplification and not in the integration code per se. I'll try to fish out the antiderivative and maybe we can work on simplifying it by hand to get some ideas. I speculate domain:complex helps because it also suppresses (-1)^(1/6). My previous theory, that there was a constant factor that got lost, is incorrect, I believe now. best Robert Dodier ```
 Re: [Maxima-discuss] Value of (-1)^(1/3) depends on domain From: Richard Fateman - 2017-11-19 01:26:50 Attachments: Message as HTML ```I suspect that setting of domains affects programs in a patchwork of potentially inconsistent ways. First, I thought it somehow referred to the domain of variables,  sort of like   declare(all_variables, real). But then it seemed to refer to the preferred choice of branches of functions, if one of them is predictably real (which seems to be the case documented). But since it lacks referential transparency, it is problematical. What this means is   f(a)  should simplify the same as subst(a,x,f(x)) let domain:real; f(x):=sqrt(x^2); f(%i); subst(%i,x,f(x)); one gives 1 ,  the other %i. If one recognizes that there are 3 cube roots of -1, and in some sense -1 is the least useful of them, maybe there is a better way of talking about choosing the one that is -1. Try (-1)^(1/4) with domain:real.  Maybe that should be an error, though that seems like a gratuitous poke in the eye. It comes back to representing multiple-valued objects appropriately.  Unsimplified?  Sets?  (finite or possibly infinite, like acos(0))  and how to compute with them. RJF On 11/18/2017 3:00 PM, Stavros Macrakis (Σταῦρος Μακράκης) wrote: > Yes, we should be more explicit. > > Maybe something like > > When domain is set to complex, fractional powers of non-positive > numbers are left unsimplified rather than assuming a particular value. > For example, sqrt (x^2) simplifies to sqrt (x^2) instead of abs(x); > (-8)^(1/3) simplifies to 2*(-1)^(1/3). > > In experimenting with this, I found some interesting behavior. > > Define: > > cc(i,e):=[block([domain:real],i^e),block([domain:complex],i^e)]; > > > > Then cc(%i,1/3) => [(-1)^(1/6), (-1)^(1/6)] and cc(-8,1/3) => [ -2 , > 2*(-1)^(1/3) ] as expected. That is, the positive factor is factored out. > > But cc(8*%i) =>  [ 2*(-1)^(1/6) , (8*%i)^(1/3) ] > > Shouldn't the domain:complex case also return 2*(-1)^(1/6)? > > > On Sat, Nov 18, 2017 at 4:48 PM, David Scherfgen via Maxima-discuss > > wrote: > > Dear all, > > with domain : real, > (-1)^(1/3) gets simplified to -1. > > With domain : complex, > (-1)^(1/3) doesn't get simplified, but with rectform we can get > (sqrt(3)*%i)/2+1/2. > > Is this expected? > The documentation says about "domain" only this: > > "When domain is set to complex, sqrt (x^2) will remain sqrt (x^2) > instead of returning abs(x)." > > Best regards, > David Scherfgen > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ; > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss ```
 Re: [Maxima-discuss] Value of (-1)^(1/3) depends on domain From: Stavros Macrakis (Σταῦρος Μακράκης) - 2017-11-18 23:00:56 Attachments: Message as HTML ```Yes, we should be more explicit. Maybe something like When domain is set to complex, fractional powers of non-positive numbers are left unsimplified rather than assuming a particular value. For example, sqrt (x^2) simplifies to sqrt (x^2) instead of abs(x); (-8)^(1/3) simplifies to 2*(-1)^(1/3). In experimenting with this, I found some interesting behavior. Define: cc(i,e):=[block([domain:real],i^e),block([domain:complex],i^e)]; Then cc(%i,1/3) => [(-1)^(1/6), (-1)^(1/6)] and cc(-8,1/3) => [ -2 , 2*(-1)^(1/3) ] as expected. That is, the positive factor is factored out. But cc(8*%i) => [ 2*(-1)^(1/6) , (8*%i)^(1/3) ] Shouldn't the domain:complex case also return 2*(-1)^(1/6)? On Sat, Nov 18, 2017 at 4:48 PM, David Scherfgen via Maxima-discuss < maxima-discuss@...> wrote: > Dear all, > > with domain : real, > (-1)^(1/3) gets simplified to -1. > > With domain : complex, > (-1)^(1/3) doesn't get simplified, but with rectform we can get > (sqrt(3)*%i)/2+1/2. > > Is this expected? > The documentation says about "domain" only this: > > "When domain is set to complex, sqrt (x^2) will remain sqrt (x^2) instead > of returning abs(x)." > > Best regards, > David Scherfgen > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > ```
 [Maxima-discuss] Value of (-1)^(1/3) depends on domain From: David Scherfgen - 2017-11-18 21:48:55 Attachments: Message as HTML ```Dear all, with domain : real, (-1)^(1/3) gets simplified to -1. With domain : complex, (-1)^(1/3) doesn't get simplified, but with rectform we can get (sqrt(3)*%i)/2+1/2. Is this expected? The documentation says about "domain" only this: "When domain is set to complex, sqrt (x^2) will remain sqrt (x^2) instead of returning abs(x)." Best regards, David Scherfgen ```
 Re: [Maxima-discuss] Differentiating the antiderivative of sin(x^3) gives -sin(x^3)/2 From: David Scherfgen - 2017-11-18 21:35:13 Attachments: Message as HTML ```Yes, I'll close the new ticket. I investigated further. The bug might be very difficult to fix, because it ultimately boils down to (x^3)^(1/3) being simplified to x when domain is real. David Scherfgen Am 18.11.2017 22:23 schrieb "Robert Dodier" : > On 2017-11-17, David Scherfgen via Maxima-discuss < > maxima-discuss@...> wrote: > > > Oops, I already reported that bug a year ago. Sorry for that. > > Maybe you can mark the different reports as duplicates. I think it could > be helpful to copy any new information to the previous report and close > the new one, something like that. > > It appears to me that sin(x^3) got converted into an equivalent > exp(%i...) expression and the -1/2 went missing. The relevant functions > are, I believe, SININT, INTEGRATOR, INTEGRATE-EXP-SPECIAL, RISCHINT, > TRIGIN1, and HYPERTRIGINT1. Enabling *DEBUG-INTEGRATE* prints a few > helpful messages. > > best > > Robert Dodier > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ```
 Re: [Maxima-discuss] Differentiating the antiderivative of sin(x^3) gives -sin(x^3)/2 From: Robert Dodier - 2017-11-18 21:22:19 ```On 2017-11-17, David Scherfgen via Maxima-discuss wrote: > Oops, I already reported that bug a year ago. Sorry for that. Maybe you can mark the different reports as duplicates. I think it could be helpful to copy any new information to the previous report and close the new one, something like that. It appears to me that sin(x^3) got converted into an equivalent exp(%i...) expression and the -1/2 went missing. The relevant functions are, I believe, SININT, INTEGRATOR, INTEGRATE-EXP-SPECIAL, RISCHINT, TRIGIN1, and HYPERTRIGINT1. Enabling *DEBUG-INTEGRATE* prints a few helpful messages. best Robert Dodier ```
 [Maxima-discuss] parametric plot parameter with plot2d and wxplot2d From: Edwin Woollett - 2017-11-18 21:04:04 Attachments: Message as HTML ```The maxima manual describes a plot option t used as [t,min,max] as: ----------------------------- Plot option: t [t, min, max] Default range for parametric plots. -------------------------------------- how do you change the default parameter name? ie., how can one use a different parameter name? I get an error with both plot2d and wxplot2d if I use a different name for the parameter: ------------------------------------------- Maxima 5.41.0 http://maxima.sourceforge.net using Lisp SBCL 1.3.18 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. maxima_userdir = c:/k2 display2d = false following gives good plot (%i1) plot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], [x, -sqrt(2), sqrt(2)])\$ following chokes (%i2) plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], [x, -sqrt(2), sqrt(2)])\$ plot-options-parser: unknown plot option: [th,0,2*%pi] -- an error. To debug this try: debugmode(true); ------------------------------------------------------------ wxMaxima 17.10.0 (C) 2004 - 2017 Andrej Vodopivec (%i1) wxplot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], [x, -sqrt(2), sqrt(2)])\$ (%t1) wxxmltag("c:/k2/maxout_11128_1.png","img") (%i2) display2d:true\$ following shows plot in separate gnuplot window (%i3) plot2d([[parametric, cos(t), sin(t), [t,0,2*%pi]]], [x, -sqrt(2), sqrt(2)])\$ following gives error: (%i4) plot2d([[parametric, cos(th), sin(th), [th,0,2*%pi]]], [x, -sqrt(2), sqrt(2)])\$ plot-options-parser: unknown plot option: [th,0,2*%pi] -- an error. To debug this try: debugmode(true); --------------------------------------------------------------------- Ted Woollett ```
 Re: [Maxima-discuss] R: Makelist command From: Stavros Macrakis (Σταῦρος Μακράκης) - 2017-11-18 20:44:22 Attachments: Message as HTML ```I recommend that you define small, simple functions and compose them to do what you want: /* [a,b,c,...] => [b-a,c-b,...] */ differencing(l) := makelist(l[i+1]-l[i],i,1,length(l)-1)\$ cumulative_sum(l) := block([sum:0], makelist( sum:sum+l[i], i, 1, length(l) ))\$ To go from your l: l:[ [0, [0.0,0.0,2440,0] ], [4.0, [2.01,2.23*10^-14,2440,0] ],... to [0.0, 2.01, ...]: makelist(i[2][1],i,l) Then: makelist(i[2][1],i,l) => [0.0,2.01,4.08,6.26,8.58,11.1,13.8,16.7,19.8,23.1] differencing(%) => [2.01,2.07,2.18,2.32,2.52,2.700000000000001,2.899999999999999,3.100000000000001, 3.300000000000001] cumulative_sum(%) => [2.01,4.08,6.26,8.58,11.1,13.8,16.7,19.8,23.1] cons(0,%) => [0,2.01,4.08,6.26,8.58,11.1,13.8,16.7,19.8,23.1] On Sat, Nov 18, 2017 at 12:01 PM, Stefano Milani wrote: > I would like to obtain something like this: > > Deltax2:[2.01, 4.08-2.01=2.07,6.26-4.08=2.18,8.58-6.26=2.32....etc] > > And a summation of Deltax2: [2.01,2.01+2.07=4.08,2.01+2. > 07+4.08=8.16,2.01+2.07+4.08+8.16=16.32,etc...] > > Best regards > Stefano > > > -----Messaggio originale----- > Da: Gunter Königsmann [mailto:gunter@...] > Inviato: sabato 18 novembre 2017 16:34 > A: Stefano Milani; maxima-discuss > Oggetto: Re: [Maxima-discuss] Makelist command > > I am not sure, if I understand your mail right. Do you want something like > the following? > > (%i1) l:[ > [0, > [0.0,0.0,2440,0] > ], > [4.0, > [2.01,2.23*10^-14,2440,0] > ], > [8.0, > [4.08,4.53*10^-14,2440,0] > ], > [12.0, > [6.26,6.95*10^-14,2440,0] > ], > [16.0, > [8.58,9.53*10^-14,2440,0] > ], > [20.0, > [11.1,1.23*10^-13,2440,0] > ], > [24.0, > [13.8,1.53*10^-13,2440,0] > ], > [28.0, > [16.7,1.85*10^-13,2440,0] > ], > [32.0, > [19.8,2.2*10^-13,2440,0] > ], > [36.0, > [23.1,2.56*10^-13,2440,0] > ] > ]\$ > > (%i6) makelist(makelist(i[2]-i[1])[1],i,l); > (%o6) > [[0.0,0.0,2440,0],[-1.99,-3.999999999999978,2436.0,-4.0],[ > -3.92,-7.999999999999955,2432.0,-8.0],[-5.74,-11. > 99999999999993,2428.0,-12.0],[-7.42,-15.9999999999999,2424. > 0,-16.0],[-8.9,-19.99999999999988,2420.0,-20.0],[ > -10.2,-23.99999999999985,2416.0,-24.0],[-11.3,-27. > 99999999999982,2412.0,-28.0],[-12.2,-31.99999999999978,2408. > 0,-32.0],[-12.9,-35.99999999999974,2404.0,-36.0]] > > Or do you need something like: > > (%i14) l:makelist(i^2,i,1,100); > (l) > [1,4,9,16,25,36,49,64,81,100,121,144,169,196,225,256,289, > 324,361,400,441,484,529,576,625,676,729,784,841,900,961, > 1024,1089,1156,1225,1296,1369,1444,1521,1600,1681,1764,1849, > 1936,2025,2116,2209,2304,2401,2500,2601,2704,2809,2916,3025, > 3136,3249,3364,3481,3600,3721,3844,3969,4096,4225,4356,4489, > 4624,4761,4900,5041,5184,5329,5476,5625,5776,5929,6084,6241, > 6400,6561,6724,6889,7056,7225,7396,7569,7744,7921,8100,8281, > 8464,8649,8836,9025,9216,9409,9604,9801,10000] > (%i16) difference:0\$ > makelist( > difference:(i-difference), > i,l); > (%o16) > [1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153,171, > 190,210,231,253,276,300,325,351,378,406,435,465,496,528, > 561,595,630,666,703,741,780,820,861,903,946,990,1035,1081, > 1128,1176,1225,1275,1326,1378,1431,1485,1540,1596,1653,1711, > 1770,1830,1891,1953,2016,2080,2145,2211,2278,2346,2415,2485, > 2556,2628,2701,2775,2850,2926,3003,3081,3160,3240,3321,3403, > 3486,3570,3655,3741,3828,3916,4005,4095,4186,4278,4371,4465, > 4560,4656,4753,4851,4950,5050] > > If necessary the first argument of makelist can be a comma-separated list > of commands that are to be executed for every list element. The resulting > list is made up of the output of the last of these comma-separated commands: > > o:.1\$ > makelist( > ( > o:(o*1.4+.2*%i)^2, > cabs(o) > ), > i,1,100); > > Kind regards, > > Gunter. > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ```
 Re: [Maxima-discuss] Test bench failures with the Ubuntu Nightly Build From: Robert Dodier - 2017-11-18 19:43:35 ```On 2017-11-17, Gunter Königsmann wrote: > FAIL gcl-test.sh (exit status: 1) > > debian/rules:41: recipe for target 'override_dh_auto_test' failed > > > Running tests in rtest16: > ********************** Problem 618 *************** > Input: > map('sign, [apos bpos, apos bneg, apos bpz, apos bnz, apos bpn, apos bpnz, > aneg bpos, aneg bneg, aneg bpz, aneg bnz, aneg bpn, aneg bpnz, apz bpos, > apz bneg, apz bpz, apz bnz, apz bpn, apz bpnz, anz bpos, anz bneg, anz bpz, > anz bnz, anz bpn, anz bpnz, apn bpos, apn bneg, apn bpz, apn bnz, apn bpn, > apn bpnz, apnz bpos, apnz bneg, apnz bpz, apnz bnz, apnz bpn, apnz bpnz]) It turns out the problem is that rtest16.mac contained Unicode no-break spaces, which are treated as white space only if *FEATURES* contains something to indicate Unicode support, which GCL lacks. I replaced them with ordinary spaces and now Maxima + GCL reports no errors for rtest16. best Robert Dodier ```
 [Maxima-discuss] R: Makelist command From: Stefano Milani - 2017-11-18 17:01:26 ```I would like to obtain something like this: Deltax2:[2.01, 4.08-2.01=2.07,6.26-4.08=2.18,8.58-6.26=2.32....etc] And a summation of Deltax2: [2.01,2.01+2.07=4.08,2.01+2.07+4.08=8.16,2.01+2.07+4.08+8.16=16.32,etc...] Best regards Stefano -----Messaggio originale----- Da: Gunter Königsmann [mailto:gunter@...] Inviato: sabato 18 novembre 2017 16:34 A: Stefano Milani; maxima-discuss Oggetto: Re: [Maxima-discuss] Makelist command I am not sure, if I understand your mail right. Do you want something like the following? (%i1) l:[ [0, [0.0,0.0,2440,0] ], [4.0, [2.01,2.23*10^-14,2440,0] ], [8.0, [4.08,4.53*10^-14,2440,0] ], [12.0, [6.26,6.95*10^-14,2440,0] ], [16.0, [8.58,9.53*10^-14,2440,0] ], [20.0, [11.1,1.23*10^-13,2440,0] ], [24.0, [13.8,1.53*10^-13,2440,0] ], [28.0, [16.7,1.85*10^-13,2440,0] ], [32.0, [19.8,2.2*10^-13,2440,0] ], [36.0, [23.1,2.56*10^-13,2440,0] ] ]\$ (%i6) makelist(makelist(i[2]-i[1])[1],i,l); (%o6) [[0.0,0.0,2440,0],[-1.99,-3.999999999999978,2436.0,-4.0],[-3.92,-7.999999999999955,2432.0,-8.0],[-5.74,-11.99999999999993,2428.0,-12.0],[-7.42,-15.9999999999999,2424.0,-16.0],[-8.9,-19.99999999999988,2420.0,-20.0],[-10.2,-23.99999999999985,2416.0,-24.0],[-11.3,-27.99999999999982,2412.0,-28.0],[-12.2,-31.99999999999978,2408.0,-32.0],[-12.9,-35.99999999999974,2404.0,-36.0]] Or do you need something like: (%i14) l:makelist(i^2,i,1,100); (l) [1,4,9,16,25,36,49,64,81,100,121,144,169,196,225,256,289,324,361,400,441,484,529,576,625,676,729,784,841,900,961,1024,1089,1156,1225,1296,1369,1444,1521,1600,1681,1764,1849,1936,2025,2116,2209,2304,2401,2500,2601,2704,2809,2916,3025,3136,3249,3364,3481,3600,3721,3844,3969,4096,4225,4356,4489,4624,4761,4900,5041,5184,5329,5476,5625,5776,5929,6084,6241,6400,6561,6724,6889,7056,7225,7396,7569,7744,7921,8100,8281,8464,8649,8836,9025,9216,9409,9604,9801,10000] (%i16) difference:0\$ makelist( difference:(i-difference), i,l); (%o16) [1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153,171,190,210,231,253,276,300,325,351,378,406,435,465,496,528,561,595,630,666,703,741,780,820,861,903,946,990,1035,1081,1128,1176,1225,1275,1326,1378,1431,1485,1540,1596,1653,1711,1770,1830,1891,1953,2016,2080,2145,2211,2278,2346,2415,2485,2556,2628,2701,2775,2850,2926,3003,3081,3160,3240,3321,3403,3486,3570,3655,3741,3828,3916,4005,4095,4186,4278,4371,4465,4560,4656,4753,4851,4950,5050] If necessary the first argument of makelist can be a comma-separated list of commands that are to be executed for every list element. The resulting list is made up of the output of the last of these comma-separated commands: o:.1\$ makelist( ( o:(o*1.4+.2*%i)^2, cabs(o) ), i,1,100); Kind regards, Gunter. ```
11 messages has been excluded from this view by a project administrator.

Showing results of 15535

<< < 1 2 3 4 .. 622 > >> (Page 2 of 622)