SymPy so far doesn't have very good power at returning infinite solutions
(in fact, it can't return infinite solutions at all, but even in cases like
this, it only finds one of the two that you might expect).

One way to get an infinite set of solutions is to use

In [20]: print solve(sin(x - 2*pi*n) - S(1)/2, x)
[pi*(12*n + 1)/6]

But this only gives half of them, because sin goes through 1/2 two times in
one period. There is a way to get the rest, but it is escaping me right now.

Aaron Meurer

On Wed, Oct 31, 2012 at 7:00 PM, Ben Lucato <[email protected]> wrote:

> Hi I am new to sympy and let me just say it is incredible what you guys
> have created. I have found your package extremely useful already.
>
> I am having an issue with solving simple trigonometric equations, for
> example:
>
> solve(sin(x) - S(1) / 2)
> returns just [pi / 6], not the first two solutions in the unit circle [pi
> / 6, 5 * pi / 6]. Is this the way it is designed or have I missed
> something?
>

> Bonus: Is there a way to have sympy generate the *general* solution of a
> trig. equation? If not, that is ok as it is a bit easier to do that one.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/I-2u8qG_UGAJ.
> 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/sympy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy?hl=en.

Reply via email to