Opened 4 years ago

Closed 3 months ago

#23136 closed enhancement (fixed)

Allow giac algorithm in solve

Reported by: mforets Owned by:
Priority: major Milestone: sage-9.5
Component: calculus Keywords: solve, giac
Cc: slelievre, tscrim Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 57c0ee7 (Commits, GitHub, GitLab) Commit: 57c0ee7dc333536bb96bfbce3a78667bc8f8148e
Dependencies: Stopgaps:

Status badges

Description

To allow the giac interface as an optional keyword of the solve function.

Change History (10)

comment:1 Changed 4 years ago by mforets

Here are some tests:

involving the unknown as exponent:

sage: solve((2/3)^x-2, x)
[3^x == 2^(x - 1)] # not explicit x = ..
sage: giac('solve((2/3)^x-2, x)')
list[ln(2)/(ln(2)-ln(3))]  # ok

from #3745:

sage: sage: solve((sin(x) - 8*cos(x)*sin(x))*(sin(x)^2 + cos(x)) - (2*cos(x)*sin(x) - sin(x))*(-2*sin(x)^2 + 2*cos(x)^2 - cos(x)), x) 
[x == pi, x == 1/2*pi, x == 0]  # wrong
sage: giac('solve((sin(x) - 8*cos(x)*sin(x))*(sin(x)^2 + cos(x)) - (2*cos(x)*sin(x) - sin(x))*(-2*sin(x)^2 + 2*cos(x)^2 - cos(x)), x)')
list[-2*atan(sqrt(2)),0,2*atan(sqrt(2)),pi]  # ok

comment:2 Changed 4 years ago by mforets

see also #22322 (allow sympy algorithm in solve)

comment:3 Changed 4 years ago by chapoton

preliminary step in #23677

comment:4 Changed 3 months ago by chapoton

  • Authors set to Frédéric Chapoton
  • Branch set to u/chapoton/23136
  • Cc slelievre added
  • Commit set to 8c2e14c4784b67037ca9d3a027c17b76b356e9b8
  • Status changed from new to needs_review

just the basic setup, needs to be tested and improved


New commits:

8c2e14callow_giac_for_solve

comment:5 Changed 3 months ago by chapoton

  • Milestone changed from sage-8.0 to sage-9.5

comment:6 Changed 3 months ago by git

  • Commit changed from 8c2e14c4784b67037ca9d3a027c17b76b356e9b8 to 5b04bfadffc3b8837ae2172696384401ee4433c4

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

5b04bfawork on giac solver

comment:7 Changed 3 months ago by git

  • Commit changed from 5b04bfadffc3b8837ae2172696384401ee4433c4 to 57c0ee7dc333536bb96bfbce3a78667bc8f8148e

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

57c0ee7add giac algo in the doc

comment:8 Changed 3 months ago by chapoton

  • Cc tscrim added

should be almost good to go, needs testing

comment:9 Changed 3 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Green patchbot and passes my simple testing. I don't know a good choice for a bigger stress-test, but the core mechanics of the interface seem to work. So positive review.

comment:10 Changed 3 months ago by vbraun

  • Branch changed from u/chapoton/23136 to 57c0ee7dc333536bb96bfbce3a78667bc8f8148e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.