## #2209 Lost solutions in to_poly_solve

None
closed
nobody
5
2013-01-01
2011-06-19
Aleksas
No

Lost solutions in to_poly_solve

(%i1) eq:sin(2*x)=cos(x);
(%o1) sin(2*x)=cos(x)
(%i2) eq1:trigexpand(eq);
(%o2) 2*cos(x)*sin(x)=cos(x)

Lost solutions:
(%i3) to_poly_solve([eq], [x]);
(%o3) %union([x=-(4*%pi*%z0+%pi)/2],[x=(4*%pi*%z1+%pi)/6])

Correct:
(%i4) to_poly_solve([eq1], [x]);
(%o4) %union([x=2*%pi*%z15-%pi/2],[x=2*%pi*%z17+%pi/2],
[x=2*%pi*%z19+%pi/6],[x=2*%pi*%z21+(5*%pi)/6])

## Discussion

• Aleksas - 2011-06-19

In to_poly_solve equation is not equivalent to
lhs(equation)-rhs(equation)=0.

For example:
(%i1) eq:sin(2*x)=cos(x);
(%o1) sin(2*x)=cos(x)
(%i2) to_poly_solve([eq], [x]);
(%o2) %union([x=-(4*%pi*%z0+%pi)/2],[x=(4*%pi*%z1+%pi)/6])
(%i3) to_poly_solve([lhs(eq)-rhs(eq)=0], [x]);
(%o3) %union([x=2*%pi*%z15-%pi/2],[x=2*%pi*%z17+%pi/2],[x=2*%pi*%z19+%pi/6],[x=2*%pi*%z21+(5*%pi)/6])

• Barton Willis - 2013-01-01
• status: open --> closed
• milestone: --> None

• Barton Willis - 2013-01-01

The solution sets are the same. To see this, solve sin(2x) = cos(x), and replace the arbitrary integer in the solution with 3k, 3k+1, and 3k+2.