#8390: Find all roots of a trigonometric equation
---------------------------+------------------------------------------------
   Reporter:  olazo        |       Owner:  olazo               
       Type:  enhancement  |      Status:  new                 
   Priority:  minor        |   Milestone:                      
  Component:  algebra      |    Keywords:  trigonometric, roots
     Author:               |    Upstream:  N/A                 
   Reviewer:               |      Merged:                      
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by robert.marik):

 Sage interface for Maxima's solver works like this:

 We try Maxima's solve function first. It we get empty answer, we try the
 to_poly_solve for the same equation.

 If the answer is not empty, we pass the answer of solve command to
 Maxima's to_poly_solve.

 For our equation, solve command in Maxima gives only one solution pi/6
 (and probably writes something like "SOLVE is using arc-trig functions to
 get a solution. Some solutions will be lost." on terminal).

 {{{
 [ma...@um-bc107 /opt/sage]$ ./sage
 ----------------------------------------------------------------------
 | Sage Version 4.3.2, Release Date: 2010-02-06                       |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 sage: eq = sin(2*x-pi/6) == 1/2
 sage: eq._maxima_().solve(x)
 [x=%pi/6]
 sage: eq._maxima_().to_poly_solve(x)
 %union([x=-(-2*%pi*%z6-%pi)/2],[x=-(-2*%pi*%z8-%pi/3)/2])
 sage:
 }}}

 I hope this is an explanation. I do not have enough experiences with
 to_poly_solve, so my questions are: Is it good idea to skip solve and use
 to_poly_solve immediatelly when to_poly_sole = True? Or is it posssible to
 check from within Sage, that the warning about arc-trig functions has been
 printed? Or introduce to_poly_solve = 'force' to omit solve command?

 Now you can use
 {{{
 sage: eq._maxima_().to_poly_solve(x).sage()
 [[x == 1/2*pi + pi*z16], [x == 1/6*pi + pi*z18]]
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8390#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to