From: SourceForge.net <noreply@so...>  20031105 18:57:21

Bugs item #836704, was opened at 20031105 13:56 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: gendiff is all bugs: should be deprecated Initial Comment: The gendiff package only gets the most trivial cases right, and should probably be deprecated until it is fixed. load("gendif") gendiff(x,x,n) => 'diff(x,x,n) which is correct, except that gendiff is supposed to give an explicit form *without* 'diff's. After all, it does it for x^2: genfact(2,n,1)*x^(2n) so why doesn't it give genfact(1,n,1)*x^(1n) in this case? Sure, that's clumsy, but it's explicit.  gendiff((x1)^2,x,n) => 0 (!!) The ratexpand in gendiffpow is presumably supposed to be ratexpand(x1^x2); but though that fix works in this particular case, it doesn't work for sin(x)^2.  q: gendiff(x*(x+1),x,n) => 'DIFF(x,x,n)*'SUM(BINOMIAL(n,I)*'DIFF(x,x,I),I,0,n) which looks very impressive, but is wrong. In particular, subst(0,n,q) => x^2 (!!) and subst(1,n,q) => (x+1) (!!). Correct answers are of course x*(x+1) and 2*x+1.  gendiff(x^x,x,n) => x^(xn)*GENFACT(x,n,1) (!!) but diff(x^x,x,1) => x^x*(log(x)+1) (OK) gendiff is assuming that all powers are free of the differentiation variable. To fix, add a freeof clause in gendiffpow: ...if x1=x <<<and freeof(x,x2)>>> then ...  gendiff is also pretty limited, not even handling sin(x) ===> sin(x+n*%pi/2) sinh(x) ===> (%e^x+(1)^n*%e^x)/2 (also expressible as pure hyperbolics)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 
From: SourceForge.net <noreply@so...>  20031106 21:49:22

Bugs item #836704, was opened at 20031105 19:56 Message generated for change (Comment added) made by wjenkner You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: gendiff is all bugs: should be deprecated Initial Comment: The gendiff package only gets the most trivial cases right, and should probably be deprecated until it is fixed. load("gendif") gendiff(x,x,n) => 'diff(x,x,n) which is correct, except that gendiff is supposed to give an explicit form *without* 'diff's. After all, it does it for x^2: genfact(2,n,1)*x^(2n) so why doesn't it give genfact(1,n,1)*x^(1n) in this case? Sure, that's clumsy, but it's explicit.  gendiff((x1)^2,x,n) => 0 (!!) The ratexpand in gendiffpow is presumably supposed to be ratexpand(x1^x2); but though that fix works in this particular case, it doesn't work for sin(x)^2.  q: gendiff(x*(x+1),x,n) => 'DIFF(x,x,n)*'SUM(BINOMIAL(n,I)*'DIFF(x,x,I),I,0,n) which looks very impressive, but is wrong. In particular, subst(0,n,q) => x^2 (!!) and subst(1,n,q) => (x+1) (!!). Correct answers are of course x*(x+1) and 2*x+1.  gendiff(x^x,x,n) => x^(xn)*GENFACT(x,n,1) (!!) but diff(x^x,x,1) => x^x*(log(x)+1) (OK) gendiff is assuming that all powers are free of the differentiation variable. To fix, add a freeof clause in gendiffpow: ...if x1=x <<<and freeof(x,x2)>>> then ...  gendiff is also pretty limited, not even handling sin(x) ===> sin(x+n*%pi/2) sinh(x) ===> (%e^x+(1)^n*%e^x)/2 (also expressible as pure hyperbolics)  >Comment By: Wolfgang Jenkner (wjenkner) Date: 20031106 22:49 Message: Logged In: YES user_id=581700 > q: gendiff(x*(x+1),x,n) => > 'DIFF(x,x,n)*'SUM(BINOMIAL(n,I)*'DIFF(x,x,I),I,0,n) > > which looks very impressive, but is wrong. Just a case sensitivity bug. Here's a simpler example: (C2) gendiff(x+1,x,k); n d x (D2)  n dx $N is bound to $k but $n, which is passed to the recursive calls to $GENDIFF, is not. I propose to just upcase the whole file. Downcasing would also be possible, but in this case we would probably want to keep the name GENDIFF itself uppercase, such that gendiff(...) and GENDIFF(...) both work. I prefer upcasing also because this way people may spot more easily what changed (most of the file content being uppercase).  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 
From: SourceForge.net <noreply@so...>  20050303 16:13:50

