#14736: trig case where to_poly_solve True works, but not force
-----------------------------+------------------------
       Reporter:  kcrisman   |        Owner:  burcin
           Type:  defect     |       Status:  new
       Priority:  minor      |    Milestone:  sage-6.4
      Component:  symbolics  |   Resolution:
       Keywords:             |    Merged in:
        Authors:             |    Reviewers:
Report Upstream:  N/A        |  Work issues:
         Branch:             |       Commit:
   Dependencies:             |     Stopgaps:
-----------------------------+------------------------
Description changed by kcrisman:

Old description:

> From the bug reporter spreadsheet and
> [https://groups.google.com/forum/?fromgroups#!topic/sage-
> support/oEgjsfBoK30 this sage-support thread]:
> {{{
> solve(sin(x)/cos(x)==1,x,to_poly_solve='force')
>
> This gives an empty list.  I know it has at least one solution, namely
> pi/4.
> }}}
> Note that `to_poly_solve=True` does work.

New description:

 From the bug reporter spreadsheet and
 [https://groups.google.com/forum/?fromgroups#!topic/sage-
 support/oEgjsfBoK30 this sage-support thread]:
 {{{
 solve(sin(x)/cos(x)==1,x,to_poly_solve='force')

 This gives an empty list.  I know it has at least one solution, namely
 pi/4.
 }}}
 Note that `to_poly_solve=True` does work.

 This is basically the same as [http://ask.sagemath.org/question/31191
 /using-solve-with-trigonometric-functions/ this ask.sagemath question], by
 the way.

 {{{
 sage: solve(tan(3*x)==1, x, to_poly_solve='force'
 []
 }}}

 We're basically silently failing since we can't translate `%solve` output
 from Maxima.
 {{{
 (%i5) load(to_poly_solve);

 Loading maxima-grobner $Revision: 1.6 $ $Date: 2009-06-02 07:49:49 $
 (%o5) /Users/.../sage-6.9/local/share/maxima/5.35.1/share/t\
 o_poly_solve/to_poly_solve.mac
 (%i6) %solve(tan(3*x)=1,x);
                       2 %pi (12 %z11 + 1)
 (%o6) %union(%if(3 tan (-----------------) - 1 # 0,
                                12
                       %pi
        - 2 %pi %z11 - ---
                        6
 [x = - ------------------], %union()),
                2
          2                        2 %pi       2 %pi
 %if(3 tan ((4 %pi %z7 - %i log(sin (---) + cos (---))
                                     12          12
                              %pi                      %pi
            (sqrt(3) + 1) sin(---) + (sqrt(3) - 1) cos(---)
                              12                       12
  + 2 atan(-------------------------------------------------) + 2 %pi)/4) -
 1 #
                             %pi                        %pi
           (sqrt(3) - 1) sin(---) + (- sqrt(3) - 1) cos(---)
                             12                         12
                                 %pi        %pi                %pi
 %pi
                     sqrt(3) sin(---)   sin(---)   sqrt(3) cos(---)
 cos(---)
                                 12         12                 12
 12   2
 0, [x = - (%i (log((---------------- + -------- + ---------------- -
 --------)
                            3/2            3/2            3/2
 3/2
                           2              2              2              2
                 %pi        %pi                %pi        %pi
     sqrt(3) sin(---)   sin(---)   sqrt(3) cos(---)   cos(---)
                 12         12                 12         12   2
  + (---------------- - -------- - ---------------- - --------) )/2
            3/2            3/2            3/2            3/2
           2              2              2              2
                          %pi        %pi         %pi        %pi
                      sin(---)   cos(---)    cos(---)   sin(---)
                          12         12          12         12
             sqrt(3) (-------- + --------)   -------- - --------
                      sqrt(2)    sqrt(2)     sqrt(2)    sqrt(2)
             ----------------------------- - -------------------
                           2                          2
  + %i (atan(---------------------------------------------------) + %pi))
                          %pi        %pi         %pi        %pi
                      sin(---)   cos(---)    sin(---)   cos(---)
                          12         12          12         12
             sqrt(3) (-------- - --------)   -------- + --------
                      sqrt(2)    sqrt(2)     sqrt(2)    sqrt(2)
             ----------------------------- - -------------------
                           2                          2
                                       2
  - 2 %pi %z7)/2], %union()), %if(3 tan ((4 %pi %z9
                             %pi                      %pi
           (sqrt(3) - 1) sin(---) + (sqrt(3) + 1) cos(---)
                             12                       12
  + 2 atan(-----------------------------------------------)
                             %pi                      %pi
           (sqrt(3) + 1) sin(---) + (1 - sqrt(3)) cos(---)
                             12                       12
              2 %pi       2 %pi
  - %i log(sin (---) + cos (---)))/4) - 1 # 0,
                12          12
                                %pi        %pi                %pi
 %pi
                    sqrt(3) sin(---)   sin(---)   sqrt(3) cos(---)
 cos(---)
                                12         12                 12         12
 2
 [x = - (%i (log((- ---------------- + -------- - ---------------- -
 --------)
                           3/2            3/2            3/2            3/2
                          2              2              2              2
                   %pi        %pi                %pi        %pi
       sqrt(3) sin(---)   sin(---)   sqrt(3) cos(---)   cos(---)
                   12         12                 12         12   2
  + (- ---------------- - -------- + ---------------- - --------) )/2
              3/2            3/2            3/2            3/2
             2              2              2              2
                            %pi        %pi         %pi        %pi
                        sin(---)   cos(---)    cos(---)   sin(---)
                            12         12          12         12
               sqrt(3) (-------- + --------)   -------- - --------
                        sqrt(2)    sqrt(2)     sqrt(2)    sqrt(2)
  + %i atan2(- ----------------------------- - -------------------,
                             2                          2
       %pi        %pi                 %pi        %pi
   sin(---)   cos(---)            sin(---)   cos(---)
       12         12                  12         12
   -------- + --------   sqrt(3) (-------- - --------)
   sqrt(2)    sqrt(2)             sqrt(2)    sqrt(2)
 - ------------------- - -----------------------------)) - 2 %pi %z9)/2],
            2                          2
 %union()))
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/14736#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to