>>> from sympy import *
>>> x,y=map(symbols, "xy")

Abraham de Moivre <https://en.wikipedia.org/wiki/Abraham_de_Moivre> taught 
us that :

>>> cos(x).rewrite(exp)
exp(I*x)/2 + exp(-I*x)/2

This expression can be solved for all possible values, not only for reals 
of absolute value not superior to 1. However, the latter are the only ones 
for which the solution is real. Generally :

>>> solve(Eq(y,cos(x).rewrite(exp)), x)
[-I*log(y - sqrt(y**2 - 1)), -I*log(y + sqrt(y**2 - 1))]

Sympy’sacos returns one of these values.

HTH,
​
Le mercredi 8 décembre 2021 à 23:49:48 UTC+1, raphael.g...@gmail.com a 
écrit :

> Hello
> Example for acos(1.279) one get the complex value *0.730*I *
> What the meaning of that ?
>
> Best regards
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/59ee995d-82e6-4ca2-8db1-c7775fe652c0n%40googlegroups.com.

Reply via email to