First of all, it appears to me that

$$\left|\frac{1}{x} + x^2\right| = \frac{|1 + x^3|}{|x|}$$

is true.

I don't know why, but my attempt to verify it in Mathematica failed.

In[1]:= Abs[1/x + x^2] === Abs[1 + x^3]/Abs[x]
Out[1]= False

It's weird because Mathematica is unable to find a counterexample.

In[2]:= FindInstance[Abs[1/x + x^2] != Abs[1 + x^3]/Abs[x], x, Complexes]
Out[2]= {}

You are using SameQ which does a direct structural comparison rather than a mathematical one. Since the expressions are not exactly the same it returns False. Try Equal:

FullSimplify[Abs[1/x + x^2] == Abs[1 + x^3]/Abs[x]]

FullSimplify is needed for nontrivial comparisons; without it Mathematica will return the equality as given if it is not trivially equivalent.

You can also use ForAll and Resolve which I think is sometimes faster (no example at hand):

ForAll[x, x != 0, Abs[1/x + x^2] == Abs[1 + x^3]/Abs[x]] // Resolve
  • $\begingroup$ Sorry, but no ForAll[x, Abs[1/x + x^2] == Abs[1 + x^3]/Abs[x]] // Resolve send False $\endgroup$ – mlpo Dec 15 '13 at 1:40
  • $\begingroup$ @mlpo Strange, it returns True in version 7. What version are you using? $\endgroup$ – Mr.Wizard Dec 15 '13 at 1:43
  • $\begingroup$ @Mr.Wizard Windows 8 Mathematica 9.01 False $\endgroup$ – Alex Dec 15 '13 at 1:46
  • 2
    $\begingroup$ @mlpo Okay, I think I have an explanation for that behavior. If x is zero we have an indeterminate expression; I think later versions may recognize this while v7 does not? In that sense your equivalence is actually false, yet that is not the result you wanted. $\endgroup$ – Mr.Wizard Dec 15 '13 at 1:46
  • 1
    $\begingroup$ 9.0.1, but I found the problem, when x = 0. Try with ForAll[x, x != 0, Abs[1/x + x^2] == Abs[1 + x^3]/Abs[x]] // Resolve $\endgroup$ – mlpo Dec 15 '13 at 1:47

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.