6
$\begingroup$
InverseFunction[ConditionalExpression[#, 0 <= # <= 1] &]
InverseFunction[ConditionalExpression[#, -1 <= # <= 1] &]

The first line produces what I would expect:

ConditionalExpression[#1, 0 <= #1 <= 1] &

But when I make the lower limit in ConditionalExpression negative, the inequalities become strict:

ConditionalExpression[#1, -1 < #1 < 1] &

Why is this happening?

$\endgroup$
  • $\begingroup$ This bug has been handled at least in mma10.1.:) $\endgroup$ – WateSoyan May 13 '15 at 12:37
2
$\begingroup$

In the second case, the InverseFunction is computed by Solve, similarly to

In[1]:= Solve[x == y && -1 <= x <= 1 && Element[y, Reals], x]

Out[1]= {{x -> ConditionalExpression[y, -1 < y < 1]}}

According to the documentation,

Solve gives generic solutions only. Solutions that are valid only when continuous parameters satisfy equations are removed. Additional solutions can be obtained by using nondefault settings for MaxExtraConditions.

For example, the following gives the desired answer.

In[2]:= SetOptions[Solve, MaxExtraConditions -> All];
        InverseFunction[ConditionalExpression[#, -1 <= # <= 1] &]

Out[3]= ConditionalExpression[#1, -1 <= #1 <= 1] &
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.