## reduce-algebra-developers — Discussion of development, administration and support for Reduce

You can subscribe to this list here.

 2009 2010 2011 2012 2013 2014 2015 Jan (2) Feb (5) Mar Apr May (2) Jun (8) Jul (4) Aug Sep Oct (2) Nov (6) Dec Jan (1) Feb (1) Mar (3) Apr (2) May (2) Jun (2) Jul (18) Aug (13) Sep (7) Oct Nov Dec (2) Jan Feb (11) Mar Apr (4) May Jun (1) Jul (18) Aug (16) Sep (12) Oct (12) Nov (19) Dec (42) Jan (16) Feb (3) Mar (8) Apr (14) May (30) Jun (5) Jul (7) Aug (3) Sep (10) Oct (4) Nov (10) Dec (1) Jan (14) Feb (8) Mar (5) Apr (3) May (9) Jun (19) Jul Aug (27) Sep (5) Oct (18) Nov (12) Dec (8) Jan (5) Feb (8) Mar (20) Apr (22) May (28) Jun (9) Jul (6) Aug (46) Sep (40) Oct (15) Nov (8) Dec (34) Jan (20) Feb (15) Mar (18) Apr (20) May (3) Jun (13) Jul Aug Sep Oct Nov Dec
S M T W T F S

1

2

3

4

5

6

7

8

9

10

11

12

13

14
(1)
15
(4)
16
(1)
17

18

19

20

21

22

23
(1)
24

25

26

27

28

29

30
(2)
31

