# [WIP] Improving solveset univariate Trig inequality #11257

Closed
wants to merge 1 commit into from

## Conversation

Projects
None yet
1 participant
Member

### Shekharrajak commented Jun 19, 2016

 `solveset_univariate_trig_inequality` function is added to handle Trigonometric inequality. Main intention is to get extended solution. eg. ``````In [2]: solveset((2*cos(x)+1)/(2*cos(x)-1) > 0, x, S.Reals) Out[2]: ⎡⎧ π ⎫ ⎧ π ⎫⎤ ⎢⎨n⋅π - ─ | n ∊ ℤ⎬, ⎨n⋅π + ─ | n ∊ ℤ⎬⎥ ⎣⎩ 3 ⎭ ⎩ 3 ⎭⎦ n [4]: solveset(sin(x) > 1/sqrt(2), x, S.Reals) Out[4]: ⎛⎧ π ⎫ ⎧ 3⋅π ⎫⎞ ⎜⎨2⋅n⋅π + ─ | n ∊ ℤ⎬, ⎨2⋅n⋅π + ─── | n ∊ ℤ⎬⎟ ⎝⎩ 4 ⎭ ⎩ 4 ⎭⎠ In [15]: solveset(2*cos(x) + sqrt(3) < 0, x, S.Reals) Out[15]: ⎛⎧ 5⋅π ⎫ ⎧ 7⋅π ⎫⎞ ⎜⎨2⋅n⋅π + ─── | n ∊ ℤ⎬, ⎨2⋅n⋅π + ─── | n ∊ ℤ⎬⎟ ⎝⎩ 6 ⎭ ⎩ 6 ⎭⎠ In [16]: solveset_univariate_trig_inequality(tan(x) > 0, x) Out[16]: ⎛ ⎧ π ⎫⎞ ⎜{n⋅π | n ∊ ℤ}, ⎨n⋅π + ─ | n ∊ ℤ⎬⎟ ⎝ ⎩ 2 ⎭⎠ ``````

### Shekharrajakforce-pushed the Shekharrajak:gsoc_trig_ineq branch from `ac44cd2` to `7a70227`Jun 19, 2016

``` solveset_univariate_trig_ineq added ```
`solveset_univariate_trig_ineq added`
``` 7a70227 ```
Member Author

### Shekharrajak commented Jun 19, 2016

 This PR is not that much good now. It fails some cases. I am trying to improve it. It is inspired from previous `solve_univariate_inequality` but it seems need changes for trig ineq.

### Shekharrajak reviewed Jun 19, 2016

 @@ -153,6 +153,140 @@ def isdisjoint(self, other): """ return self.is_disjoint(other) def _union_simplify(self, other):

Author Member

Original #11188

Member Author

### Shekharrajak commented Jun 19, 2016

 Ping @aktech @hargup @kshitij10496 . This is initial code.

Merged

Member Author

### Shekharrajak commented Aug 5, 2016

 Closing this PR, since @kshitij10496 is working on it.