Constant in trig solution?

27 views
Skip to first unread message

Dario Beraldi

unread,
Oct 28, 2014, 7:40:11 AM10/28/14
to sy...@googlegroups.com
Hello,

This might be a super dumb question...

If you do

solve(sin(x))

You get

Out[1]: [0, π]

But shouldn't the "complete" answer be [0, pi * k] with k any integer?

This is on SymPy 0.7.5

Thanks for clarification!

Dario

Francesco Bonazzi

unread,
Oct 28, 2014, 11:11:50 AM10/28/14
to sy...@googlegroups.com
It should return a Mod object, but it's still unimplemented.

Aaron Meurer

unread,
Oct 28, 2014, 12:38:31 PM10/28/14
to sy...@googlegroups.com
At https://github.com/sympy/sympy/pull/7523 this works

In [4]: solve_univariate_real(sin(x), x)
Out[4]: {2⋅n⋅π | n ∊ ℤ} ∪ {2⋅n⋅π + π | n ∊ ℤ}

The issue here is the representation of the infinite set of solutions.
It requires a new interface to solve.

Aaron Meurer
> --
> 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 sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/214902fb-c056-4b0b-b6fc-67aae9e02288%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages