Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solveset complicates and fails to solve sin(x/180*pi) - 1/2 #16870

Closed
smichr opened this issue May 22, 2019 · 1 comment · Fixed by #19507
Closed

solveset complicates and fails to solve sin(x/180*pi) - 1/2 #16870

smichr opened this issue May 22, 2019 · 1 comment · Fixed by #19507

Comments

@smichr
Copy link
Member

smichr commented May 22, 2019

>>> solveset(sin(x)-S.Half,domain=S.Reals)
Union(ImageSet(Lambda(_n, 2*_n*pi + 5*pi/6), Integers),
 ImageSet(Lambda(_n, 2*_n*pi + pi/6), Integers))  -> ok

>>> solveset(sin(x/180*pi)-S.Half,domain=S.Reals)
ConditionSet(x, Eq((-I*(exp(I*pi*x/90) - 1) -
 exp(I*pi*x/180))*exp(-I*pi*x/180)/2, 0), Reals)  -> ?

>>> solve(sin(x/180*pi)-S.Half,domain=S.Reals)
[30, 150]
@gschintgen
Copy link
Contributor

With the draft PR #19507:


In [6]: solveset(sin(x/180*pi)-S.Half,domain=S.Reals)
Out[6]:
⎧    ⎛        5⋅π⎞        ⎫   ⎧    ⎛        π⎞        ⎫
⎪180⋅⎜2⋅n⋅π + ───⎟        ⎪   ⎪180⋅⎜2⋅n⋅π + ─⎟        ⎪
⎨    ⎝         6 ⎠        ⎬   ⎨    ⎝        6⎠        ⎬
⎪───────────────── | n ∊ ℤ⎪ ∪ ⎪─────────────── | n ∊ ℤ⎪
⎩        π                ⎭   ⎩       π               ⎭

In [7]: simplify(_)
Out[7]: {360⋅n + 150 | n ∊ ℤ} ∪ {360⋅n + 30 | n ∊ ℤ}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants