From: Mike V. <mic...@gm...> - 2015-09-16 20:15:37
|
Hello all, I was wondering a few things in general and their applications to Maxima. Disclaimer, I'm still using Maxima 5.36.0, for reasons I'm not so sure myself. In general, is it canonical (providing a 1 to 1 mapping of expressions to their meanings) to write all exponentials as: base^(exponent expression) --> exp(log(base) * (exponent expression))? Converting back ("simplifying") can be ambiguous: exp(log(a) * log(b)) --> a^log(b) or b^log(a)? There are times when I want the "canonical form", but I am not certain if it is truly a canonical form. If it is, should the procedure to convert it be as simple as exponentiating the log of the base multiplied by the original exponent? I want to be careful is all. This seems to work on all branches; consider a base of negative 1. (-1)^x --> exp( log(-1) * x) --> exp( %i * %pi * (1 + 2*n) * x ) where n is an arbitrary integer I think converting to this form will in general cause all multiplication of power/exponentials to collapse into a single exp(sum of individual log(bases)). I am trying to improve the automatic simplification of a product of powers: a^x * b^x --> exp((log(a)+log(b))*x) --> ONLY IF x is real? --> exp(log(a*b)*x) A quick numerical check shows: (%i1) float(rectform( exp((log(-1) + log(-2)) * x))), x=%i; (%i2) float(rectform( exp((log(-1 * -2)) * x))), x=%i; (%o1) 0.001193223591294758*%i+0.001436509595299189 (%o2) 0.6389612763136348*%i +0.7692389013639721 I get a similar discrepancy using x=2*%i*%pi. So a real argument appears at least necessary. In Maxima 5.36.0: (%i3) radcan((-1)^x * (-a)^x); (%o3) (-a)^x * (-1)^x; (%i4) declare(x, real)$ (%i5) radcan((-1)^x * (-a)^x); (%o5) (-a)^x * (-1)^x; (%i6) is(equal(radcan(exp((log(-1) + log(-2))*x) - exp(log(-1*-2)*x)),0)); (%o6) unknown; (%i7) load(to_poly_solve)$ (%i8) %solve(exp((log(-1) + log(-2))*x) - exp(log(-1*-2)*x) = 0, x); (%o8) %union([x=%c5]) Something here feels wrong. %Solve says any complex number works. Rectform shows different results. I think I trust %solve's answer more than the float(rectform()) answer since %solve tends to work with all branches and I think the call to float is causing something stupid to happen. Possibly I misused is(equal()). Anyway, I just wanted to know what the community thinks of yet another canonical form, if it is even that. Would this even be a valuable addition to Maxima? |