7 years, 47 days

## Another form...

I copy your code with some changes.
restart;
F := proc(ee, LL) Typesetting:-mrow(InertForm:-Typeset(InertForm:-Display(eval(eval(InertForm:-MakeInert(factor(ee)), [`%*` = `*`]) = InertForm:-MakeInert(map(sort, algsubs(a*x = InertForm:-MakeInert(a*x), ee), order = plex(b))), `=`~([a, b], LL)), inert = false)), Typesetting:-mo("="), InertForm:-Typeset(eval(ee, `=`~([a, b], LL)))); end proc;
p := (a*x)^2  + 2*a*x*b*y + (b*y)^2;
L := [[2, 3], [2, 5], [2, 7]];
ans := F~(p, L);
print~(ans);

How can I get out put (2x-3y)^2 = (2*x)^2 - 2*(2*x)*(3*y) + (3*y)^2 = 4x^2 - 12xy+9y^2.

## Yes. Thank you very much....

@Carl Love Yes. Thank you very much.

## Yes. Thanks....

@acer Yes. Thanks. How a bout L if L is a list, e.g L := [[2,3],[3,7],[9,10]];

## Another way to write...

@acer Instead of writing (2*x-3)^2 = (2*x)^2 - 2*3*(2*x) + 3^2, can I get (2*x-3)^2 = (2*x)^2 - 2*(2*x)*3 + 3^2?

## Thank you very much...

@acer Thank you very much.

## How can I joint two command...

@acer How can I joint two commands  Display(temp, inert=false) and value(temp); to get answers like this x^2 - 2x - 3x + 6 = x^2 - 5 x + 6.

## A simple proof...

Consider f(x) = (x-a)^4  + (x-b)^4 - c;

We have

f'(x) = 4*(x - a)^3 + 4*(x - b)^3;

f''(x) = 12*(x - a)^2 + 12*(x - b)^2 >=0
This means that the graph is concave up everywhere, therefore f(x) = 0  cannot have more than two real roots.

## Only two solution...

@Carl Love I try with your c. I got