Opened 5 years ago

Last modified 5 years ago

#17412 needs_info enhancement

improve documentation of 'solve()'

Reported by: jakobkroeker Owned by:
Priority: minor Milestone: sage-6.5
Component: documentation Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/jakobkroeker/ticket/17412 (Commits) Commit: 2d7574794ae840b48a0f8841a8978157066982db
Dependencies: Stopgaps:

Description

Even if it is expectable that in some cases 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.

See also the discussion at https://groups.google.com/d/msg/sage-support/cg7QYw_1ncg/VKdH3CX4qYsJ

Example from that thread:

solve(5^( x -1) == (1/25)^(2*x), x)
# []
solve(5^( x -1) == (1/25)^(2*x), x,to_poly_solve=True)
#[x == (2*I*pi*z41 + log(5))/log(3125)]

Change History (5)

comment:1 Changed 5 years ago by jakobkroeker

  • Branch set to u/jakobkroeker/ticket/17412
  • Created changed from 11/28/14 09:59:03 to 11/28/14 09:59:03
  • Modified changed from 11/28/14 09:59:03 to 11/28/14 09:59:03

comment:2 Changed 5 years ago by jakobkroeker

  • Commit set to 2d7574794ae840b48a0f8841a8978157066982db
  • Status changed from new to needs_info

What is about

 solve_mod()
 solve_ineq_univar()
 solve_ineq_fourier()
 solve_ineq()

may they also fail in some cases to return all solutions? Which other routines need an explicit statement, that an empty result does not imply that there are no solutions?


New commits:

2d75747explicitly state that solve may not obtain all existing solutions and that an empty result does not imply there are no solutions

comment:3 follow-up: Changed 5 years ago by tmonteil

I think you should also give an explicit example in the doc. However, the one you provide does not work for me (on 6.5.beta0):

sage: solve(5^( x -1) == (1/25)^(2*x), x)
...
NotImplementedError: non-integral exponents not supported

comment:4 in reply to: ↑ 3 Changed 5 years ago by rws

Replying to tmonteil:

I think you should also give an explicit example in the doc. However, the one you provide does not work for me (on 6.5.beta0):

sage: solve(5^( x -1) == (1/25)^(2*x), x)
...
NotImplementedError: non-integral exponents not supported

Returns empty list on 6.5beta1. Is x already initialized?

comment:5 Changed 5 years ago by tmonteil

Uh my bad, i was using the wrong sage console where i used polynomials before. Sorry for the noise.

That said, adding an example showing explicitly the problem (e.g. that particular example, since it works) could be good to make things explicit. The existing example are somehow too optimistic, and we should point what does not work as well.

Note: See TracTickets for help on using tickets.