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 (592) Mar (625) Apr (516) May (375) Jun (155) Jul (346) Aug (262) Sep (346) Oct (238) Nov Dec

Showing results of 11353

<< < 1 2 3 4 .. 455 > >> (Page 2 of 455)
 [Maxima-discuss] Fitting two curves at once From: Gunter Königsmann - 2016-10-20 17:05:30 ```Dear all, I am using lsquares quite a lot to fit experimental data on curves I've calculated this data has to lie on. If one knows that fitting something on an exponential curve might require applying log() on the curve first - this works out fine in most of the cases. ...and I know that this originally isn't to be claimed to be a fault of lsquares. ...but this time I have data that needs to fulfill two equations at once. Does any of you know of a fitter that allows maxima to find parameters for two equations acting on the same data and sharing parameters so it will optimize them both? Thanks a lot, and kind regards, Gunter. ```
 Re: [Maxima-discuss] Simplification of an expression From: Stavros Macrakis (Σταῦρος Μακράκης) - 2016-10-20 16:50:26 Attachments: Message as HTML ```Here's a useful function for cases like this. It takes an expression A/B and carries out the polynomial division, putting it into the form P/Q+R. divthru(q) := block([n,d,quo,inflag:false], if mapatom(q) then q elseif op(q)="-" then -divthru(-q) elseif op(q)="/" then (n: num(q), d: denom(q), quo:divide(n,d), quo[1]+quo[2]/d ) else q)\$ Example: divthru( (a*x2 - b*x1 - b*x2 + c*x1)/(a - 2*b + c) ) => (a*(x2-x1)+b*(x1-x2))/(c-2*b+a)+x1 map(factor,%) => x1-((b-a)*(x2-x1))/(c-2*b+a) On Thu, Oct 20, 2016 at 11:42 AM, Zbigniew Komarnicki wrote: > Hello, > > I solve system of two equations and want to simplify one of obtained > result. > Have look: > > (%i1) display2d: false\$ > (%i2) e: y-y1 = ((y2-y1)/(x2-x1))*(x-x1); > (%o2) y-y1 = ((x-x1)*(y2-y1))/(x2-x1) > > (%i3) e1: subst([y1=a, y2=b], e); > (%o3) y-a = ((b-a)*(x-x1))/(x2-x1) > > (%i4) e2: subst([y1=b, y2=c], e); > (%o4) y-b = ((c-b)*(x-x1))/(x2-x1) > > (%i5) s: solve([e1, e2], [x, y]); > (%o5) [[x = ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a),y = (b^2-a*c)/((-c)+2*b-a)]] > > (%i6) z: rhs(s[1][1]); > (%o6) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) > > I want to simplify the result of "x" assigned to "z" in (%i6). > In matlab symbolic computations I got the following result: > > Matlab result: > -------------------------------------- > >> z = s.x > z = > (a*x2 - b*x1 - b*x2 + c*x1)/(a - 2*b + c) > >> z_matlab = simplify(z) > z_matlab = > x1 - ((a - b)*(x1 - x2))/(a - 2*b + c) > -------------------------------------- > How I can obtain result as 'z_matlab', i.e. 'x1' before the rest of the > expression. > > This approach is not working: > (%i7) ratsimp(z); > (%o7) -((b-a)*x2+(b-c)*x1)/(c-2*b+a) > > (%i8) map(ratsimp,z); > (%o8) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) > > (%i9) map(fullratsimp,z); > (%o9) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) > > How to force maxima to achieve the same result? > > Thank you in advance. > > Best regards, > Zbigniew > > > ------------------------------------------------------------ > ------------------ > 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] Simplification of an expression From: Richard Fateman - 2016-10-20 16:21:45 ```On 10/20/2016 8:42 AM, Zbigniew Komarnicki wrote: > Hello, > > I solve system of two equations and want to simplify one of obtained result. > Have look: > > (%i1) display2d: false\$ > (%i2) e: y-y1 = ((y2-y1)/(x2-x1))*(x-x1); > (%o2) y-y1 = ((x-x1)*(y2-y1))/(x2-x1) > > (%i3) e1: subst([y1=a, y2=b], e); > (%o3) y-a = ((b-a)*(x-x1))/(x2-x1) > > (%i4) e2: subst([y1=b, y2=c], e); > (%o4) y-b = ((c-b)*(x-x1))/(x2-x1) > > (%i5) s: solve([e1, e2], [x, y]); > (%o5) [[x = ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a),y = (b^2-a*c)/((-c)+2*b-a)]] > > (%i6) z: rhs(s[1][1]); > (%o6) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) > > I want to simplify the result of "x" assigned to "z" in (%i6). > In matlab symbolic computations I got the following result: > > Matlab result: > -------------------------------------- >>> z = s.x > z = > (a*x2 - b*x1 - b*x2 + c*x1)/(a - 2*b + c) >>> z_matlab = simplify(z) > z_matlab = > x1 - ((a - b)*(x1 - x2))/(a - 2*b + c) > -------------------------------------- > How I can obtain result as 'z_matlab', i.e. 'x1' before the rest of the expression. > > This approach is not working: > (%i7) ratsimp(z); > (%o7) -((b-a)*x2+(b-c)*x1)/(c-2*b+a) > > (%i8) map(ratsimp,z); > (%o8) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) > > (%i9) map(fullratsimp,z); > (%o9) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) > > How to force maxima to achieve the same result? > > x1+ factor(z-x1) will do it. RJF ```
 [Maxima-discuss] Simplification of an expression From: Zbigniew Komarnicki - 2016-10-20 15:43:10 ```Hello, I solve system of two equations and want to simplify one of obtained result. Have look: (%i1) display2d: false\$ (%i2) e: y-y1 = ((y2-y1)/(x2-x1))*(x-x1); (%o2) y-y1 = ((x-x1)*(y2-y1))/(x2-x1) (%i3) e1: subst([y1=a, y2=b], e); (%o3) y-a = ((b-a)*(x-x1))/(x2-x1) (%i4) e2: subst([y1=b, y2=c], e); (%o4) y-b = ((c-b)*(x-x1))/(x2-x1) (%i5) s: solve([e1, e2], [x, y]); (%o5) [[x = ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a),y = (b^2-a*c)/((-c)+2*b-a)]] (%i6) z: rhs(s[1][1]); (%o6) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) I want to simplify the result of "x" assigned to "z" in (%i6). In matlab symbolic computations I got the following result: Matlab result: -------------------------------------- >> z = s.x z = (a*x2 - b*x1 - b*x2 + c*x1)/(a - 2*b + c) >> z_matlab = simplify(z) z_matlab = x1 - ((a - b)*(x1 - x2))/(a - 2*b + c) -------------------------------------- How I can obtain result as 'z_matlab', i.e. 'x1' before the rest of the expression. This approach is not working: (%i7) ratsimp(z); (%o7) -((b-a)*x2+(b-c)*x1)/(c-2*b+a) (%i8) map(ratsimp,z); (%o8) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) (%i9) map(fullratsimp,z); (%o9) ((b-a)*x2+(b-c)*x1)/((-c)+2*b-a) How to force maxima to achieve the same result? Thank you in advance. Best regards, Zbigniew ```
 Re: [Maxima-discuss] polynomials containing differential operators From: nijso beishuizen - 2016-10-20 15:41:27 ```Hello Robert and others, Thank you for your help, I could finally compute the least common left multiple (at least the example from the slides) using this approach. I checked how maple treats differential polynomial multiplication in diffop. It seems that nothing special is being done there. Either D or DF is used as the differential operator (internally, without function dependence), and a function mult(a,b,[DF,x]) is defined to perform the multiplication. the arguments of a and b are multiplied according to the Leibniz rule and that's it. Doing a.b properly for general differential polynomials a and b needs a lot of tellsimp rules for large polynomials. It is still useful to have some basic tellsimp rules because it cleans up the code significantly, but I found that defining my own (general) dot product Dmult(a,b) is much simpler. I now have this piece of code below for multiplication. I would still like to generalize it, because D and x are now hardcoded. matchdeclare(ee, all,aa,integerp) ; tellsimpafter(D.D, D^2); tellsimpafter(D.ee, ee*D + diff(ee,x)); tellsimpafter((D^aa).ee, (D^(aa-1)).(ee*D + diff(ee,x))); Dmult(a,b):=block([newterm:0,_La,_P:0], _La : allcoeffs(a,D), for term_a in _La do ( newterm:newterm + term_a * expand(D^_P.b), _P:_P+1 ), return(newterm) ); allcoeffs(_expr,_x):=block([_L:ratexpand(_expr),_N,_pcoef:[]], for _N:0 thru hipow(ratexpand(_expr),x) do( _pcoef:endcons(coeff(_L,_x,_N),_pcoef) ), return(_pcoef) ); L1:x^2*D^2-x*D+a-x^2; L2:x*D-(x^2-b); ratexpand(Dmult(L1,L2)); (-D^2*x^4)+x^4+D^3*x^3-4*D*x^3+D^2*b*x^2-b*x^2-a*x^2+D^2*x^2-D*b*x +D*a*x-D*x+a*b\$ Correct. Compare to answer in the first example in: https://www.maplesoft.com/support/help/Maple/view.aspx?path=examples/diffop On Wed, 2016-10-19 at 07:00 +0000, Robert Dodier wrote: > On 2016-10-17, nijso beishuizen wrote: > > > rule 1: > > tellsimp (D(_x)._e, _e.D(_x) + diff(_e,_x)); > > rule 2: > > gradef(D(x),0); > > rule 3: > > tellsimp (D(_x).D(_x), D(_x)^2); > > > > > > (%i5) p:D(x); > > (%o5) D(x) > > (%i6) q:D(x)+x; > > (%o6) D(x) + x > > (%i7) p.q; > > (%o7) (D(x) + x) . D(x) + 1 > > (%i8) expand(p.q); > > Exiting on signal 6 > > I think what's happening here is that by rule 1, D(x).D(x) --> D(x).D(x) > + 0 so the rule gets applied again. I think you prevent that by > requiring that _e is something other than a D(something) expression. > > (%i2) matchdeclare (_x, symbolp, _e, lambda ([e], atom(e) or op(e) # 'D)) \$ > (%i3) tellsimp (D(_x)._e, _e.D(_x) + diff(_e,_x)); > (%o3) [\.rule1,simpnct] > (%i4) gradef(D(x),0); > (%o4) D(x) > (%i5) tellsimp (D(_x).D(_x), D(_x)^2); > (%o5) [\^\^rule1,simpncexpt] > (%i6) [p, q] : [D(x), D(x) + x] \$ > (%i7) p.q; > (%o7) (D(x)+x) . D(x)+1 > (%i8) expand (%); > (%o8) x . D(x)+D(x)^2+1 > > Hope this helps, > > 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] Don't understand a test problem from early ALGSYS paper From: Robert Dodier - 2016-10-20 14:12:32 ```On 2016-10-20, David Billinghurst wrote: >|x-b|^2 (x-a,N)^2 - |x-a|^2 (x-b,N)^2 = 0 > >|x-b| is almost certainly the distance between x and b. What is (x-a,N)? Is it possible that N is a normal vector and (foo, N) is an inner product with the normal? Thanks for working on algsys. It is a tremendous service to humanity. best Robert Dodier ```
 Re: [Maxima-discuss] Don't understand a test problem from early ALGSYS paper From: Michel Talon - 2016-10-20 08:24:35 ```Le 20/10/2016 à 06:03, David Billinghurst a écrit : > Method for Computing All Solutions to Systems > of Polynomials Equations There is a copy of the ACM paper here https://pdfs.semanticscholar.org/dedd/0d5e4a531718d681a4451b11392d4b5af45a.pdf but it doesn't contain the "example 4". It may be that the computation in question is related to expression of the Fermat principle for refraction on a cylindrical surface, see the analogous http://scientificsentence.net/Optics/index.php?key=yes&Integer=fermat_principle section 3, in which case N would be a vector giving the refraction indices on both sides of the cylinder. Then x would be a point on the surface, which has to be determined so as to minimize the optical path between a and b. I don't understand the determinant equation however. -- Michel Talon ```
 Re: [Maxima-discuss] Don't understand a test problem from early ALGSYS paper From: Andrey G. Grozin - 2016-10-20 04:43:15 ```On Thu, 20 Oct 2016, David Billinghurst wrote: > |x-b| is almost certainly the distance between x and b. What is (x-a,N)? Most probably, the scalar product of 2 vectors. Andrey ```
 [Maxima-discuss] Don't understand a test problem from early ALGSYS paper From: David Billinghurst - 2016-10-20 04:03:25 ```I have been working on some algsys bugs. As part of this work I have been adding test cases to tests/rtest_algsys.mac. This has caught a few errors and misconceptions as I stumbled about in the code. I would welcome some more test cases. Published cases and problems that can only be solved with the recent bug fixes would be particularly welcome. One set of sources I have used is from Beyer [1], as it would be bad to fail on published ALGSYS examples. I don't understand his Example 4 from p117. The source is a General Motors internal report by Morgan [2]. I have found a publication with the same title [3] which doesn't have this problem. This problem from geometrical optics. Can anyone help me here? X:(x1,x2,x3)\$ a:(-1,-10,0)\$ b:(1,-10,0)\$ M:matrix( [ x1-a1, x2-a2, x3-a3], [ x1-b1, x2-b2, x3-b3], [ 2*x1, 2*x2, 0] ); eq1: x1^2 + x2^2 -1 = 0; /* OK */ eq2:determinant(M)= 0; /* OK */ /* and here is the one I don't understand */ |x-b|^2 (x-a,N)^2 - |x-a|^2 (x-b,N)^2 = 0 |x-b| is almost certainly the distance between x and b. What is (x-a,N)? References 1. Beyer, William A., Solution of Simultaneous Polynomial Equations by Elimination in MACSYMA, Proceedings of the 1984 MACSYMA Users' Conference, p 110-120 (http://udspace.udel.edu/handle/19716/1399). 2. Morgan, Alexander P., A Method for Computing All Solutions to Systems of Polynomials Equations, GMR-3651, General Motors Research Laboratory, Warren MI. July 1981 3. Morgan, Alexander P., A Method for Computing All Solutions to Systems of Polynomials Equations, ACM Transactions on Mathematical Software, 9:1-17 (1983) ```
 [Maxima-discuss] extraneous results from solve() utilizing function and equations From: sholman - 2016-10-19 22:15:35 ```Hello All, I don't think I'd call this an error, but it could lead people to an unsuspecting result... I tried looking at @union but I guess solve() didn't like that. /*********/ domain:complex\$ display2d:false\$ ratprint:false\$ f(a,b,Q):=1-Q*b+a*b^3*(1-b+2*b^2-2*Q*b^2-Q*b^3+Q^2*b^4)-a^2*b^9*(1-b); soln1: solve([f(a,1/4,2)=0],[a,b]); /* gives: [[a = (896*sqrt(33)+4992)/3,b = %r1], [a = -(896*sqrt(33)-4992)/3,b = %r2]] */ soln2: solve([f(a,b,2)=0, f(a,1/4,2)=0],[a,b]); /* gives: [[a = -(896*sqrt(33)-4992)/3,b = 1/4], [a = (896*sqrt(33)+4992)/3,b = 1/4], [a = 3379.709677419355,b = -0.06821599453178401], [a = 3379.709677419355,b = 0.2257134668254271*%i+0.1358404163574437], [a = 3379.709677419355,b = 0.1358404163574437-0.2257134668254271*%i], [a = -51.709375,b = 0.554741872512523*%i-0.03943880710062309], [a = -51.709375,b = (-0.554741872512523*%i)-0.03943880710062309], [a = -51.709375,b = 1.000412711514651], [a = 3379.709677419355,b=0.05642836177352352*%i+0.03396010112064961], [a = 3379.709677419355,b = 0.03396010112064961-0.05642836177352352*%i], [a = 3379.709677419355,b = 0.2218652877435003*%i-0.1335244790052816], [a = 3379.709677419355,b = (-0.2218652877435003*%i)-0.1335244790052816], [a = -51.709375,b = 0.2530481409625257*%i-0.1151443664294247], [a = -51.709375,b = (-0.2530481409625257*%i)-0.1151443664294247], [a = -51.709375,b = 0.1743251978626854*%i+0.468736514784803], [a = -51.709375,b = 0.468736514784803-0.1743251978626854*%i], [a = 3379.709677419355,b = -0.2543361715547146], [a = -51.709375,b = 0.2388853734024408*%i-0.4393597310596922], [a = -51.709375,b = (-0.2388853734024408*%i)-0.4393597310596922], [a = 3379.709677419355,b = 1.0]] */ soln3: solve([f(a,b,2)=0, b=1/4],[a,b]); /* [[a = -(896*sqrt(33)-4992)/3,b = 1/4], [a = (896*sqrt(33)+4992)/3,b = 1/4]] */ /*********/ I kind of thought the results had to satisfy both equations... Is this because the middle one is a function evaluation, and of course deeper stuff? ;) %build_info("branch_5_38_base_306_gd7c6950","2016-10-18 16:38:32","x86_64-unknown-linux-gnu","SBCL","1.3.2") Best wishes, Brett ```
 Re: [Maxima-discuss] polynomials containing differential operators From: Robert Dodier - 2016-10-19 07:01:15 ```On 2016-10-17, nijso beishuizen wrote: > rule 1: > tellsimp (D(_x)._e, _e.D(_x) + diff(_e,_x)); > rule 2: > gradef(D(x),0); > rule 3: > tellsimp (D(_x).D(_x), D(_x)^2); > > > (%i5) p:D(x); > (%o5) D(x) > (%i6) q:D(x)+x; > (%o6) D(x) + x > (%i7) p.q; > (%o7) (D(x) + x) . D(x) + 1 > (%i8) expand(p.q); > Exiting on signal 6 I think what's happening here is that by rule 1, D(x).D(x) --> D(x).D(x) + 0 so the rule gets applied again. I think you prevent that by requiring that _e is something other than a D(something) expression. (%i2) matchdeclare (_x, symbolp, _e, lambda ([e], atom(e) or op(e) # 'D)) \$ (%i3) tellsimp (D(_x)._e, _e.D(_x) + diff(_e,_x)); (%o3) [\.rule1,simpnct] (%i4) gradef(D(x),0); (%o4) D(x) (%i5) tellsimp (D(_x).D(_x), D(_x)^2); (%o5) [\^\^rule1,simpncexpt] (%i6) [p, q] : [D(x), D(x) + x] \$ (%i7) p.q; (%o7) (D(x)+x) . D(x)+1 (%i8) expand (%); (%o8) x . D(x)+D(x)^2+1 Hope this helps, Robert Dodier ```
 Re: [Maxima-discuss] Simplifying probability that exactly k of the n events will occur From: Barton Willis - 2016-10-18 19:01:23 ```Binomial(10^6 ,10^5) is so large, enumeration will never work for large k. . Maybe if k is at most a dozen or so, ok enumeration will work. And if the pk have some special structure, cleverness might prevail. ________________________________ From: Raymond Toy Sent: Sunday, October 16, 2016 4:19:25 PM To: maxima-discuss@... Subject: Re: [Maxima-discuss] Simplifying probability that exactly k of the n events will occur >>>>> "Michael" == Michael Cochez writes: Michael> Could you elaborate? ------------------------ Michael I think Barton means that if you have a million events that you want to deal with symbolically you probably need better algorithms. Michael> Cochez Aachen - Germany mail: michaelcochez@... Michael> web: http://users.jyu.fi/~miselico/ skype: michaelcochez Michael> On Sun, Oct 16, 2016 at 1:28 PM, Barton Willis Michael> wrote: >> Given that n might exceed 10^6, I think your main problem is >> algorithmic, not implementation. >> >> >> --Barton ________________________________ From: Michael Cochez >> Sent: Saturday, October 15, 2016 >> 4:06:10 PM To: Barton Willis Cc: >> maxima-discuss@... Subject: Re: >> [Maxima-discuss] Simplifying probability that exactly k of the >> n events will occur >> >> n might actually be very large (millions), so explicitly >> enumerating all terms becomes infeasible. >> >> ------------------------ Michael Cochez >> >> >> >> On Sat, Oct 15, 2016 at 10:06 PM, Barton Willis >> wrote: >>> How large might n be? If it's no more than a few dozen, I'd >>> guess that Maxima has some high level tools that would >>> help. And I'd guess that a Maxima function that does this with >>> lower level tools (for loops, for example would not look all >>> that much different than function in many other languages. >>> >>> --Barton ________________________________ From: Michael Cochez >>> Sent: Saturday, October 15, 2016 >>> 2:32:17 PM To: maxima-discuss@... Subject: >>> [Maxima-discuss] Simplifying probability that exactly k of the >>> n events will occur >>> >>> Dear all, >>> >>> Imagine that n independent events have probability of >>> occurrence p_1, p_2, ... p_n. I am trying to see whether I >>> can simplify an expression indicating the probability that >>> exactly k of the n events will occur. Each of the p_i is by >>> itself a complex expression. What is essentially needed is a >>> sum of C(n,k) terms p_1*p_2*...*p_n with k p_i's replaced by >>> 1-p_i, without fixing k or n to a constant number. The >>> problem is that I do not find a way to express this in maxima. >>> >>> Any help would be appreciated, I am completely new to computer >>> algebra systems. >>> >>> Kind regards, Michael >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 Michael> ------------------------------------------------------------------------------ Michael> Check out the vibrant tech community on one of the Michael> world's most engaging tech sites, SlashDot.org! Michael> http://sdm.link/slashdot ------------------------------------------------------------------------------ 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] polynomials containing differential operators From: Richard Fateman - 2016-10-18 18:00:39 ```If you have worked with your notation, simplified expressions, etc, using "my+" and "mytimes", and reduced some subexpression to an actual polynomial or rational function as encoded in Maxima, then you can replace my+ with + etc. That is, your goal could be to reduce the problem to the known algorithmic domain, and then use Maxima's standard stuff (for polynomials over the integers or finite fields). For example, if you want to eventually compute greatest common divisors (GCD), that's already written. But if you want to compute Left greatest common divisors for non-commuting polynomials, it would probably be a mistake to do that by pattern matching and hacking of + and . . RJF ```
 Re: [Maxima-discuss] polynomials containing differential operators From: Robert Dodier - 2016-10-18 16:00:31 ```On 2016-10-17, nijso beishuizen wrote: > (%i8) expand(p.q); > Exiting on signal 6 My first guess is that this is a stack overflow due to one or more rules being applied over and over. If so the way to avoid it is to ensure that there is a terminal case i.e. some rule foo(x) --> not_foo, so any foo-rules aren't applied again. > I guess dot was never meant to work for f(x)? Not so; the good news is that f(x).f(x) is perfectly well-formed from Maxima's point of view. best Robert Dodier ```
 Re: [Maxima-discuss] polynomials containing differential operators From: Robert Dodier - 2016-10-18 15:51:19 ```On 2016-10-17, nijso beishuizen wrote: > (%i1) matchdeclare (xx, symbolp, nn, integerp, ee, all) \$ > (%i2) tellsimp (D(xx)^^nn.xx, (D(xx)^^(nn-1)).(D(xx).xx)); > tellsimp: circular rule attempted. I think you need a rule for D(xx).xx as well. Didn't I put that in the example I posted? Unfortunately I can't check it right now. best Robert Dodier ```
 Re: [Maxima-discuss] polynomials containing differential operators From: Robert Dodier - 2016-10-18 15:46:10 ```On 2016-10-17, nijso beishuizen wrote: > Some systems use namespaces to avoid this confusion. When we load the > file (say) differentialPolynomial.max, we know (or should at least > expect) that definitions and behavior changes, and that we will be able > to deal with polynomials containing differential operators. We should > then expect the behavior (D+1).x = D.x + x = x.D + 1 + x > > Can you elaborate on your prefered approach? The difficulty pointed out by RJF is essentially that Maxima has weak capability to retract existing rules for operations (although it is easier to define new rules). So when you see "+" (or "1") in an expression, it is treated the same as the ordinary "+" or "1", except with maybe some additional baggage. If you work only with new symbols and operators e.g. infix("my+"); and tellsimp(my0 my+ my0, my0); you can be sure that only your rules are applied. The disadvantage, of course, is that you'll end up reinventing a lot of wheels. Whether it's worth the trouble can only be answered on a case by case basis. best Robert Dodier ```
 Re: [Maxima-discuss] Solver package From: Robert Dodier - 2016-10-18 15:37:21 ```On 2016-10-17, Raymond Toy wrote: > Stavros> As far as I know, this code has not changed for many > Stavros> years, so if the function name is spelled with a capital > Stavros> S today, it has probably always been spelled with a > Stavros> capital S. So I doubt this breaks any code. > > Perhaps it dates back to the time when maxima was not case-sensitive. > git log shows quite a few commits documenting the down-casing of many > symbols sometime after maxima became case-sensitive Indeed the documentation for Solver shows that it dates to the 90's, when Maxima was case-insensitive. Dunno about commercial Macsyma, and I dunno whether Solver was written for the one or the other. Be that as it may, Solver uses mixed-case symbols pretty consistently. The following analysis is probably imperfect but for what it's worth: load (solver); /* or load(Solver); nowadays */ subset (equiv_classes (apply (set, map (lambda ([x], if symbolp(x) then x else op(x)), apply (append, map (listofvars, map (fundef, map (op, functions)))))), sequalignore), lambda ([s], is (cardinality (s) > 1))); => {{Atom, atom}, {Eq, eq}, {Lst, lst}} One would have to look at the code to see if these variants are actually causing any trouble. e.g. foo(Lst) := map(..., lst); or something. I ignored variables in the above -- I guess one should include those. best Robert Dodier ```
 Re: [Maxima-discuss] polynomials containing differential operators From: nijso beishuizen - 2016-10-17 22:30:16 ```On Mon, 2016-10-17 at 14:52 -0700, Richard Fateman wrote: > I haven't responded earlier, but this kind of calculation has been > approached previously and probably in a variety of ways. > I think the most successful way relies on defining new operators > pretty much from top to bottom, and not relying on ^^ + . as built > in. I think that it eliminates what is essentially mathematical > "punning".... e.g. is the number 1 a constant function always returning > 1 or is it an identity operator? > is (D+1).x = D.x +x or D.x +1. Could be either. Some systems use namespaces to avoid this confusion. When we load the file (say) differentialPolynomial.max, we know (or should at least expect) that definitions and behavior changes, and that we will be able to deal with polynomials containing differential operators. We should then expect the behavior (D+1).x = D.x + x = x.D + 1 + x Can you elaborate on your prefered approach? Also, do you have some reference to a previous approach (in maxima/macsyma)? In this context, I could only find your paper on computer algebra and operators (Fateman and Grossman, nasa-cr-185396, 1989). Best regards, Nijso Beishuizen ```
 Re: [Maxima-discuss] polynomials containing differential operators From: nijso beishuizen - 2016-10-17 22:00:02 ```if K[D] is the ring of differential polynomials, the commutation rule is: (1) D.a = a.D + a' for a in K, where a'=da/dx also, we have the simplifications (2) D' = 0 and (3) D.D=D^2 rule 1: tellsimp (D(_x)._e, _e.D(_x) + diff(_e,_x)); rule 2: gradef(D(x),0); rule 3: tellsimp (D(_x).D(_x), D(_x)^2); (%i5) p:D(x); (%o5) D(x) (%i6) q:D(x)+x; (%o6) D(x) + x (%i7) p.q; (%o7) (D(x) + x) . D(x) + 1 (%i8) expand(p.q); Exiting on signal 6 Now it fails on D(x).D(x) I guess dot was never meant to work for f(x)? Best, Nijso On Mon, 2016-10-17 at 00:49 +0000, Robert Dodier wrote: > On 2016-10-16, nijso beishuizen wrote: > > > The commutation rule is (slide 2) D.x = x.D + 1, which means that for > > example: > > > > D.(D+x) = D^2 + xD + 1 > > D.(x.D+1) = xD^2 +2D > > OK, it will be easy to represent this operation in the direction of D.x > going to x.D + 1, but Maxima is not too good with going in either > direction with an identity -- the rule system is pretty strongly biased > toward going in one direction. Is there a canonical form, such that > going from noncanonical to canonical would be preferable? > > We can set up rules to go in both directions and you can apply one set > of rules or the other. That's a little less convenient than having rules > applied automatically. Also, you might find that Maxima is more > successful at detecting applicable cases in one direction or the other. > > > Representing the double derivative as a square makes sense I think when > > you see this expression as an extension for polynomials, since the > > leading term is still the term with the highest power (when D > x > 1). > > OK. I think I can see how to allow for powers of D(x) to be applied. How > about the following. > > matchdeclare (xx, symbolp, nn, integerp, ee, all) \$ > tellsimp (D(xx)^^nn.xx, (D(xx)^^(nn-1)).(D(xx).xx)); > > Incidentally the rule D.x --> x.D + 1 would be > > tellsimp (D(xx).xx, xx.D(xx) + 1); > > > A computational example for computing common left multiples is on slide > > 16 in the presentation of Bostan. The idea is to compute a Sylvester > > matrix using the differential operators (slide 11). > > I didn't work out the details, but it looks like constructing a > Sylvester matrix would be straightforward, given that the elements of > the matrix are just D(x)^n applied to some polynomial. I don't know what > it would take to compute the rank of the block Sylvester matrix or > anything like that. > > 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] polynomials containing differential operators From: Richard Fateman - 2016-10-17 21:52:18 ```I haven't responded earlier, but this kind of calculation has been approached previously and probably in a variety of ways. I think the most successful way relies on defining new operators pretty much from top to bottom, and not relying on ^^ + . as built in. I think that it eliminates what is essentially mathematical "punning".... e.g. is the number 1 a constant function always returning 1 or is it an identity operator? is (D+1).x = D.x +x or D.x +1. Could be either. RJF On 10/17/16 1:59 PM, nijso beishuizen wrote: > Hello Robert, > > >> matchdeclare (xx, symbolp, nn, integerp, ee, all) \$ >> tellsimp (D(xx)^^nn.xx, (D(xx)^^(nn-1)).(D(xx).xx)); >> > I get this message when trying your tellsimp rule. > > (%i1) matchdeclare (xx, symbolp, nn, integerp, ee, all) \$ > (%i2) tellsimp (D(xx)^^nn.xx, (D(xx)^^(nn-1)).(D(xx).xx)); > tellsimp: circular rule attempted. > -- an error. To debug this try: debugmode(true); > > for this version: > > Maxima version: "5.38.1" > Maxima build date: "2016-08-24 21:52:57" > Host type: "x86_64-unknown-linux-gnu" > Lisp implementation type: "CLISP" > Lisp implementation version: "2.49 (2010-07-07) (built 3589338791) > (memory 3681057181)" > > > How did you get it to work? > > Best, > Nijso > > > > ------------------------------------------------------------------------------ > 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] polynomials containing differential operators From: nijso beishuizen - 2016-10-17 20:59:43 ```Hello Robert, > matchdeclare (xx, symbolp, nn, integerp, ee, all) \$ > tellsimp (D(xx)^^nn.xx, (D(xx)^^(nn-1)).(D(xx).xx)); > I get this message when trying your tellsimp rule. (%i1) matchdeclare (xx, symbolp, nn, integerp, ee, all) \$ (%i2) tellsimp (D(xx)^^nn.xx, (D(xx)^^(nn-1)).(D(xx).xx)); tellsimp: circular rule attempted. -- an error. To debug this try: debugmode(true); for this version: Maxima version: "5.38.1" Maxima build date: "2016-08-24 21:52:57" Host type: "x86_64-unknown-linux-gnu" Lisp implementation type: "CLISP" Lisp implementation version: "2.49 (2010-07-07) (built 3589338791) (memory 3681057181)" How did you get it to work? Best, Nijso ```
 [Maxima-discuss] Broken elliptic_pi tests From: Raymond Toy - 2016-10-17 19:49:34 ```In my attempt to fix bug #3221, I inadvertently broke some tests for elliptic_pi. I'll fix them later today or tomorrow. Sorry about that. -- Ray ```
 Re: [Maxima-discuss] A Little Case History: Re: Solver package From: Raymond Toy - 2016-10-17 16:57:10 ```>>>>> "Richard" == Richard Fateman writes: Richard> Macsyma was not case-sensitive on the PDP-10, though eventually there was Richard> an optional mode added, bothcases:true. Richard> In fact ANSI Common Lisp is by default case-insensitive, a relic of Richard> the PDP-10 36bit based Richard> MIT-Stanford-CMU contingents who were on the Common Lisp standard committee. Richard> The merits of upper/lower case as presented from the UNIX-Berkeley Richard> contingent Richard> were dismissed. Richard> I forget how Lisp Machine people reconciled the standard with the gobs Richard> of extra bits (case, etc) Richard> available on LMs. Richard> It was fairly obvious that Common Lisp and Macsyma on VAX, Sun, Lisa, Richard> and other Motorola 68000 Richard> would have both cases because Berkeley wanted it that way, and the issue Richard> was treated as Richard> resolved for KCL/ AKCL/ GCL (Bill Schelter's version of Macsyma --> Maxima and Austin Kyoto Common Lisp). Maxima didn't get downcasing until after Bill Schelter's passing, I think. Maxima (with or without ACL/GCL) was still case-insensitive until then. This is all in the commit logs somewhere if any wants to dig through them. Richard> The case of files defining programs underwent a transformation "the Richard> great down-casing"? some time ago. Richard> Though the use of upper-case in interacting with a Common Lisp debugger Richard> continues, I think. Also there Richard> are other places where case still matters; at least the last time I Richard> tried compiling Maxima in Allegro Richard> Common Lisp with "default=bothcases" it ran into problems, but with Richard> "default=ANSI-convert to upper case" Richard> it worked. Maxima uses standard reader modes to get case-senstivity which is different from ACL's case-sensitive "modern" mode. That's what messes things up with ACL. (At least that's my memory of the issue.) -- Ray ```
 Re: [Maxima-discuss] polynomials containing differential operators From: nijso beishuizen - 2016-10-17 16:26:05 ```Dear Michel, Thank you for this information. I only know a little bit about differential algebra, and reading the book of van der Put and Singer is on my to-do list. I didn't know about the maple code of Wang, but I did find another maple code by Thom Mulders, which looks very interesting: ftp://ftp.inf.ethz.ch/org/cathode/src/ore/maple1/Lodo Best regards, Nijso On Mon, 2016-10-17 at 09:59 +0200, Michel Talon wrote: > Le 17/10/2016 à 00:20, nijso beishuizen a écrit : > > Thank you very much, yes this is the direction I would like to move > > into. My short-term goal is to implement this method from Alin Bostan > > (INRIA) for the computation of common left multiples: > > > > http://www.ricam.oeaw.ac.at/events/conferences/aca12/Bostan_slides.pdf > > > > > > The commutation rule is (slide 2) D.x = x.D + 1, which means that for > > example: > > > > D.(D+x) = D^2 + xD + 1 > > D.(x.D+1) = xD^2 +2D > > > What you are describing is what is usually known as differential > algebra, which has been explored in books by Ritt and Kolchin, and > more recently for example in Van der Put and Singer > http://www.springer.com/us/book/9783540442288 > It was an aim of "charsets" theory of Wu Wen Tsun to implement Ritt's > ideas on the computer. What is in maxima doesn't deal with differential > polynomials, but Domning Wang has written a Maple package which has some > support for these polynomials, see > http://www.mmrc.iss.ac.cn/~dwang/wsolve.html > I have seen that there are maple packages and sage packages for > computing these least common multipliers of differential polynomials. > In a quite different set of ideas, there is also a large body of work > using differential polynomials to explore hierarchies of integrable > systems, pioneered by Gelfand and Dickey, see for example Chapter 9 > in http://www.cambridge.org/catalogue/catalogue.asp?isbn=9780521822671 > This leads to very elegant mathematics about infinite dimensional > Grassmanians first discussed by Sato, but we are here very far from > computer aided algebra. > > > > ```
 [Maxima-discuss] A Little Case History: Re: Solver package From: Richard Fateman - 2016-10-17 15:03:45 ```Macsyma was not case-sensitive on the PDP-10, though eventually there was an optional mode added, bothcases:true. In fact ANSI Common Lisp is by default case-insensitive, a relic of the PDP-10 36bit based MIT-Stanford-CMU contingents who were on the Common Lisp standard committee. The merits of upper/lower case as presented from the UNIX-Berkeley contingent were dismissed. I forget how Lisp Machine people reconciled the standard with the gobs of extra bits (case, etc) available on LMs. It was fairly obvious that Common Lisp and Macsyma on VAX, Sun, Lisa, and other Motorola 68000 would have both cases because Berkeley wanted it that way, and the issue was treated as resolved for KCL/ AKCL/ GCL (Bill Schelter's version of Macsyma -->Maxima and Austin Kyoto Common Lisp). The case of files defining programs underwent a transformation "the great down-casing"? some time ago. Though the use of upper-case in interacting with a Common Lisp debugger continues, I think. Also there are other places where case still matters; at least the last time I tried compiling Maxima in Allegro Common Lisp with "default=bothcases" it ran into problems, but with "default=ANSI-convert to upper case" it worked. RJF On 10/17/2016 7:46 AM, Raymond Toy wrote: >>>>>> "Stavros" == Stavros Macrakis <(Σταῦρος Μακράκης)" > writes: > Stavros> Maxima's convention for built-in functions is indeed that > Stavros> they are written in all lower-case, but this is a > Stavros> contributed library, and doesn't necessarily follow all > Stavros> of Maxima's conventions. > > Stavros> As far as I know, this code has not changed for many > Stavros> years, so if the function name is spelled with a capital > Stavros> S today, it has probably always been spelled with a > Stavros> capital S. So I doubt this breaks any code. > > Perhaps it dates back to the time when maxima was not case-sensitive. > git log shows quite a few commits documenting the down-casing of many > symbols sometime after maxima became case-sensitive > > -- > Ray > > > ------------------------------------------------------------------------------ > 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 ```

Showing results of 11353

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