I also found that solveset is not able to solve simple tri equations like 
eq = sin(2*x)*cos(x) + cos(2*x)*sin(x)-1
print solveset(eq,x, S.Reals)
Issue: 7914

Even it is not returing correct answer for :
solveset(sin(3*x),x, S.Reals) types of simple equations.

This PR https://github.com/sympy/sympy/pull/10552 returning
 >>> print solveset(sin(3*x)-1,x, S.Reals)
ImageSet(Lambda(_n, 2*_n*pi - pi/2), Integers()) U ImageSet(Lambda(_n, 
2*_n*pi + pi/6), Integers()) U ImageSet(Lambda(_n, 2*_n*pi + 5*pi/6), 
Integers())
 that is also correct answer with incorrect answer :  (2*_n*pi - pi/2) this 
is wrorng.
solving this type of equation is easy with exp form that sympy do, but 
before rewriting them into exp form need better expression in sin, cos form
so that sympy can handle exp form of this and return exact answer ,that is 
needed.
>>> solveset(sin(x)-1/2,x,S.Reals)
∅
Here we need to make sure we write solveset(sin(x)-S(1)/2,x,S.Reals) , that 
most of the people don't use generally.Is there any way tha
t we dont need to write like this  S(1)/2.


I also found problem in inverse trigonometric functions like :
>>> solveset(acos(-1/2)-x ,x)
{2.0943951023932}
which is not correct and also all the solution is not in radian/degree (in 
the form of pi) , which is expected.

If solveset is able to solve all types of inverse trig equations then using 
this we may get a way to solve  solveset(sin(3*x)-1,x, S.Reals) this types 
of 
problem without converting them into exp form. also using fu module we can 
convert Mul, divide sin ,cos equation to single argument then it's inverse 
may lead to
proper answer.


--
Shekhar Prasad Rajak



On Thursday, 4 February 2016 22:45:35 UTC+5:30, Aaron Meurer wrote:
>
>
>
> On Thu, Feb 4, 2016 at 12:07 PM, Shekhar Prasad Rajak <
> shekharr...@gmail.com <javascript:>> wrote:
>
>> Thanks for sharing the links, Aaron.
>> Regarding Issue https://github.com/sympy/sympy/issues/10426 ,I opened a 
>> PR : https://github.com/sympy/sympy/pull/10482
>> this PR is able to give solutions in simple form in many cases.
>> When I was trying to solve this issue, I found that solveset converts all 
>> the trigonometric equations into exponential form then 
>> solve them using solveset_complex . 
>> I haven't find any method that solves trig equations using fu module. fu 
>> module also need more simplify expression in different terms.
>> It is using this algorithms
>>  
>> http://rfdz.ph-noe.ac.at/fileadmin/Mathematik_Uploads/ACDCA/DESTIME2006/DES_contribs/Fu/simplification.pdf
>>   
>> <http://rfdz.ph-noe.ac.at/fileadmin/Mathematik_Uploads/ACDCA/DESTIME2006/DES_contribs/Fu/simplification.pdf>
>> that contains simple formulas only.
>>
>> Right now solveset directly convert any trig expression to it's 
>> corresponding exponential form.
>> But if we add fu module in this line : 
>>  
>> https://github.com/sympy/sympy/pull/10482/files#diff-eec0422923e8f100745c015cd8fdd6cfR540
>>  
>> <https://github.com/sympy/sympy/pull/10482/files#diff-eec0422923e8f100745c015cd8fdd6cfR540>
>> then we get simplified trig equations.Then solve them using 
>> solveset_complex , This may increase number of solutions.Isn't it ? 
>> Other way can be implement a different algorithms.
>>
>
> I don't see how it would add solutions, other than maybe canceling out 
> singularities (like cos(x)*sec(x)).
>
> I think it's also worthwhile to look into other algorithms.  
>
> By the way, I still think the solving module should be organized around 
> the abstractions of rewriting and decomposition (see 
> https://groups.google.com/forum/#!msg/sympy/42GdMJ9ssyM/swC6bHVunP8J). 
> That was written before solveset so I can't say for sure to what degree 
> solveset already follows this pattern.
>
> Aaron Meurer
>
>
>> --
>> Shekhar Prasad Rajak
>>  
>> On Thursday, 4 February 2016 00:51:39 UTC+5:30, Aaron Meurer wrote:
>>>
>>> Another good resource for what's there and what doesn't work yet is 
>>> https://github.com/sympy/sympy/blob/master/doc/src/modules/solvers/solveset.rst
>>> .
>>>
>>> Personally, I'd like to see solutions from equations involving 
>>> trigonometric expressions improved. Right now you will often get an answer 
>>> but it is not as simple as it could be (maybe this is more an issue of 
>>> simplifying set expressions). For example, solveset(sin(x), domain=S.Reals) 
>>> gives {2⋅n⋅π | n ∊ ℤ} ∪ {2⋅n⋅π + π | n ∊ ℤ} but it would be better if it 
>>> gave {n⋅π | n ∊ ℤ}.  I suggested a potential way to fix this at 
>>> https://github.com/sympy/sympy/pull/9500#discussion_r39220151. Fixing 
>>> this by improving simplifying set expressions would be nice because then it 
>>> would work even for set expressions that don't come directly from solveset. 
>>>
>>> A related use-case I found where solveset fails is solving f(x) = f(x + 
>>> a) for a not dependent on x. The ability to solve this in the positive or 
>>> the negative would tell you if f(x) is periodic (and its period if it is). 
>>> This currently fails even for sin(x) (
>>> https://github.com/sympy/sympy/issues/10426). 
>>>
>>> Aaron Meurer
>>>
>>> On Wed, Feb 3, 2016 at 2:05 PM, Shekhar Prasad Rajak <
>>> shekharr...@gmail.com> wrote:
>>>
>>>>
>>>> Hello, 
>>>> my name is Shekhar Prasad Rajak.I want to discuss about Solver and 
>>>> Solveset module
>>>> https://github.com/sympy/sympy/wiki/GSoC-2016-Ideas#solvers .I am 
>>>> going to apply for GSoc'16, so trying to know
>>>> what sympy community expecting.
>>>> Solveset came to Replace all internal solve() calls 
>>>> https://github.com/sympy/sympy/issues/8711
>>>> So I should focus on Solveset,right?
>>>> I have some questions :
>>>> 1.What are the main problems/issues in Solver and Solveset right now?
>>>> 2.Is Solveset module done?If not,what are the main features, that 
>>>> should be added ?
>>>> I have seen Harsh's PR : https://github.com/sympy/sympy/pull/7523
>>>> It seems, these need some works :
>>>> -functions solvable by LambertW
>>>>   -functions that can be recast as polynomials with a change of 
>>>> variables this, for example; this can be 
>>>>   factored out of solve  where multiple generators are handled
>>>>   -use something like this : 
>>>> https://github.com/sympy/sympy/pull/7523#issuecomment-62198981
>>>>   to handle the XFAILed test test_real_imag_splitting1, this will be 
>>>> handled in the set module.
>>>>
>>>> 3.This is list of Issues/ Discussions I found. 
>>>>
>>>> https://github.com/sympy/sympy/wiki/GSoC-2014-Application-Harsh-Gupta:-Solvers#relevant-issues-discussions-and-references
>>>>   
>>>> <https://github.com/sympy/sympy/wiki/GSoC-2014-Application-Harsh-Gupta:-Solvers#relevant-issues-discussions-and-references>
>>>> but I don't know, whether they are solved or not.
>>>> Issues which are still open in github repo, need solutions.
>>>> There are also links of pdf and research papers, I am not sure whether 
>>>> they are implemented or not.
>>>>
>>>> 4.Can we use python library multiprocessing,Synchronization for the 
>>>> faster execution?one issue was opened for the same,which is closed now.But 
>>>> it is always better to take less time.
>>>>
>>>>
>>>> --
>>>> Shekhar Prasad Rajak
>>>>
>>>> -- 
>>>> 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 https://groups.google.com/group/sympy.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/sympy/33a1b294-4a48-413a-a96f-90899291c1b0%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/sympy/33a1b294-4a48-413a-a96f-90899291c1b0%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>> 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 <javascript:>.
>> To post to this group, send email to sy...@googlegroups.com <javascript:>
>> .
>> 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/35c19f8c-0bc5-4aba-9b13-35bc16aff761%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sympy/35c19f8c-0bc5-4aba-9b13-35bc16aff761%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/d33c2167-c3db-4f86-a98c-50544aa4af67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to