[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
Other opinions? If everybody agrees, I will open a ticket. Please do! Thanks! here is the corresponding ticket: http://trac.sagemath.org/ticket/17412 -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
On 11/23/2014 09:01 PM, Chris Seberino wrote: On Wednesday, November 19, 2014 8:48:07 AM UTC-6, Jakob Kroeker wrote: Even if it is expectable that in some cases (which?) solve may not return all solutions, it should be explicitly pointed out; Especially it should be stated that an empty list does not necessarily imply there are no solutions. Yes! Actually adding something like the following would be an improvement if (answer == []) and not_sure_there_are_no_solutions: print question else: print answer I heard Emmanuel's warning that the not_sure_there_are_no_solutions boolean may be hard to calculate in some cases. In my opinion, not_sure_there_are_no_solutions should default to True unless it is a case where we can with certaintly set not_sure_there_are_no_solutions = False. Other opinions? If everybody agrees, I will open a ticket. Please do! Thanks! In general people don't like double negatives :) How about solution(s) not found -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
On Wednesday, November 19, 2014 8:48:07 AM UTC-6, Jakob Kroeker wrote: Even if it is expectable that in some cases (which?) solve may not return all solutions, it should be explicitly pointed out; Especially it should be stated that an empty list does not necessarily imply there are no solutions. Yes! Actually adding something like the following would be an improvement if (answer == []) and not_sure_there_are_no_solutions: print question else: print answer I heard Emmanuel's warning that the not_sure_there_are_no_solutions boolean may be hard to calculate in some cases. In my opinion, not_sure_there_are_no_solutions should default to True unless it is a case where we can with certaintly set not_sure_there_are_no_solutions = False. Other opinions? If everybody agrees, I will open a ticket. Please do! Thanks! -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
Le mardi 18 novembre 2014 17:10:42 UTC+1, Chris Seberino a écrit : Emmanuel Any way to make Sage act like it can't find the solution (emit question back to user) INSTEAD of emitting the empty set? I can't find the solution and There is no solution are NOT the same thing? Indeed. But proving that There is no solution might inded invorve some serious work. Consider (pseudocode) : var(a,b,c,n) assume(a,integer,b,integer,c,integer,n,integer,a0,b0,c0,n2) solve(a^n+b^n==c^n,[a,b,c,n]) which has, indeed no solution. Proving this has been found a bit involved... So you can assume that an empty list means only that sage's algorithms find no solution. Your point is that, in your example, sage returns (incorrectly) an empty list.In other cases, it returns the original equation. Indeed. So what ? I have not (yet) found a specification for those two cases, but I think it depends on which algorithm has been used. (Maxima may return the empty list in cases solve'() does not succeds). Beware : in other cases, sage might return an implicit solution, given as an equation. cs -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
So you can assume that an empty list means only that sage's algorithms find no solution. I just looked at the documentation of solve and could not find an explicit statement about missed solutions. Even if it is expectable that in some cases (which?) solve may not return all solutions, it should be explicitly pointed out; Especially it should be stated that an empty list does not necessarily imply there are no solutions. Other opinions? If everybody agrees, I will open a ticket. Jakob Am Mittwoch, 19. November 2014 09:07:55 UTC+1 schrieb Emmanuel Charpentier: Le mardi 18 novembre 2014 17:10:42 UTC+1, Chris Seberino a écrit : Emmanuel Any way to make Sage act like it can't find the solution (emit question back to user) INSTEAD of emitting the empty set? I can't find the solution and There is no solution are NOT the same thing? Indeed. But proving that There is no solution might inded invorve some serious work. Consider (pseudocode) : var(a,b,c,n) assume(a,integer,b,integer,c,integer,n,integer,a0,b0,c0,n2) solve(a^n+b^n==c^n,[a,b,c,n]) which has, indeed no solution. Proving this has been found a bit involved... So you can assume that an empty list means only that sage's algorithms find no solution. Your point is that, in your example, sage returns (incorrectly) an empty list.In other cases, it returns the original equation. Indeed. So what ? I have not (yet) found a specification for those two cases, but I think it depends on which algorithm has been used. (Maxima may return the empty list in cases solve'() does not succeds). Beware : in other cases, sage might return an implicit solution, given as an equation. cs -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
So you can assume that an empty list means only that sage's algorithms find no solution. I just looked at the documentation of solve and could not find an explicit statement about missed solutions. Even if it is expectable that in some cases (which?) solve may not return all solutions, it should be explicitly pointed out; Especially it should be stated that an empty list does not necessarily imply there are no solutions. Other opinions? If everybody agrees, I will open a ticket. Updating the documentation of both solve? and x.solve? to make it clear that this is the case would be very helpful. It is similar to how our Booleans on expression comparisons return False if we can't prove True. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
kcrisman: It is similar to how our Booleans on expression comparisons return False if we can't prove True Could the usage of a sort of Tristate/multistate implementation kill that universe of worms? (With the following design: Tristate only comparable to Tristate objects) Jakob Am Mittwoch, 19. November 2014 16:16:44 UTC+1 schrieb kcrisman: So you can assume that an empty list means only that sage's algorithms find no solution. I just looked at the documentation of solve and could not find an explicit statement about missed solutions. Even if it is expectable that in some cases (which?) solve may not return all solutions, it should be explicitly pointed out; Especially it should be stated that an empty list does not necessarily imply there are no solutions. Other opinions? If everybody agrees, I will open a ticket. Updating the documentation of both solve? and x.solve? to make it clear that this is the case would be very helpful. It is similar to how our Booleans on expression comparisons return False if we can't prove True. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
Le mercredi 19 novembre 2014 16:31:35 UTC+1, Jakob Kroeker a écrit : kcrisman: It is similar to how our Booleans on expression comparisons return False if we can't prove True Could the usage of a sort of Tristate/multistate implementation kill that universe of worms? (With the following design: Tristate only comparable to Tristate objects) That's opening another (large) can of worms... ('bout the size of an oil barrel...) : this http://en.wikipedia.org/wiki/%C5%81ukasiewicz_logic might give you an estimate of the size of the problem. Furthermore, use of that extension would have pervasive effects in the whole of Sage.For example, what should do a function expecting either True or False when getting an hypothetical Unknown ? One might map (coerce) the Tristate Unknown to False and get the same behaviour, but wouldn't this defeat the very purpose of adding Tristate ? Furthermore, most of Sage has been written with the assumption not(not(X))==X, which no longer holds... BTW, Maxima has this kind of logic (for example, is can return true, false or unknown) and uses it, so it's at least conceptually doable. And useful ! But with very deep consequences. Shouldn't this be discussed on sage-devel ? HTH, -- Emmanuel Charpentier Jakob Am Mittwoch, 19. November 2014 16:16:44 UTC+1 schrieb kcrisman: So you can assume that an empty list means only that sage's algorithms find no solution. I just looked at the documentation of solve and could not find an explicit statement about missed solutions. Even if it is expectable that in some cases (which?) solve may not return all solutions, it should be explicitly pointed out; Especially it should be stated that an empty list does not necessarily imply there are no solutions. Other opinions? If everybody agrees, I will open a ticket. Updating the documentation of both solve? and x.solve? to make it clear that this is the case would be very helpful. It is similar to how our Booleans on expression comparisons return False if we can't prove True. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
On 2014-11-20, Emmanuel Charpentier emanuel.charpent...@gmail.com wrote: BTW, Maxima has this kind of logic (for example, is can return true, false or unknown) and uses it, so it's at least conceptually doable. And useful ! But with very deep consequences. For the record, Maxima has a global flag prederror which governs the evaluation of predicates. When prederror=false (default), is(p) = unknown when p is not known (to Maxima) to be true or false, and if p then ... evaluates to a partially-evaluated conditional expression. When prederror=true, is(p) and if p then ... trigger an error. In practice, this has worked well enough, i.e. without causing too much confusion -- I don't remember any complaints about programs assuming true/false not working as expected. A more theoretical problem is that Maxima's partial evaluation policy isn't entirely consistent -- when p isn't decidable to Maxima, you can get a partially-evaluated conditional, but not a partially-evaluated loop (triggers an error), and various programming functions (e.g. length, first, integerp) might act in an unexpected way. This, too, hasn't caused trouble, from what I remember. FWIW Robert Dodier -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
Emmanuel Any way to make Sage act like it can't find the solution (emit question back to user) INSTEAD of emitting the empty set? I can't find the solution and There is no solution are NOT the same thing? cs -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
Why 0.04 ? Th notebook says : S=(5^( x -1) == (0.04)^(2*x)).subs({0.04:1/25}).log().solve(x) ; S [x == log(5)/(2*log(25) + log(5))] bool(S[0].rhs()==1/5) True (The last step is easily done by mental computation ; this is only a check.). HTH, -- Emmanuel Charpentier Le dimanche 16 novembre 2014 19:54:20 UTC+1, RRogers a écrit : Apparently the default solver doesn't do logarithms. For the default try: solve(log(5^( x -1)) == log((0.04)^(2*x)), x) [x == 8104022*log(5)/(8104022*log(5) + 52171681)] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
If you ask Sage to do something it can't, like solve a quintic polynomial equation, it will spit the question back at you. If Sage did that I'd be fine. However, Sage spit back the empty set which is the WRONG answer and far different yes? On Sunday, November 16, 2014 12:54:20 PM UTC-6, RRogers wrote: Apparently the default solver doesn't do logarithms. For the default try: solve(log(5^( x -1)) == log((0.04)^(2*x)), x) [x == 8104022*log(5)/(8104022*log(5) + 52171681)] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
I didn't *need* to have 0.04. This is just a command that actually came up in real work. I didn't want to alter it in any way lest it may be a genuine bug. cs On Monday, November 17, 2014 6:48:04 AM UTC-6, Emmanuel Charpentier wrote: Why 0.04 ? Th notebook says : S=(5^( x -1) == (0.04)^(2*x)).subs({0.04:1/25}).log().solve(x) ; S [x == log(5)/(2*log(25) + log(5))] bool(S[0].rhs()==1/5) True (The last step is easily done by mental computation ; this is only a check.). HTH, -- Emmanuel Charpentier Le dimanche 16 novembre 2014 19:54:20 UTC+1, RRogers a écrit : Apparently the default solver doesn't do logarithms. For the default try: solve(log(5^( x -1)) == log((0.04)^(2*x)), x) [x == 8104022*log(5)/(8104022*log(5) + 52171681)] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
Le lundi 17 novembre 2014 17:32:27 UTC+1, Chris Seberino a écrit : If you ask Sage to do something it can't, like solve a quintic polynomial equation, it will spit the question back at you. If Sage did that I'd be fine. However, Sage spit back the empty set which is the WRONG answer and far different yes? That weakness of sage's (maxima's, indeed) is well known. In maxima, an alternative solver (%solve, a. k. a. to_poly_solve) is available, that sage can use through the to_poly_solve option of sage's solve : sage: solve(5^( x -1) == (1/25)^(2*x), x, to_poly_solve=True) [x == (2*I*pi*z54 + log(5))/log(3125)] which gives you also the set of complex solutions (log is multivalued in the complex plane...). Sage seems to have trouble finding that log(3125)=log(5^5)=5*log(5), which it can easily check. So substitute it by hand to get an expression easier to handle. HTH, -- Emmanuel Charpentier On Sunday, November 16, 2014 12:54:20 PM UTC-6, RRogers wrote: Apparently the default solver doesn't do logarithms. For the default try: solve(log(5^( x -1)) == log((0.04)^(2*x)), x) [x == 8104022*log(5)/(8104022*log(5) + 52171681)] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Why solve(5^( x -1) == (0.04)^(2*x), x) returns empty set?
Apparently the default solver doesn't do logarithms. For the default try: solve(log(5^( x -1)) == log((0.04)^(2*x)), x) [x == 8104022*log(5)/(8104022*log(5) + 52171681)] -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.