I write the following equation my_Eq
. a
and b
are reals.
a,b=sp.symbols('a,b',real=True)
my_Eq=sp.Eq(sp.tanh(a),b)
When I tried to solve it : sp.solve(my_Eq,a)
, two solutions are found : [log(-sqrt(-(b + 1)/(b - 1))), log(sqrt(-(b + 1)/(b - 1)))]
In the first solution, a
is the log of something negative. Why did I obtained this solution because a
and b
are declared reals
?
After, log
, sqrt
are used. How is to possible to have something very simple : a=atanh(b)