From: Barton W. <wi...@un...> - 2023-10-28 21:23:33
|
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$> |