Bugs item #836704, was opened at 20031105 11:56 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: gendiff is all bugs: should be deprecated Initial Comment: The gendiff package only gets the most trivial cases right, and should probably be deprecated until it is fixed. load("gendif") gendiff(x,x,n) => 'diff(x,x,n) which is correct, except that gendiff is supposed to give an explicit form *without* 'diff's. After all, it does it for x^2: genfact(2,n,1)*x^(2n) so why doesn't it give genfact(1,n,1)*x^(1n) in this case? Sure, that's clumsy, but it's explicit.  gendiff((x1)^2,x,n) => 0 (!!) The ratexpand in gendiffpow is presumably supposed to be ratexpand(x1^x2); but though that fix works in this particular case, it doesn't work for sin(x)^2.  q: gendiff(x*(x+1),x,n) => 'DIFF(x,x,n)*'SUM(BINOMIAL(n,I)*'DIFF(x,x,I),I,0,n) which looks very impressive, but is wrong. In particular, subst(0,n,q) => x^2 (!!) and subst(1,n,q) => (x+1) (!!). Correct answers are of course x*(x+1) and 2*x+1.  gendiff(x^x,x,n) => x^(xn)*GENFACT(x,n,1) (!!) but diff(x^x,x,1) => x^x*(log(x)+1) (OK) gendiff is assuming that all powers are free of the differentiation variable. To fix, add a freeof clause in gendiffpow: ...if x1=x <<<and freeof(x,x2)>>> then ...  gendiff is also pretty limited, not even handling sin(x) ===> sin(x+n*%pi/2) sinh(x) ===> (%e^x+(1)^n*%e^x)/2 (also expressible as pure hyperbolics)  >Comment By: Robert Dodier (robert_dodier) Date: 20050303 09:13 Message: Logged In: YES user_id=501686 For the historical record, I'm copying the following bug report from share/calculus/gendif.usg: From "ADK@... 04/12/82 9:04pm": "(1) gendiff(x*(xa),x,j); [...] (2) The answer for the above example involves the silly quantity diff(x,x,i), which is clearly kdelta(i1)+x*kdelta(i) for positive integer values of i. This information should be used by SUM as well." I've verified that in current cvs Maxima, gendiff(x*(xa),x,j) yields an expression involving diff(x,x,i) as noted. I've elided from (1) a report about a bug that has apparently gone away  "This asks ``Is J  I an integer?'', which is hard for the user to answer as I is a system generated dummy summation index (which has, in general, indefinite sign anyhow)." Maxima version: 5.9.1.1cvs Maxima build date: 20:47 3/2/2005 host type: i686redhatlinuxgnu lispimplementationtype: CLISP lispimplementationversion: 2.31 (released 20030901)  Comment By: Wolfgang Jenkner (wjenkner) Date: 20031106 14:49 Message: Logged In: YES user_id=581700 > q: gendiff(x*(x+1),x,n) => > 'DIFF(x,x,n)*'SUM(BINOMIAL(n,I)*'DIFF(x,x,I),I,0,n) > > which looks very impressive, but is wrong. Just a case sensitivity bug. Here's a simpler example: (C2) gendiff(x+1,x,k); n d x (D2)  n dx $N is bound to $k but $n, which is passed to the recursive calls to $GENDIFF, is not. I propose to just upcase the whole file. Downcasing would also be possible, but in this case we would probably want to keep the name GENDIFF itself uppercase, such that gendiff(...) and GENDIFF(...) both work. I prefer upcasing also because this way people may spot more easily what changed (most of the file content being uppercase).  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 
From: SourceForge.net <noreply@so...>  20050303 16:21:46

