From: Richard F. <fa...@gm...> - 2015-09-17 15:01:43
|
1. If you wish to say that log(-1) is There exists an integer n %i*%pi*(1+2*n), then try to work with it, you will have some difficulties. For example log(-1) - log(-1) is not zero. It is something like There exist two integers n1, n2. %i%pi*2*(n1-n2) So your are not even talking about sets, but about logical statements. "An unspecified integer n" is not a canonical simplified form among algebraic expressions. 2. There are many texts on "functions of a complex variable" that discuss branch cuts and such. There are a few papers (I wrote one with Adam Dingle) on computing with branch cuts with computer algebra systems. There is also a great set of books by Peter Henrici on Applied and Computational Complex Analysis. Which are readable and would probably answer all your current, and many of your future questions in this area. On Wed, Sep 16, 2015 at 9:26 PM, Mike Valenzuela <mic...@gm...> wrote: > I may be mistaken but I always thought log(-1) = %i * %pi * (1 + 2*n). > > If you want to discuss what is log(-1) - log(-1), we need a more precise > sense than what standard numbers allow us. I say log(-1) - log(-1) can > be interpreted in two different ways: > > log(x) - log(x), as x-->-1 along a specific trajectory. > log(y) - log(x), as x-->-1 along a different trajectory than y-->-1 > > I believe this leads to a similar argument why 0^0 is treated as > undefined, it depends on how you got there. > > I'm not even sure if that is precise enough. I rarely have to worry about > the complex domain since a lot of machine learning focuses primarily on the > real domain. > > On Wed, Sep 16, 2015 at 9:07 PM, Richard Fateman <fa...@be...> > wrote: > >> I think your question boils down to asking Maxima when >> is it the case that 2^x = (-1)^x*(-2)^x. >> >> I haven't thought about this in a while, but I think the answer >> is roughly for all x in the complex plane that lies between two >> infinite spirals. >> It seems to me that you are trying to get a definite answer to >> questions that, from a mathematical perspective are ill posed. >> Like what is, after all log(-1)? There are many possible answers, >> and which one is appropriate depends on something else. >> >> The fact that Reduce in Mathematica takes so much source >> code in C ! suggests to me that "the Mathematica Language" >> which Wolfram modestly calls "Wolfram", is not so good for >> writing mathematical code. >> >> Is Reduce "too hard" to program, in some sense? >> Eh, the fact that it was botched in version after version >> is somewhat supportive evidence. The fact that it is >> alleged to be many lines of code, not so convincing. >> >> RJF >> >> >> >> >> >> On 9/16/2015 8:36 PM, Mike Valenzuela wrote: >> >> Thank you RFJ, >> >> However, is the following result problematic? >> >> (%i7) load(to_poly_solve)$ >> (%i8) %solve(exp((log(-1) + log(-2))*x) - exp(log(-1*-2)*x) = 0, x); >> (%o8) %union([x=%c5]) >> >> This seems to suggest that exp((log(-1) + log(-2))*x) >> = exp(log(-1*-2)*x) = 0, x), even if "x" is complex. In my previous >> example, I used "a" and "b". I repeated the experiment with: >> >> (%i1): %solve(exp((log(a)+log(b))*x) - exp(log(a*b)*x)=0,x); >> (%o1): %union([x=%c1]) >> >> You said this kind of simplification is deadly unless you do not believe >> in complex numbers. %solve thinks this is true for any complex "x." Is this >> a bug in 5.36.0 branch of %solve? >> >> >> And as far as Reduce goes. I heard that Mathematica's reduce is 350 pages >> of mathematica code + 1400 pages of C code ( >> http://mathematica.stackexchange.com/questions/17127/what-is-the-difference-between-reduce-and-solve). >> I doubt I'd be able to implement something like that. I've tried using >> qepcad too, but documentation is so awful that their examples don't run. I >> cannot emulate anything calling for _root_1 of whatever. >> >> On Wed, Sep 16, 2015 at 2:42 PM, Richard Fateman <fa...@be...> >> wrote: >> >>> On 9/16/2015 1:15 PM, Mike Valenzuela wrote: >>> >>> 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))? >>> >>> >>> No. %e^(2*%pi*i + x) = %e^(x). >>> >>> >>> Converting back ("simplifying") can be ambiguous: >>> exp(log(a) * log(b)) --> a^log(b) or b^log(a)? >>> >>> that's true, too. >>> >>> >>> There are times when I want the "canonical form", but I am not certain >>> if it is truly a canonical form. >>> >>> It isn't. >>> >>> 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 >>> >>> So it is already not canonical. if one expression has n1 the second >>> has n2 if you add them do you get n3? >>> >>> >>> >>> 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)). >>> >>> >>> Only if you have a way of collapsing constants, which you don't. >>> >>> 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) >>> >>> no, it requires that you don't believe in complex numbers. >>> Sort of like sqrt(9) =3, which requires that you don't believe in >>> negative numbers. >>> >>> So this kind of simplification is deadly. >>> >>> >>> 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; >>> >>> >>> Radcan doesn't look at declarations or assumptions. And it does >>> transformations >>> that are self-consistent, but may not agree with your requirements. >>> >>> (%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? >>> >>> 1. It's definitely not canonical >>> 2. If you want a list of things to do that might be valuable, this would >>> not be near the top of (my) list. There are piles of features you >>> can find in Mathematica that are not in Maxima. One of them >>> is called Reduce. Sort of like Solve.. >>> RJF >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog! >>> Get real-time metrics from all of your servers, apps and tools >>> in one place. >>> SourceForge users - Click here to start your Free Trial of Datadog now!http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 >>> >>> >>> >>> _______________________________________________ >>> Maxima-discuss mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/maxima-discuss >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog! >>> Get real-time metrics from all of your servers, apps and tools >>> in one place. >>> SourceForge users - Click here to start your Free Trial of Datadog now! >>> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 >>> _______________________________________________ >>> Maxima-discuss mailing list >>> Max...@li... >>> https://lists.sourceforge.net/lists/listinfo/maxima-discuss >>> >>> >> >> > |