2
$\begingroup$

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.

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

1 Answer 1

4
$\begingroup$

These expressions are not equal. c has a singularity in la, d has it not.

Plot[Evaluate[{c, d} /. {l -> 1, p0 -> 2, ia -> 3, e -> 4, p0 -> 5, 
     i -> 6}], {la, -3, 3}, PlotRange -> .01, PlotStyle -> {Red, Blue}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much! I did not notice that ! $\endgroup$
    – henry
    Mar 25, 2018 at 12:45

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.