Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Sum of Products - Complete The Square

88 views
Skip to first unread message

Andrzej Kozlowski

unread,
Jun 2, 2012, 5:42:40 AM6/2/12
to


On 31 May 2012, at 08:51, djmpark wrote:

> Thanks for introducing/reminding us of SymmetricPolynomial and the
> associated SymmetricReduction. SymmetricReduction is the high tech
> generalization of complete the square.
>
> 3 x^2 + y^2 + 6 x y;
> Total@SymmetricReduction[%, {x, y}]
>
> 2 y^2 + 3 (x + y)^2

1. This is not quite right:

3 x^2 + y^2 + 6 x y;
Total@SymmetricReduction[%, {x, y}]

-2 y^2 + 3 (x + y)^2

2. I don't see why this a "generalisation of complete the square". In
fact, there is no well defined notion of completing the square for
arbitrary quadratic expressions in two variables, e.g. this is another
one:

(1/3)*(3*x + Sqrt[3]*y)^2 + x*y*(6 - 2*Sqrt[3])

In any case, symmetric reduction is about symmetric polynomials and not
about squares and it is based not on anything "high tech" but in fact on
an extremely classical fact, (known as the fundamental theorem of
symmetric functions:
http://mathworld.wolfram.com/FundamentalTheoremofSymmetricFunctions.html)
that gave rise to the subject of invariant theory, namely, that the ring
of invariants of the symmetric group on n symbols acting on polynomials
in n-variables is a polynomial ring in n-variables. These new variables
are known as the elementary symmetric functions.

The seeming relation with completing the square is quite incidental. The
only reason why it looks this way is that the first elementary
polynomial is the sum of the variables so if the expression is a
quadratic you will get in it (x+y+=85)^2. But:

Total[SymmetricReduction[(2 x + y)^2, {x, y}]]

-4 x y - 3 y^2 + 4 (x + y)^2

A complete square was turned in to an incomplete one. One would hardly
want to call this "completing the square" would one?

Andrzej Kozlowski







djmpark

unread,
Jun 3, 2012, 5:05:22 AM6/3/12
to
You're correct. I got tricked by one example into thinking
SymmetricReduction might be an easy way to do complete the square.

Complete the square, whose purpose is to eliminate the linear term in a
quadratic expression, is just barely common enough (my Thomas & Finny
Calculus book has two references to it in the index and it is sometimes used
as an integration technique) and just barely messy enough (Thomas & Finny
devote a third of the front inside cover of their book to a detailed
exposition) that I often wondered why Mathematica doesn't have a
CompleteTheSquare routine.

I do have it in Presentations.

3 x^2 + y^2 + 6 x y;
CompleteTheSquare[%, x]

-2 y^2 + 3 (x + y)^2

3 x^2 + y^2 + 6 x y;
CompleteTheSquare[%, y]

-6 x^2 + (3 x + y)^2

1/3 (3 x + Sqrt[3] y)^2 + x y (6 - 2 Sqrt[3]);
CompleteTheSquare[%, x]

y^2 - 1/12 (2 Sqrt[3] y + (6 - 2 Sqrt[3]) y)^2 +
3 (x + 1/6 (2 Sqrt[3] y + (6 - 2 Sqrt[3]) y))^2

So what do most users do? Memorize the formula? Look it up somewhere? Derive
it quickly by hand? Program up a routine to effect the transformation or put
in the step by hand typing? All of these are somewhat error prone.

I thought maybe the reason CompleteTheSquare was missing in Mathematica was
that there was some other convenient method to do it.


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/index.html
0 new messages