On Tue, Sep 8, 2015 at 2:36 PM, Ondřej Čertík <
ondrej...@gmail.com> wrote:
> On Thu, Sep 3, 2015 at 8:41 AM, Titas Chanda <
titas....@gmail.com> wrote:
>> #### I have already posted it on github. #######
>
> Please post a link, so that people don't need to search for it.
>
>>
>>
>>
>> Hi,
>>
>>
>> sympy sqrt and conjuagte are not commuting for symbols....
>>
>>
>>
>>
>> import sympy as sm
>> a = sm.Symbol('a')
>> sm.sqrt(sm.conjugate(a)) == sm.conjugate(sm.sqrt(a))
>> False
>>
>>
>>
>> They are not even cancelling each other....
>
> That's because they are not equal to each other. Just try some numbers:
>
> In [1]: from cmath import sqrt
>
> In [2]: a = -1
>
> In [3]: sqrt(a.conjugate())
> Out[3]: 1j
>
> In [4]: sqrt(a).conjugate()
> Out[4]: -1j
>
> If you want to understand why, I have thorough notes here:
>
>
http://www.theoretical-physics.net/dev/math/complex.html
>
> Let me know if you have any questions.