Bugs item #836704, was opened at 20031105 11:56 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: gendiff is all bugs: should be deprecated Initial Comment: The gendiff package only gets the most trivial cases right, and should probably be deprecated until it is fixed. load("gendif") gendiff(x,x,n) => 'diff(x,x,n) which is correct, except that gendiff is supposed to give an explicit form *without* 'diff's. After all, it does it for x^2: genfact(2,n,1)*x^(2n) so why doesn't it give genfact(1,n,1)*x^(1n) in this case? Sure, that's clumsy, but it's explicit.  gendiff((x1)^2,x,n) => 0 (!!) The ratexpand in gendiffpow is presumably supposed to be ratexpand(x1^x2); but though that fix works in this particular case, it doesn't work for sin(x)^2.  q: gendiff(x*(x+1),x,n) => 'DIFF(x,x,n)*'SUM(BINOMIAL(n,I)*'DIFF(x,x,I),I,0,n) which looks very impressive, but is wrong. In particular, subst(0,n,q) => x^2 (!!) and subst(1,n,q) => (x+1) (!!). Correct answers are of course x*(x+1) and 2*x+1.  gendiff(x^x,x,n) => x^(xn)*GENFACT(x,n,1) (!!) but diff(x^x,x,1) => x^x*(log(x)+1) (OK) gendiff is assuming that all powers are free of the differentiation variable. To fix, add a freeof clause in gendiffpow: ...if x1=x <<<and freeof(x,x2)>>> then ...  gendiff is also pretty limited, not even handling sin(x) ===> sin(x+n*%pi/2) sinh(x) ===> (%e^x+(1)^n*%e^x)/2 (also expressible as pure hyperbolics)  >Comment By: Robert Dodier (robert_dodier) Date: 20050303 09:21 Message: Logged In: YES user_id=501686 I've commented out the description of gendiff in doc/info/Differentiation.texi pending resolution of this bug report.  Comment By: Robert Dodier (robert_dodier) Date: 20050303 09:13 Message: Logged In: YES user_id=501686 For the historical record, I'm copying the following bug report from share/calculus/gendif.usg: From "ADK@... 04/12/82 9:04pm": "(1) gendiff(x*(xa),x,j); [...] (2) The answer for the above example involves the silly quantity diff(x,x,i), which is clearly kdelta(i1)+x*kdelta(i) for positive integer values of i. This information should be used by SUM as well." I've verified that in current cvs Maxima, gendiff(x*(xa),x,j) yields an expression involving diff(x,x,i) as noted. I've elided from (1) a report about a bug that has apparently gone away  "This asks ``Is J  I an integer?'', which is hard for the user to answer as I is a system generated dummy summation index (which has, in general, indefinite sign anyhow)." Maxima version: 5.9.1.1cvs Maxima build date: 20:47 3/2/2005 host type: i686redhatlinuxgnu lispimplementationtype: CLISP lispimplementationversion: 2.31 (released 20030901)  Comment By: Wolfgang Jenkner (wjenkner) Date: 20031106 14:49 Message: Logged In: YES user_id=581700 > q: gendiff(x*(x+1),x,n) => > 'DIFF(x,x,n)*'SUM(BINOMIAL(n,I)*'DIFF(x,x,I),I,0,n) > > which looks very impressive, but is wrong. Just a case sensitivity bug. Here's a simpler example: (C2) gendiff(x+1,x,k); n d x (D2)  n dx $N is bound to $k but $n, which is passed to the recursive calls to $GENDIFF, is not. I propose to just upcase the whole file. Downcasing would also be possible, but in this case we would probably want to keep the name GENDIFF itself uppercase, such that gendiff(...) and GENDIFF(...) both work. I prefer upcasing also because this way people may spot more easily what changed (most of the file content being uppercase).  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=836704&group_id=4933 