# problem with testing if two expressions are equal

I have a small problem:

I have two expressions:

a = (ia*l^3*p0)/(12*ia*l + 6*i*la)
b =  p0*l^2/(12*(1 + 0.5*i/ia*la/l))


Obviously, they are equal. Just take expression a and multiply it by 1/(l*ia)/1/(l*ia) and finally factor out the 12 in the denominator.

Now I would like Mathematica to tell me if those two expressions are equal, therefore I used the following code:

Expand[a==b]


But it does not tell me

"True"

Why is that?

EDIT:

Writing Reduce[a==b] does the trick! :) However, there is another example where it does not work:

Here is another example where it does not work

c = (l^3 la p0)/(24 e (2 ia l + i la))
d = p0*l^2/(24*e*(2*ia/i + i/l))


Again, c is equal to d. You can multiply c by (1/(l*la)/(1/(l*la)) and you will get the same result as d.

Here I tryied: 'Reduce[c==d]but it does not work.

• I would use Reduce instead of Expand; notice you have p0 in a but po in b, – b.gates.you.know.what Mar 25 '18 at 8:46
• @b.gatessucks thanks a lot. Now it works. Can you tell me why? – henry Mar 25 '18 at 9:26
• In[175]:= PossibleZeroQ[a - b] Out[175]= True – Daniel Lichtblau Mar 25 '18 at 15:09
• a == b // Simplify – Bob Hanlon Mar 26 '18 at 0:08

Plot[Evaluate[{c, d} /. {l -> 1, p0 -> 2, ia -> 3, e -> 4, p0 -> 5,
`