Showing 4 results of 4

 Re: [Reduce-algebra-developers] problem with depend that seems erroneous From: Rainer Schöpf - 2013-05-15 19:27:52 ```On Wed, 15 May 2013 at 08:10 +0930, Tony Roberts wrote: > the following code causes me grief with derivatives and dependencies, > and looks like an error that needs fixing. > operator x; operator pp; > % for j:=1:2 do depend pp,x(j); % why is this not needed? > let df(pp,x(~j))=>pp(j); > thisIsOK:=df(pp^2,x(1)); > shouldBeZero:=df(pp^2,t); > end; > > On my Reduce it generates > thisisok := 2*pp(1)*pp > shouldbezero := 2*df(pp,t)*pp > and the second is certainly not what I want, and causes me grief. > Further, why is the "depend pp,x(j)" statement not needed? When you add a rule for differentiation, a suitable dependency is added automatically, ie. let df(pp,x) => something; effectively adds depend pp,x; The exception is the case of differentiation w.r.t. a free variable, eg., let df(pp,~y) => x(y); since a dependency on a free variable doesn't make sense. What happens here is that your rule defines differentation w.r.t. an expression containing a free variable. Unfortunately, this general case is not checked, and you end up with a dependency of pp on x(~j). Now, when you enter df(pp,t); Reduce checks whether x depends on t; if that happens to be the case, the correct answer would either be df(pp,t); (if the switch expanddf is off), or df(pp,x)*df(x,t); if the switch expanddf is on. In your case it checks whether x(~j) depends on t. A free variable may be replaced by an arbitrary expression, and therefore x(~j) is treated as being dependent on anything. I'll test a correction in the next few days. Rainer ```
 Re: [Reduce-algebra-developers] problem with depend that seems erroneous/2 From: Jarmo Hietarinta - 2013-05-15 07:46:40 ```Continuing with the previous dependency comment, the following is (probably) not desirable either: Reduce (Free CSL version), 14-Apr-11 ... 1: depend pp,x; 2: df(pp,x)*pp; df(pp,x)*pp 3: df(ws,pp); df(pp,x,pp)*pp + df(pp,x) What value, other than zero, could df(pp,x,pp) have? regards, Jarmo ---------------------------------------------------------------------------------- Prof. Jarmo Hietarinta Department of Physics and Astronomy University of Turku, FIN-20014 Turku, Finland mobile: +358-40-722 5685 ---------------------------------------------------------------------------------- ________________________________________ Lähettäjä: Tony Roberts [anthony.roberts@...] Lähetetty: 15. toukokuuta 2013 1:40 Vastaanottaja: reduce-algebra-developers@... Aihe: [Reduce-algebra-developers] problem with depend that seems erroneous -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, the following code causes me grief with derivatives and dependencies, and looks like an error that needs fixing. operator x; operator pp; % for j:=1:2 do depend pp,x(j); % why is this not needed? let df(pp,x(~j))=>pp(j); thisIsOK:=df(pp^2,x(1)); shouldBeZero:=df(pp^2,t); end; On my Reduce it generates thisisok := 2*pp(1)*pp shouldbezero := 2*df(pp,t)*pp and the second is certainly not what I want, and causes me grief. Further, why is the "depend pp,x(j)" statement not needed? I have reduce running as pslbuild/x86_64-mac_10.6_snowleopard-darwin10.6.0/red/reduce.img Reduce (Free PSL version), 6-Jan-2012 ... Tony - -- - --------------------------------------------------------------------- Professor A.J. Roberts School of Mathematical Sciences phone: +61 8 8313 3035 University of Adelaide fax: +61 8 8313 3696 South Australia 5005. mailto:anthony.roberts@... http://www.maths.adelaide.edu.au/anthony.roberts/ ==.0000001000000100000110001000011010001111110010111011101000010000== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlGSvVEACgkQ7TX8dTbro1ukCgCdEloE0FuAtTgQ1OYqk+/abK/l me4AmwbNXKONPKA9TeUEA7GtuDdo35Ha =nzmO -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Reduce-algebra-developers mailing list Reduce-algebra-developers@... https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers ```
 Re: [Reduce-algebra-developers] rootfind in algebraic mode From: Arthur Norman - 2013-05-15 07:38:25 ```On Wed, 15 May 2013, Άλκης Ακρίτας wrote: > We would like to use the function rootfind in algebra mode. > > rootfind takes two arguments: a polynomial with coefficients in bfloat, and an interval. > > We do the following which does NOT work : > > load_package roots; > load_package roots2; > symbolic operator rf; > symbolic procedure rf(p,l,r); > rootfind( gffinit !*q2f simp p, cons(cons (num l,den l),cons(num r,den r))); > > Could someone help us? > > Thank you, Alkis Akritas > You merely say "does not work" without explaining what diagnostic you had or giving a test case. So I tried going "tr rf, gffinit, rootfind;" and "on backtrace;" and then tried what I hoped was the sort of example you had in mind.... amd observe that "num '(!:rd!: . 2.0)" yields (!*sq ((!:rd!: . 2.0) . 1) t) which might not have been what you were looking for there? But before I look further can you confirm that what I exhibit here is related to the case that is bugging you? Arthur rf(x^2-2.0, 1.0, 2.0); Entering rf (3 args) Arg1: (plus (expt x 2) (minus (!:rd!: . 2.0))) Arg2: 1 Arg3: (!:rd!: . 2.0) Entering gffinit (1 arg) Arg1: (((x . 2) . 1) !:rd!: . -2.0) gffinit = ((0 !:rd!: -1 . 1) (2 !:rd!: 1 . 0)) Entering rootfind (2 args) Arg1: ((0 !:rd!: -1 . 1) (2 !:rd!: 1 . 0)) Arg2: ((1 . 1) (!*sq ((!:rd!: . 2.0) . 1) t) . 1) +++ Error: bad arg for plus (!*sq ((!:rd!: . 2.0) . 1) t) Inside: ratplusm Arg1: (1 . 1) Arg2: ((!*sq ((!:rd!: . 2.0) . 1) t) . 1) Arg3: t Inside: rootfind Arg1: ((0 !:rd!: -1 . 1) (2 !:rd!: 1 . 0)) Arg2: ((1 . 1) (!*sq ((!:rd!: . 2.0) . 1) t) . 1) ```
 [Reduce-algebra-developers] rootfind in algebraic mode From: Άλκης Ακρίτας - 2013-05-15 06:58:44 ```We would like to use the function rootfind in algebra mode. rootfind takes two arguments: a polynomial with coefficients in bfloat, and an interval. We do the following which does NOT work : load_package roots; load_package roots2; symbolic operator rf; symbolic procedure rf(p,l,r); rootfind( gffinit !*q2f simp p, cons(cons (num l,den l),cons(num r,den r))); Could someone help us? Thank you, Alkis Akritas ```

Showing 4 results of 4