Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve(x==x, x) returns [x == r1] #21946

Closed
pelegm opened this issue Nov 23, 2016 · 22 comments
Closed

solve(x==x, x) returns [x == r1] #21946

pelegm opened this issue Nov 23, 2016 · 22 comments

Comments

@pelegm
Copy link
Contributor

pelegm commented Nov 23, 2016

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).

Depends on #21554

Component: symbolics

Keywords: solve, days79

Author: Ashutosh Ahelleya

Branch/Commit: 224e064

Reviewer: Bryan Gin-ge Chen

Issue created by migration from https://trac.sagemath.org/ticket/21946

@pelegm pelegm added this to the sage-7.5 milestone Nov 23, 2016
@sagetrac-aashu12 sagetrac-aashu12 mannequin self-assigned this Mar 3, 2017
@sagetrac-aashu12
Copy link
Mannequin

sagetrac-aashu12 mannequin commented Mar 7, 2017

Branch: u/aashu12/documentation

@sagetrac-aashu12
Copy link
Mannequin

sagetrac-aashu12 mannequin commented Mar 7, 2017

Author: Ashutosh Ahelleya

@sagetrac-aashu12
Copy link
Mannequin

sagetrac-aashu12 mannequin commented Mar 7, 2017

New commits:

c7acfd6Fixes #21554
e8760d5 Fixed: #21946

@sagetrac-aashu12
Copy link
Mannequin

sagetrac-aashu12 mannequin commented Mar 7, 2017

Commit: e8760d5

@dimpase
Copy link
Member

dimpase commented Mar 10, 2017

Dependencies: #21554

@dimpase
Copy link
Member

dimpase commented Mar 10, 2017

comment: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?

@dimpase dimpase modified the milestones: sage-7.5, sage-7.6 Mar 10, 2017
@sagetrac-aashu12
Copy link
Mannequin

sagetrac-aashu12 mannequin commented Mar 10, 2017

comment:7

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 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/sage-support/_XWjrYjk_3A

@dimpase
Copy link
Member

dimpase commented Mar 10, 2017

comment:8

Replying to @sagetrac-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/sage-support/_XWjrYjk_3A

I understand this --- my question is wholly about the commit from #21554.
How does this docstring clarify anything about assuming non-integer? I don't get it.

@sagetrac-aashu12
Copy link
Mannequin

sagetrac-aashu12 mannequin commented Mar 10, 2017

comment:9

Replying to @dimpase:

I understand this --- my question is wholly about the commit from #21554.
How does this docstring clarify anything about assuming non-integer? 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/sage-support/iqqEhA4K2Gg

@dimpase
Copy link
Member

dimpase commented Mar 10, 2017

comment:10

Replying to @sagetrac-aashu12:

Replying to @dimpase:

I understand this --- my question is wholly about the commit from #21554.
How does this docstring clarify anything about assuming non-integer? 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/sage-support/iqqEhA4K2Gg

Differently named branches always have some common commits (and as I wrote on sage-support, 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...

@sagetrac-aashu12
Copy link
Mannequin

sagetrac-aashu12 mannequin commented Mar 10, 2017

comment:11

Replying to @dimpase:

Differently named branches always have some common commits (and as I wrote on sage-support, 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 :)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2017

Changed commit from e8760d5 to b881047

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

b881047 Fixed #21946

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2017

Changed commit from b881047 to ea063c3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

ea063c3Fixed #21946 and added example for #21554

@bryangingechen
Copy link
Mannequin

bryangingechen mannequin commented Jul 28, 2018

comment:14

This no longer merges.

@bryangingechen
Copy link
Mannequin

bryangingechen mannequin commented Jul 28, 2018

comment:15

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
ea063c3Fixed #21946 and added example for #21554
224e064Merge branch 'u/aashu12/documentation' of git://trac.sagemath.org/sage into 21946_solve_returns_r1

@bryangingechen
Copy link
Mannequin

bryangingechen mannequin commented Jul 28, 2018

Changed branch from u/aashu12/documentation to public/21946_solve_returns_r1

@bryangingechen

This comment has been minimized.

@bryangingechen
Copy link
Mannequin

bryangingechen mannequin commented Jul 28, 2018

Changed commit from ea063c3 to 224e064

@bryangingechen
Copy link
Mannequin

bryangingechen mannequin commented Jul 28, 2018

Reviewer: Bryan Gin-ge Chen

@fchapoton fchapoton modified the milestones: sage-7.6, sage-8.4 Aug 9, 2018
@vbraun
Copy link
Member

vbraun commented Aug 11, 2018

Changed branch from public/21946_solve_returns_r1 to 224e064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants