2
$\begingroup$
expr=(2 (x1-x3) (x2^2-x3^2+y2^2-y3^2)+2 (x2-x3) (-x1^2+x3^2-y1^2+y3^2))/
  (4 (x3 (y1-y2)+x1 (y2-y3)+x2 (-y1+y3)));

Through[{Simplify,FullSimplify,Cancel}[expr]]

Obvious, this algebraic expression could be cancel common factors 2, I have tried Simplify, FullSimplify and Cancel, FullSimplify doesn't know simplify it, Cancel make it more complicated. enter image description here

$\endgroup$
1
  • $\begingroup$ I usually use Factor in such situations. $\endgroup$
    – Somos
    Jun 17, 2019 at 10:39

2 Answers 2

1
$\begingroup$

Try

expr // Together

which eleminates Factor 2

$\endgroup$
0
$\begingroup$

This is not answer, but a workaround and an observation, as I do not know why Mathematica does not cancel the 2 out from the expression automatically.

But if you type this

ClearAll[a]
num = (a (x1 - x3) (x2^2 - x3^2 + y2^2 - y3^2) + a (x2 - x3) (-x1^2 + x3^2 - y1^2 + y3^2));
den = (2*a (x3 (y1 - y2) + x1 (y2 - y3) + x2 (-y1 + y3)));
num/den

You'll see it also does not cancel the a.

Mathematica graphics

So for a workaround, just do

Collect[num, a]/den

And now it is canceled giving

Mathematica graphics

Note, in my answer above, I assumed you wanted to keep the form of the numerator and denominator not expanded. If you do not care about this, then you could always expand and then simplify:

 Simplify[Expand[num]/Expand[den]]

Mathematica graphics

Which cancels the 2

$\endgroup$

Your Answer

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

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