Hello, You can use its 3rd parameter domain=Interval(start, end) :
``` In [4]: solveset(sin(x) - sqrt(2)/2, x, Interval(-2*pi, 2*pi)) Out[4]: ⎧-7⋅π -5⋅π π 3⋅π⎫ ⎨─────, ─────, ─, ───⎬ ⎩ 4 4 4 4 ⎭ ``` -- Shekhar On Monday, 29 August 2016 20:57:35 UTC+5:30, Flexico Crux wrote: > > I'm looking for a way to solve an equation within an interval and return a > list of the values. Solve doesn't guarantee to catch every solution, but > Solveset seems to get me partway there: > >>> solveset(sin(x) - sqrt(2)/2, x) > ⎧ 3⋅π ⎫ ⎧ π ⎫ > ⎨2⋅n⋅π + ─── | n ∊ ℤ⎬ ∪ ⎨2⋅n⋅π + ─ | n ∊ ℤ⎬ > ⎩ 4 ⎭ ⎩ 4 ⎭ > (that may not look right in a non-monospace font) > That's great and all, but how do I turn that into a list of values, say, > between -2*pi and pi? > -- You received this message because you are subscribed to the Google Groups "sympy" 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 https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/83d000aa-c773-4d07-875c-a2692e182306%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
