1
$\begingroup$
Simplify[1/(1/a + 1/b)]

{ (a b)/(a + b) }

That doesn't look right. The given function has an infinite term for a = 0 and one for b = 0, while the result has one for (a + b) = 0. So that's probably the reason why:

a b/(a + b) === 1/(1/a + 1/b)

{ False }

though only a minute ago it Simplified it that way! Also

Simplify[1/(1/x)]  

{ x }

seems to disregard the 1/0 case. Can anybody get me out of my confusion?

$\endgroup$
3
  • $\begingroup$ a b/(a + b) === 1/(1/a + 1/b) returns False because they are not structurally the same (which is what SameQ[] checks for). As for your actual question, Mathematica returns what is called a "generically correct" answer; see this for details. $\endgroup$ Commented Jul 12, 2012 at 12:47
  • $\begingroup$ You seem to be confused about the math itself a bit. The general notion you are missing is that 1/inf=0 , so 1/(1/0)=1/inf=0. There is absolutely no problem in simplifying 1/(1/x)=x. The simplification in the first case are also equivalent when you plug in zeros, for a=0, the first is 1/(inf+1/b)=1/inf=0, and the second is 0*b/(0+b)=0. So you are simply reasoning wrongfully about these "boundary cases". $\endgroup$
    – jVincent
    Commented Jul 12, 2012 at 13:19
  • $\begingroup$ @jVincent - I know that, thanks. I was just wondering if MMA keeps track of every element in the equation to determine the domain of the function as a whole. $\endgroup$
    – stevenvh
    Commented Jul 12, 2012 at 13:33

1 Answer 1

2
$\begingroup$

Use FullSimplify when testing equality:

x = 1/(1/a + 1/b)
Simplify[x]
FullSimplify[% == x]

enter image description here

$\endgroup$
3
  • $\begingroup$ Simplify[% == x] also returns True $\endgroup$
    – stevenvh
    Commented Jul 12, 2012 at 13:22
  • $\begingroup$ Last item of the Equal docs, Possible Issues, adds FullSimplify. It's not an exact match to your case. reference.wolfram.com/mathematica/ref/Equal.html $\endgroup$ Commented Jul 12, 2012 at 13:23
  • $\begingroup$ It's circular in this case, but the conclusion is use Simplify when testing equality. $\endgroup$ Commented Jul 12, 2012 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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