Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Maxima-bugs] [ maxima-Bugs-861887 ] Simplifying (a*t+a)^q/(b*t+b)^r

 [Maxima-bugs] [ maxima-Bugs-861887 ] Simplifying (a*t+a)^q/(b*t+b)^r From: SourceForge.net - 2003-12-17 19:57:34 ```Bugs item #861887, was opened at 2003-12-17 14:57 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=861887&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: Simplifying (a*t+a)^q/(b*t+b)^r Initial Comment: This report ties together the discussion of several other bug reports. Fixing the individual bugs reported separately will be a good thing, but it will also be good to keep the big picture in mind, and make sure that all these cases are handled properly by the system. It has been rather frustrating trying to simplify what are, after all, rather simple cases. --------------------- Consider rad(a,b,q,r):= (a*t+a)^q/(b*t+b)^r This is obviously equivalent to a^q/b^r * (t+1)^(q-r). In Maxima, when a and b are equal, this simplifies nicely and automatically: rad(5,5,q,r) => (5*t+5)^(q-r) However, when a and b are not equal (e.g. a=1 and b=- 1), simplification is not automatic. So far, so good -- default simplification isn't supposed to perform GCD's; it doesn't even simplify rad(a,b,1,1) to a/b. So what functions should we use to simplify? I can think of four: ratsimp, factor, rootscontract, and radcan. (In all that follows, I have gcd:'spmod and algebraic:true.) Ratsimp has the annoying (but expected) property of expanding out: ratsimp(rad(1,-1,3,7)) => -1/(t^4+4*t^3+6*t^2+4*t+1) and still doesn't reduce to simplest form for fractional exponents: ratsimp(rad(1,-1,1/2,2)) => SQRT(t+1)/(t^2+2*t+1) Rootscontract/rootconmode:all sometimes works well: rootall(ex):=block([rootsconmode:all],rootscontract (ex))\$ rootall(rad(1,-1,3/7,2/5)) => (t + 1)^(1/35) but other times has an annoying tendency to expand unnecessarily: rootall(rad(1,-1,7/13,3/11)) => (-t^38-38*t^37-703*t^36-......)^(1/143) instead of -(t+1)^(38/143) (reported as bug 861870) It also does not work at all when either p or q is an integer: rootall(rad(1,-1,1/2,1)) => SQRT(t+1)/(-t-1) Factor is sometimes useful: factor(rad(1,2,2/3,1/3)) => (t+1)^(1/3)/2^(1/3) scanmap/factor is sometimes better, but both fail sometimes, too: factor(rad(1,-1,100,300/7)) => (t+1)^58/(-t-1)^(6/7) (see bugs 861827 and 861880) scanmap/factor sometimes helps, but not in this case. None of these approaches alone simplifies rad(1,- 1,9/2,3/2) to %i*(t+1)^3, though factor(radcan(...)) does, as does rectform(...). Consider also map(radcan, [1/SQRT(t+1),SQRT(-t-1)/(t+1),SQRT (t+1)/(-t-1),1/SQRT(-t-1)]) The most surprising difference is in the treatment of rad (1,-1,1/2,1) and rad(-1,1,1/2,1). Ratsimp, Factor, and Radcan all correctly handle rad(1,-1,...), and all fail on rad(-1,1,...). On the other hand, they work identically on rad(2,3,...) and rad(3,2,...). Apparently they are "uncomfortable" with pulling out %I. The only way I have found to simplify rad(-1,1,1/2,1) and rad(1,-1,1,1/2) -- that is, where the term with the square root is negative -- is to first use rectform, e.g. factor(rectform(rad(-1,1,1/2,1))) -- but that only works if you respond that t+1 is positive. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=861887&group_id=4933 ```

 [Maxima-bugs] [ maxima-Bugs-861887 ] Simplifying (a*t+a)^q/(b*t+b)^r From: SourceForge.net - 2003-12-17 19:57:34 ```Bugs item #861887, was opened at 2003-12-17 14:57 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=861887&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: Simplifying (a*t+a)^q/(b*t+b)^r Initial Comment: This report ties together the discussion of several other bug reports. Fixing the individual bugs reported separately will be a good thing, but it will also be good to keep the big picture in mind, and make sure that all these cases are handled properly by the system. It has been rather frustrating trying to simplify what are, after all, rather simple cases. --------------------- Consider rad(a,b,q,r):= (a*t+a)^q/(b*t+b)^r This is obviously equivalent to a^q/b^r * (t+1)^(q-r). In Maxima, when a and b are equal, this simplifies nicely and automatically: rad(5,5,q,r) => (5*t+5)^(q-r) However, when a and b are not equal (e.g. a=1 and b=- 1), simplification is not automatic. So far, so good -- default simplification isn't supposed to perform GCD's; it doesn't even simplify rad(a,b,1,1) to a/b. So what functions should we use to simplify? I can think of four: ratsimp, factor, rootscontract, and radcan. (In all that follows, I have gcd:'spmod and algebraic:true.) Ratsimp has the annoying (but expected) property of expanding out: ratsimp(rad(1,-1,3,7)) => -1/(t^4+4*t^3+6*t^2+4*t+1) and still doesn't reduce to simplest form for fractional exponents: ratsimp(rad(1,-1,1/2,2)) => SQRT(t+1)/(t^2+2*t+1) Rootscontract/rootconmode:all sometimes works well: rootall(ex):=block([rootsconmode:all],rootscontract (ex))\$ rootall(rad(1,-1,3/7,2/5)) => (t + 1)^(1/35) but other times has an annoying tendency to expand unnecessarily: rootall(rad(1,-1,7/13,3/11)) => (-t^38-38*t^37-703*t^36-......)^(1/143) instead of -(t+1)^(38/143) (reported as bug 861870) It also does not work at all when either p or q is an integer: rootall(rad(1,-1,1/2,1)) => SQRT(t+1)/(-t-1) Factor is sometimes useful: factor(rad(1,2,2/3,1/3)) => (t+1)^(1/3)/2^(1/3) scanmap/factor is sometimes better, but both fail sometimes, too: factor(rad(1,-1,100,300/7)) => (t+1)^58/(-t-1)^(6/7) (see bugs 861827 and 861880) scanmap/factor sometimes helps, but not in this case. None of these approaches alone simplifies rad(1,- 1,9/2,3/2) to %i*(t+1)^3, though factor(radcan(...)) does, as does rectform(...). Consider also map(radcan, [1/SQRT(t+1),SQRT(-t-1)/(t+1),SQRT (t+1)/(-t-1),1/SQRT(-t-1)]) The most surprising difference is in the treatment of rad (1,-1,1/2,1) and rad(-1,1,1/2,1). Ratsimp, Factor, and Radcan all correctly handle rad(1,-1,...), and all fail on rad(-1,1,...). On the other hand, they work identically on rad(2,3,...) and rad(3,2,...). Apparently they are "uncomfortable" with pulling out %I. The only way I have found to simplify rad(-1,1,1/2,1) and rad(1,-1,1,1/2) -- that is, where the term with the square root is negative -- is to first use rectform, e.g. factor(rectform(rad(-1,1,1/2,1))) -- but that only works if you respond that t+1 is positive. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=861887&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-861887 ] Simplifying (a*t+a)^q/(b*t+b)^r From: SourceForge.net - 2006-07-19 04:25:53 ```Bugs item #861887, was opened at 2003-12-17 12:57 Message generated for change (Settings changed) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=861887&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: Simplifying (a*t+a)^q/(b*t+b)^r Initial Comment: This report ties together the discussion of several other bug reports. Fixing the individual bugs reported separately will be a good thing, but it will also be good to keep the big picture in mind, and make sure that all these cases are handled properly by the system. It has been rather frustrating trying to simplify what are, after all, rather simple cases. --------------------- Consider rad(a,b,q,r):= (a*t+a)^q/(b*t+b)^r This is obviously equivalent to a^q/b^r * (t+1)^(q-r). In Maxima, when a and b are equal, this simplifies nicely and automatically: rad(5,5,q,r) => (5*t+5)^(q-r) However, when a and b are not equal (e.g. a=1 and b=- 1), simplification is not automatic. So far, so good -- default simplification isn't supposed to perform GCD's; it doesn't even simplify rad(a,b,1,1) to a/b. So what functions should we use to simplify? I can think of four: ratsimp, factor, rootscontract, and radcan. (In all that follows, I have gcd:'spmod and algebraic:true.) Ratsimp has the annoying (but expected) property of expanding out: ratsimp(rad(1,-1,3,7)) => -1/(t^4+4*t^3+6*t^2+4*t+1) and still doesn't reduce to simplest form for fractional exponents: ratsimp(rad(1,-1,1/2,2)) => SQRT(t+1)/(t^2+2*t+1) Rootscontract/rootconmode:all sometimes works well: rootall(ex):=block([rootsconmode:all],rootscontract (ex))\$ rootall(rad(1,-1,3/7,2/5)) => (t + 1)^(1/35) but other times has an annoying tendency to expand unnecessarily: rootall(rad(1,-1,7/13,3/11)) => (-t^38-38*t^37-703*t^36-......)^(1/143) instead of -(t+1)^(38/143) (reported as bug 861870) It also does not work at all when either p or q is an integer: rootall(rad(1,-1,1/2,1)) => SQRT(t+1)/(-t-1) Factor is sometimes useful: factor(rad(1,2,2/3,1/3)) => (t+1)^(1/3)/2^(1/3) scanmap/factor is sometimes better, but both fail sometimes, too: factor(rad(1,-1,100,300/7)) => (t+1)^58/(-t-1)^(6/7) (see bugs 861827 and 861880) scanmap/factor sometimes helps, but not in this case. None of these approaches alone simplifies rad(1,- 1,9/2,3/2) to %i*(t+1)^3, though factor(radcan(...)) does, as does rectform(...). Consider also map(radcan, [1/SQRT(t+1),SQRT(-t-1)/(t+1),SQRT (t+1)/(-t-1),1/SQRT(-t-1)]) The most surprising difference is in the treatment of rad (1,-1,1/2,1) and rad(-1,1,1/2,1). Ratsimp, Factor, and Radcan all correctly handle rad(1,-1,...), and all fail on rad(-1,1,...). On the other hand, they work identically on rad(2,3,...) and rad(3,2,...). Apparently they are "uncomfortable" with pulling out %I. The only way I have found to simplify rad(-1,1,1/2,1) and rad(1,-1,1,1/2) -- that is, where the term with the square root is negative -- is to first use rectform, e.g. factor(rectform(rad(-1,1,1/2,1))) -- but that only works if you respond that t+1 is positive. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-01-13 00:44 Message: Logged In: NO You may try this: ex2:(a*t+a)^q/(b*t+b)^r; ratsubst(z, t+1, %); radcan(%); subst(t + 1, z, %); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=861887&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-861887 ] Simplifying (a*t+a)^q/(b*t+b)^r From: SourceForge.net - 2006-09-09 05:38:48 ```Bugs item #861887, was opened at 2003-12-17 12:57 Message generated for change (Settings changed) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=861887&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Lisp Core - Simplification Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: Simplifying (a*t+a)^q/(b*t+b)^r Initial Comment: This report ties together the discussion of several other bug reports. Fixing the individual bugs reported separately will be a good thing, but it will also be good to keep the big picture in mind, and make sure that all these cases are handled properly by the system. It has been rather frustrating trying to simplify what are, after all, rather simple cases. --------------------- Consider rad(a,b,q,r):= (a*t+a)^q/(b*t+b)^r This is obviously equivalent to a^q/b^r * (t+1)^(q-r). In Maxima, when a and b are equal, this simplifies nicely and automatically: rad(5,5,q,r) => (5*t+5)^(q-r) However, when a and b are not equal (e.g. a=1 and b=- 1), simplification is not automatic. So far, so good -- default simplification isn't supposed to perform GCD's; it doesn't even simplify rad(a,b,1,1) to a/b. So what functions should we use to simplify? I can think of four: ratsimp, factor, rootscontract, and radcan. (In all that follows, I have gcd:'spmod and algebraic:true.) Ratsimp has the annoying (but expected) property of expanding out: ratsimp(rad(1,-1,3,7)) => -1/(t^4+4*t^3+6*t^2+4*t+1) and still doesn't reduce to simplest form for fractional exponents: ratsimp(rad(1,-1,1/2,2)) => SQRT(t+1)/(t^2+2*t+1) Rootscontract/rootconmode:all sometimes works well: rootall(ex):=block([rootsconmode:all],rootscontract (ex))\$ rootall(rad(1,-1,3/7,2/5)) => (t + 1)^(1/35) but other times has an annoying tendency to expand unnecessarily: rootall(rad(1,-1,7/13,3/11)) => (-t^38-38*t^37-703*t^36-......)^(1/143) instead of -(t+1)^(38/143) (reported as bug 861870) It also does not work at all when either p or q is an integer: rootall(rad(1,-1,1/2,1)) => SQRT(t+1)/(-t-1) Factor is sometimes useful: factor(rad(1,2,2/3,1/3)) => (t+1)^(1/3)/2^(1/3) scanmap/factor is sometimes better, but both fail sometimes, too: factor(rad(1,-1,100,300/7)) => (t+1)^58/(-t-1)^(6/7) (see bugs 861827 and 861880) scanmap/factor sometimes helps, but not in this case. None of these approaches alone simplifies rad(1,- 1,9/2,3/2) to %i*(t+1)^3, though factor(radcan(...)) does, as does rectform(...). Consider also map(radcan, [1/SQRT(t+1),SQRT(-t-1)/(t+1),SQRT (t+1)/(-t-1),1/SQRT(-t-1)]) The most surprising difference is in the treatment of rad (1,-1,1/2,1) and rad(-1,1,1/2,1). Ratsimp, Factor, and Radcan all correctly handle rad(1,-1,...), and all fail on rad(-1,1,...). On the other hand, they work identically on rad(2,3,...) and rad(3,2,...). Apparently they are "uncomfortable" with pulling out %I. The only way I have found to simplify rad(-1,1,1/2,1) and rad(1,-1,1,1/2) -- that is, where the term with the square root is negative -- is to first use rectform, e.g. factor(rectform(rad(-1,1,1/2,1))) -- but that only works if you respond that t+1 is positive. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-01-13 00:44 Message: Logged In: NO You may try this: ex2:(a*t+a)^q/(b*t+b)^r; ratsubst(z, t+1, %); radcan(%); subst(t + 1, z, %); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=861887&group_id=4933 ```