id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
14628 Zero solution does not result in zero gagern burcin "In the following case, the `solve` function of sage 5.8 will yield a list of incorrect solutions, whereas the correct solution is missing. The computation involves complex numbers, symbolic expressions and trigonometric functions.
{{{
----------------------------------------------------------------------
| Sage Version 5.8, Release Date: 2013-03-15 |
| Type ""notebook()"" for the browser-based notebook interface. |
| Type ""help()"" for help. |
----------------------------------------------------------------------
sage: phi = var('phi', domain='real')
sage: M = Matrix([
....: [-sqrt(-I)/(exp(I*phi)-1), sqrt(-I)/(exp(I*phi)-1)],
....: [-1/(exp(I*phi)-1)+exp(-I*phi), 1/(exp(I*phi)-1)]])
sage: z = M*vector((-I, 1))
sage: z = z[0]/z[1]
sage: zi = z.imag_part()
sage: s1 = [s.rhs() for s in solve(zi == 0, phi)]
sage: s1
[0, pi - arccos(1/2*sqrt(5) - 1/2), arccos(1/2*sqrt(5) + 1/2)]
sage: N(zi.subs(phi=s1[1]))
0.244669085661435
sage: zi.subs(phi=pi/2)
0
}}}
The correct solution was found from an easier form of `zi`, which is `-1/2*sqrt(2)*cos(phi)/(sin(phi) + 1)`. I first [http://ask.sagemath.org/question/2600/zero-solution-does-not-result-in-zero reported] this at asksage, and tmonteil [http://ask.sagemath.org/question/2600/zero-solution-does-not-result-in-zero?answer=3579#3579 confirmed] that this is a bug, not my mistake." defect new major sage-6.4 symbolics kcrisman Reported upstream. No feedback yet. wrongAnswerMarker