Opened 4 years ago
Closed 3 years ago
#21946 closed defect (fixed)
solve(x==x, x) returns [x == r1]
Reported by:  pelegm  Owned by:  aashu12 

Priority:  minor  Milestone:  sage8.4 
Component:  symbolics  Keywords:  solve, days79 
Cc:  Merged in:  
Authors:  Ashutosh Ahelleya  Reviewers:  Bryan Ginge Chen 
Report Upstream:  N/A  Work issues:  
Branch:  224e064 (Commits, GitHub, GitLab)  Commit:  224e0641f083472bda753ca8c1a833073b08a218 
Dependencies:  #21554  Stopgaps: 
Description (last modified by )
Not sure if it's a bug or a problem with the documentation, but without any assumptions on x
, solve(x==x, x)
returns [x == r1]
. The documentation does not state what r1
is, but gives the following example:
If there is a parameter in the answer, that will show up as a new variable. In the following example, "r1" is a real free variable (because of the "r"): sage: solve([x+y == 3, 2*x+2*y == 6],x,y) [[x == r1 + 3, y == r1]]
However, without assumptions on x
, there's no reason to believe that x
is real.
This ticket also fixes a grammar issue introduced in #21554 (see comments).
Change History (18)
comment:1 Changed 4 years ago by
 Owner changed from (none) to aashu12
comment:2 Changed 4 years ago by
 Branch set to u/aashu12/documentation
comment:3 Changed 4 years ago by
 Commit set to e8760d5ba490fa59a043879c2993b14c8ababde3
comment:4 Changed 4 years ago by
 Status changed from new to needs_review
comment:5 Changed 4 years ago by
 Dependencies set to #21554
comment:6 followup: ↓ 7 Changed 4 years ago by
 Milestone changed from sage7.5 to sage7.6
what do you mean to say by
+ In case one of the solutions while solving an equation is a real number::
First of all, I would have written
+ In case one of the solutions of an equation is a real number::
Still, it's unclear what the following sequence of assumptions following this line has to do with the one of solutions being real. Do you mean to say that in order to make sure that one (rather, every?) solution is real, you need to make the following assumptions? Something else?
comment:7 in reply to: ↑ 6 ; followup: ↓ 8 Changed 4 years ago by
Replying to dimpase:
what do you mean to say by
+ In case one of the solutions while solving an equation is a real number::First of all, I would have written
+ In case one of the solutions of an equation is a real number::
It was a part of ticket #21554 which has already been merged.
Still, it's unclear what the following sequence of assumptions following this line has to do with the one of solutions being real. Do you mean to say that in order to make sure that one (rather, every?) solution is real, you need to make the following assumptions? Something else?
According to the documentation, the solution of the equation described in the issue is r1, which is a real number (That is what the documentation says!). But the solution to this equation can be a complex number too! So, I just changed the documentation and redefined r1 to be any arbitrary constant. You can refer to this conversation: https://groups.google.com/forum/#!topic/sagesupport/_XWjrYjk_3A
comment:8 in reply to: ↑ 7 ; followup: ↓ 9 Changed 4 years ago by
Replying to aashu12:
Replying to dimpase:
what do you mean to say by
+ In case one of the solutions while solving an equation is a real number::First of all, I would have written
+ In case one of the solutions of an equation is a real number::It was a part of ticket #21554 which has already been merged.
OK, I didn't notice this. But this makes no sense regardless, and you should fix it here.
Still, it's unclear what the following sequence of assumptions following this line has to do with the one of solutions being real. Do you mean to say that in order to make sure that one (rather, every?) solution is real, you need to make the following assumptions? Something else?
According to the documentation provided earlier, the solution of the equation described in the issue is r1, which is a real number (That is what the documentation says!). But the solution to this equation can be a complex number too! So, I just changed the documentation and redefined r1 to be any arbitrary constant. You can refer to this conversation: https://groups.google.com/forum/#!topic/sagesupport/_XWjrYjk_3A
I understand this  my question is wholly about the commit from #21554. How does this docstring clarify anything about assuming noninteger? I don't get it.
comment:9 in reply to: ↑ 8 ; followup: ↓ 10 Changed 4 years ago by
Replying to dimpase:
I understand this  my question is wholly about the commit from #21554. How does this docstring clarify anything about assuming noninteger? I don't get it.
No. The commits are different. I pushed them in different branches. But they showed up when I changed the author name. That was what my doubt was about > https://groups.google.com/forum/#!topic/sagesupport/iqqEhA4K2Gg
comment:10 in reply to: ↑ 9 ; followup: ↓ 11 Changed 4 years ago by
Replying to aashu12:
Replying to dimpase:
I understand this  my question is wholly about the commit from #21554. How does this docstring clarify anything about assuming noninteger? I don't get it.
No. The commits are different. I pushed them in different branches. But they showed up when I changed the author name. That was what my doubt was about > https://groups.google.com/forum/#!topic/sagesupport/iqqEhA4K2Gg
Differently named branches always have some common commits (and as I wrote on sagesupport, it is the case that the commit c7acfd6 from #21554 is present in the branch here). Branch names are merely labels in the directed graph of commits in a repo.
Anyhow, c7acfd6 needs fixing, if only because it's broken English there...
comment:11 in reply to: ↑ 10 Changed 4 years ago by
Replying to dimpase:
Differently named branches always have some common commits (and as I wrote on sagesupport, it is the case that the commit c7acfd6 from #21554 is present in the branch here). Branch names are merely labels in the directed graph of commits in a repo.
Anyhow, c7acfd6 needs fixing, if only because it's broken English there...
Yea, I will fix it :)
comment:12 Changed 4 years ago by
 Commit changed from e8760d5ba490fa59a043879c2993b14c8ababde3 to b88104716685c7864077452950ceee7280933b67
Branch pushed to git repo; I updated commit sha1. New commits:
b881047  Fixed #21946

comment:13 Changed 4 years ago by
 Commit changed from b88104716685c7864077452950ceee7280933b67 to ea063c358af8349cac165083099a381a29f5e922
Branch pushed to git repo; I updated commit sha1. New commits:
ea063c3  Fixed #21946 and added example for #21554

comment:14 Changed 3 years ago by
 Status changed from needs_review to needs_work
This no longer merges.
comment:15 Changed 3 years ago by
 Branch changed from u/aashu12/documentation to public/21946_solve_returns_r1
 Commit changed from ea063c358af8349cac165083099a381a29f5e922 to 224e0641f083472bda753ca8c1a833073b08a218
 Description modified (diff)
 Status changed from needs_work to positive_review
I fixed the merge conflict. Unless there are other outstanding objections, I'm setting this to positive_review as this is certainly an improvement to the docs.
New commits:
e8760d5  Fixed: #21946

b881047  Fixed #21946

ea063c3  Fixed #21946 and added example for #21554

224e064  Merge branch 'u/aashu12/documentation' of git://trac.sagemath.org/sage into 21946_solve_returns_r1

comment:16 Changed 3 years ago by
 Reviewers set to Bryan Ginge Chen
comment:17 Changed 3 years ago by
 Milestone changed from sage7.6 to sage8.4
comment:18 Changed 3 years ago by
 Branch changed from public/21946_solve_returns_r1 to 224e0641f083472bda753ca8c1a833073b08a218
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Fixes #21554
Fixed: #21946