I'm quite new to Mathematica and have so far been unable to resolve the following (minor) technical issue. In principle, the task is very straightforward: I'd like to define the inverse of the function F(x) = 1 - x^2/(2cosh(x)-2) for x >= 0, but because F is not a 1-1 function on the reals, I often get answers with the wrong sign if I set:
g[x_] = InverseFunction[F][x]
I need to compose g with another function, so it's not enough to just reflect the plot of F in the line y=x.
The easy fix I've found is just to let
g[x_] = Abs[InverseFunction[F][x]]
but this feels like a bit of a cheat, and on my machine, it takes quite a long time to generate a plot (it is possible to speed up this process?)
Instead, I've been trying to define g as a function with a restricted domain using ConditionalExpression, as in the example at
http://reference.wolfram.com/language/ref/InverseFunction.html
I must be doing something wrong, because I don't get any plot whatsoever!
Any help would be much appreciated