From: Richard F. <fa...@gm...> - 2023-10-28 22:07:57
|
radcan( a^k*b^k -(a*b)^k) ; radcan( a^k*b^k + a^k*c^k - a^k*(b^k+c^k)); both return 0. radcan makes certain assumptions about branches. The assumptions might, as Barton points out, be wrong. On Sat, Oct 28, 2023 at 5:23 PM Barton Willis via Maxima-discuss < max...@li...> wrote: > > If maxima can determine that a & b are positive, expand converts (a*b)^k > t0 a^k * b^k. Alternatively, if > k is a declared integer, expand converts (a*b)^k t0 a^k * b^k. But other > than that, I don't know of a function that does this transformation. You > could write a few lines of code that does this. > > (%i1) xxx : (a*b)^k$ > > (%i2) expand(xxx); > (%o2) (a*b)^k > > (%i3) assume(a>0,b>0)$ > > (%i4) expand(xxx); > (%o4) a^k*b^k > > And of course (removing all assumptions) we need to be careful > > (%i28) zzz : (a*b)^k / (a^k * b^k); > (%o28) (a*b)^k/(a^k*b^k) > > (%i29) rectform(subst([a=-1,b=-1, k = 1/2],zzz)); > (%o29) -1 > > --Barton > ------------------------------ > *From:* Eduardo Ochs <edu...@gm...> > *Sent:* Saturday, October 28, 2023 14:33 > *To:* <max...@li...> < > max...@li...> > *Subject:* [Maxima-discuss] is(somefunction((a*b)^k=a^k*b^k)) -> true > > Non-NU Email > ------------------------------ > Hi list, > > is there a function that simplifies, or expands, (a*b)^k to a^k*b^k? > I've tried this, > > o1 : a^k*b^k = (a*b)^k; > o2 : a^k*b^k + a^k*c^k = a^k*(b^k+c^k); > is(o1); /* false */ > is(o2); /* false */ > is(ratsimp(o1)); /* false */ > is(ratsimp(o2)); /* true */ > is(ratexpand(o1)); /* false */ > is(ratexpand(o2)); /* true */ > > I've also tried "is(somefunction(o1))" for all somefunctions in: > > (info "(maxima)Functions and Variables for Polynomials") > > https://maxima.sourceforge.io/docs/manual/maxima_80.html#Functions-and-Variables-for-Polynomials-1 > <https://urldefense.com/v3/__https://maxima.sourceforge.io/docs/manual/maxima_80.html*Functions-and-Variables-for-Polynomials-1__;Iw!!PvXuogZ4sRB2p-tU!AEVcDbKf-Ba6aW0lje3nge2ADs5p-9fCnCTVqtJApTcnpy7NNUWwR_WJlLpalxodhvEmClT6VbPFGNXv5mA$> > > and I couldn't find anything that makes is(somefunction(o1)) return > true... > > Thanks in advance - and I hope I haven't committed any typos in my > tests... > Eduardo Ochs > http://anggtwu.net/eev-maxima.html > <https://urldefense.com/v3/__http://anggtwu.net/eev-maxima.html__;!!PvXuogZ4sRB2p-tU!AEVcDbKf-Ba6aW0lje3nge2ADs5p-9fCnCTVqtJApTcnpy7NNUWwR_WJlLpalxodhvEmClT6VbPFBHg0xdY$> > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |