Finding a Symmetric Polynomial Given Others

A recent question (whose asker refused to cooperate by showing work, so that we were unable to help) reminded me that we haven’t yet shown a similar kind of problem that can be quite interesting: problems where we are given the value of one or several expressions in several variables, and are asked for the value of another similar expression. Let’s look at some of those from the old Ask Dr. Math. We’ll see some good examples of exploration as a part of problem solving.

In case you’re interested, the recent questions, which are easy if you know what to do, were these:

If m+1/m is 2, then prove that m⁴+1/m⁴ = 2.

If x+1/x = 5, then prove that (x²-1/x²)² = 525.

I’ll just give you a little hint: In each case, start by squaring the given equation … then rearrange and do it again.

Two variables, three powers

Those recent problems involved only one variable; ours will be a little more difficult. I’ll start with one with two variables, from 2002:

x^3 + y^3

Given:  (1)  x + y = 1
        
        (2)  x^2 + y^2 = 4

Question:    x^3 + y^3 = ?

To solve this problem, can you solve (2) for x: x^2 = 4 - y^2
and (1) for x: x = 1 - y

then set  4 - y^2 = 1 - y  and factor?

He came very close to one way to solve it. Doctor Greenie answered by correcting an error, and then showing a more powerful way:

You can go that route; but the resulting quadratic expression is not factorable and so you have to use the quadratic formula. If you are careful with the algebra, however, you can arrive at the answer to your problem by that method.

In the last equation you are equating two expressions for x^2, so the right-hand side should be (1 - y)^2 instead of just 1 - y. So your last equation will read

  4 - y^2 = (1 - y)^2
  4 - y^2 = 1 - 2y + y^2
  2y^2 - 2y - 3 = 0

The quadratic formula then gives

       2 + or - sqrt(28)     1 + or - sqrt(7)
  y = ------------------- = ------------------
               4                     2

So, \(\displaystyle y=\frac{1\pm\sqrt{7}}{2}\). What is x?

To finish the problem by this method, you next use the fact that x + y = 1 to find the value for x; then you find the cube of x and the cube of y and add them together to evaluate x^3 + y^3.

We get \(\displaystyle x=1-\frac{1\pm\sqrt{7}}{2}=\frac{1\mp\sqrt{7}}{2}\); that is, x is one of the two values, and y is the other. That makes sense, because the expressions in the problem are all symmetric in x and y; that is, you can swap their values and nothing changes. This is a feature of all these problems.

Let’s finish: $$x^3+y^3=\left(\frac{1+\sqrt{7}}{2}\right)^3+\left(\frac{1-\sqrt{7}}{2}\right)^3$$ Expanding, we find that $$\left(\frac{1+\sqrt{7}}{2}\right)^3=\left(\frac{1+\sqrt{7}}{2}\right)^2\left(\frac{1+\sqrt{7}}{2}\right)\\=\left(\frac{4+\sqrt{7}}{2}\right)\left(\frac{1+\sqrt{7}}{2}\right)=\frac{11+5\sqrt{7}}{4}$$ and similarly $$\left(\frac{1-\sqrt{7}}{2}\right)^3=\frac{11-5\sqrt{7}}{4}$$ Adding these, we get \(x^3+y^3=\frac{11}{2}\).

Exploring pathways between them

Using your method, you actually find values for x and y. The problem doesn't require that you do so; and solving it by that method requires more complicated algebra than is necessary.

The problem only asks for the value of x^3 + y^3. There is another general method for attacking problems like this.

The general idea of this alternate method is to multiply one or more of the given expressions together to get an expression containing the terms x^3 and y^3 and see if you can evaluate the value of x^3 + y^3 from the resulting equation(s). Unless you have a lot of experience solving problems of this type, it is unlikely that you will know whether a particular path you start down using this method will lead you anywhere useful - you just need to go ahead and try those paths and see what happens.

Once again (as we saw last week) problem solving can involve “wishful thinking”, just trying things (for good reasons) to see which ones work. Never be afraid to “just try something”; but always be gaining experience with what works and what doesn’t.

In this example, we have two given equations:

(1) x + y = 1
(2) x^2 + y^2 = 4

One way we can get an expression containing the desired terms is to multiply the expressions in (1) and (2) together:

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

He distributed, than collected similar terms, and solved for the desired expression.

Substituting the known values for (x + y) and (x^2 + y^2), we have

  (1)(4) - xy(1) = x^3 + y^3

And we have obtained the following equation for x^3 + y^3:

(3)  x^3 + y^3 = 4 - xy

Unfortunately, we don't know the value of xy, so this by itself hasn't solved the problem for us.

But we’ve taken a big step in the right direction. If only we knew the product \(xy\)! It’s time for more wishing …

So let's go back and find another way of obtaining an expression containing the desired terms. One other way to do this is to multiply (1) by itself three times:

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

We now have a second way to get the desired sum, which again uses \(x+y\) and \(xy\).

Again substituting the known values for (x + y) and (x^2 + y^2), we have

  (1)^3 - 3xy(1) = x^3 + y^3

And we have obtained another equation for x^3 + y^3:

(4)  x^3 + y^3 = 1 - 3xy

Again, we don't know the value of xy, so this too, by itself, hasn't solved the problem for us.

But when you have two ways to get the same number, algebra provides a solution:

But there is a path to the solution to be found among our results.  From equations (3) and (4), we have

  4 - xy = 1 - 3xy
  2xy = -3
  xy = -3/2

Now we DO know the value of xy, so we can find the value of x^3 + y^3 using that value for xy in either equation (3) or (4):

  x^3 + y^3 = 4 - xy = 4 - (-3/2) = 4 + 3/2 = 11/2

This is the answer you will get if you continue down the path you started on originally.

Another way to say all this would be that we had a system of equations in \(A=x^3+y^3\) and \(B=xy\), namely $$[3] A=4-B\\ [4] A=1-3B$$ We’ve solved that for \(A=\frac{11}{2}\) – which is, indeed what we got the other way.

This way took a lot of work and thinking, while the other involved some ugly calculations. Bigger problems of this sort, however, involve higher-degree equations, for which there is no simple formula. Then, this tricky way is far better!

Three variables, four powers

The next question is from 2001:

Algebra Puzzle

Okay, here you go... if this is true:

                       x + y + z = 1
                 x*x + y*y + z*z = 2
           x*x*x + y*y*y + z*z*z = 3

find (without solving the equation):

     x*x*x*x + y*y*y*y + z*z*z*z = ?

I've tried everything. Please help me!

I answered after a week:

Hello, Johann.

This question stuck in my mind until I had the time to solve it, and I want to give you a hint you can try.

I will write "x^2" for x squared, and so on. I will also generalize the problem a little. Suppose we know that:

           x + y + z = A

     x^2 + y^2 + z^2 = B

     x^3 + y^3 + z^3 = C

Now we want to find D:

     x^4 + y^4 + z^4 = D

By using letters for the known and unknown values, I both generalized (so I could solve all problems like this at once!), and gave names to the expressions, as I did in my final suggestions for the last problem (making things easier to write).

I tried combining the original equations in various ways to get something that includes D and other symmetrical expressions; here is one that I found useful:

    AC = (x + y + z)(x^3 + y^3 + z^3)

       = (x^4 + y^4 + z^4) + (xy^3 + xz^3 + yx^3 + yz^3 + zx^3 + zy^3)

       = (x^4 + y^4 + z^4) + (xy*x^2 + xy*y^2 + xy*z^2)
         + (yz*x^2 + yz*y^2 + yz*z^2) + (zx*x^2 + zx*y^2 + zx*z^2)
         - (xy*z^2 + yz*x^2 + zx*y^2)

       = (x^4 + y^4 + z^4) + (xy + yz + zx)*(x^2 + y^2 + z^2)
         - xyz*(x + y + z)

       = D + PB - QA

where

     P = xy + yz + zx
     Q = xyz

We know A, B, and C; we want to find D; but we also don’t know P and Q. Can we find two more equations so we can solve for the three unknowns?

The fact that P and Q are symmetrical with respect to the three variables suggests that they might appear in other expressions involving A, B, and C; if we can find P and Q in terms of A, B, and C, we will be able to find D.

To do this, I used:

   A^2 = (x + y + z)(x + y + z)

       = (x^2 + y^2 + z^2) + 2(xy + yz + zx)

       = B + 2P

and

    AB = (x + y + z)(x^2 + y^2 + z^2)

       = (x^3 + y^3 + z^3) + (xy^2 + xz^2 + yx^2 + yz^2 + zx^2 + zy^2)

       = (x^3 + y^3 + z^3) + (xy*x + xy*y + xy*z - xyz)
         + (yz*x + yz*y + yz*z - xyz) + (zx*x + zx*y + zx*z - xyz)

       = (x^3 + y^3 + z^3) + xy*(x + y + z) + yz*(x + y + z)
         + zx*(x + y + z) - 3xyz

       = (x^3 + y^3 + z^3) + (xy + yz + zx)*(x + y + z) - 3xyz

       = C + PA - 3Q

So we now have a system of three equations: $$[1] AC=D+PB-QA\\ [2] A^2=B+2P\\ [3] AB=C+PA-3Q$$ We want to eliminate P and Q. We can start by solving [2] for P: $$P=\frac{A^2-B}{2}$$ Now we can put that into [3]: $$AB=C+\frac{A^3-AB}{2}-3Q$$ and solve for Q: $$3Q=C+\frac{1}{2}A^3-\frac{1}{2}AB-AB=C+\frac{1}{2}A^3-\frac{3}{2}AB\\Q=\frac{1}{6}A^3-\frac{1}{2}AB+\frac{1}{3}C$$ Finally, plugging P and Q into [1] and solving for D, we get: $$AC=D+\frac{1}{2}A^2B-\frac{1}{2}B^2-\frac{1}{6}A^4+\frac{1}{2}A^2B-\frac{1}{3}AC\\AC=D-\frac{1}{3}AC-\frac{1}{2}B^2+A^2B-\frac{1}{6}A^4$$

$$D=\frac{1}{6}A^4-A^2B+\frac{4}{3}AC+\frac{1}{2}B^2$$

You'll be able to solve this for D. What I'm not sure of is whether there are any actual solutions in x, y, and z at all; but if there are, this will tell you what x^4 + y^4 + z^4 has to be. (I think actually solving for x, y, and z requires solving a sixth-degree polynomial, and they may be complex.) I'd feel a lot surer of my solution if I could check it!

For our specific values \(A=1,B=2,C=3\), we have $$D=\frac{1}{6}1^4-1^22+\frac{4}{3}(1)(3)+\frac{1}{2}2^2=\frac{1}{6}-2+4+2=\frac{25}{6}=4.1666\dots$$

My comment about wanting to see the actual values of the variables reflects the first way we solved the smaller problem above; here it is much harder. But Wolfram Alpha can do it for us; it turns out …

The six solutions are just permutations of the same three values, which makes sense. I’ll use the first, $$x=1.43085\\y=-0.215425-0.264713i\\z=-0.215425+0.264713i$$

Checking, we find $$A=1.43085+(-0.215425-0.264713i)+(-0.215425+0.264713i)=1$$

$$B=1.43085^2+(-0.215425-0.264713i)^2+(-0.215425+0.264713i)^2\\=2.047332+(-0.023665+0.114052i)+(-0.023665-0.114052i)=2$$

$$C=1.43085^3+(-0.215425-0.264713i)^3+(-0.215425+0.264713i)^3\\=2.929425+(0.035289-0.030834i)+(0.035289+0.030834i)=3$$

$$D=1.43085^4+(-0.215425-0.264713i)^4+(-0.215425+0.264713i)^4\\=4.191567+(0.000560+0.013285i)+(0.000560-0.013285i)=4.19679$$

The difference between this and \(4.1666\dots\) may be due to a rounding error.

Same problem, different numbers, different way

Our final question  (the same problem with different numbers!) is from later in 2001:

The Particular and the General Case

If a + b + c = 3 and
   a^2 + b^2 + c^2 = 5 and
   a^3 + b^3 + c^3 = 7

what is a^4 + b^4 +c^4 ?  And how is it done?

Doctor Greenie answered after two days, starting with a specific solution with the given numbers, and then generalizing it:

Hello, Phil -

I have seen problems like this before, but I have never taken the time to try to finish working one of them out to the end. Having had some free time since I first saw this question of yours, I have solved this problem - not just your specific case, but the general case. Thanks for sending the question; it gave me a lot of good (and enjoyable) mental exercise.

I'll present my solution roughly as I was able to figure it out. The actual path I took to the solution was more convoluted than the presentation below; I have cleaned things up a bit.

This was before he answered the two-variable question we started with, so perhaps there he drew upon this experience. He’ll be showing us much of his thinking, but skipping some dead ends!

We start with

(1) a + b + c = 3
(2) a^2 + b^2 + c^2 = 5
(3) a^3 + b^3 + c^3 = 7

And we want to find the numerical value of

    a^4 + b^4 + c^4 = ?

I first noticed that I could get an expression including the required terms a^4, b^4, and c^4 by multiplying together either equations (1) and (3) above, or by multiplying equation (2) above by itself. I actually started down both paths more or less in parallel and chose the latter path when it appeared to hold more promise than the former.

This is how exploration works! You will recall that I used \(AC\) together with \(A^2\) and \(AB\). He abandoned \(AC\) and instead uses \(B^2\). So we’ll get to see a different approach here.

So we have

   (a^2 + b^2 + c^2)^2 = (a^4 + b^4 + c^4) + 2(a^2b^2 + a^2c^2 + b^2c^2)

and so

   (a^4 + b^4 + c^4) = (a^2 + b^2 + c^2)^2 - 2(a^2b^2 + a^2c^2 + b^2c^2)

Then, substituting from equation (2), we have

(4) (a^4 + b^4 + c^4) = 25 - 2(a^2b^2 + a^2c^2 + b^2c^2)

The overall style of the work is similar to mine, expressing one symmetric polynomial in terms of others; but choosing a different set. If we call the new expression \(R=a^2b^2 + a^2c^2 + b^2c^2\), we have \(D=B^2-2R\).

Now, to get a numerical value for (a^4 + b^4 + c^4), we need to evaluate the expression

   (a^2b^2 + a^2c^2 + b^2c^2)

After some pondering, I determined that I could obtain an expression including these terms by squaring the expression

   (ab + ac + bc)

and that, in turn, I could obtain an expression including these terms by squaring the given equation (1).

Just as we found before, we need to combine the given expressions in a different way to bring in this extra expression. Now he’ll be using my \(A^2\).

Note that I had no idea at this point whether this approach would lead to expressions that I could evaluate using equations (1), (2), and (3) - but, as you will see, it works out very nicely.

   (a + b + c)^2 = (a^2 + b^2 + c^2) + 2(ab + ac + bc)

and so

   (ab + ac + bc) = [(a + b + c)^2 - (a^2 + b^2 + c^2)]/2

Then, substituting from equations (1) and (2), we have

(5)  (ab + ac + bc) = (9-5)/2 = 2

In my terms, this is \(P=\frac{1}{2}(A^2-B)\).

Next

   (ab + ac + bc)^2 =
   (a^2b^2 + a^2c^2 + b^2c^2) + 2(a^2bc + ab^2c + abc^2)

and so

   (a^2b^2 + a^2c^2 + b^2c^2) =
   (ab + ac + bc)^2 - 2(a^2bc + ab^2c + abc^2) =
   (ab + ac + bc)^2 - 2abc(a + b + c)

Then, substituting from equations (1) and (5), we have

(6)  (a^2b^2 + a^2c^2 + b^2c^2) = 2^2 - 2abc(3) = 4 - 6abc

In my terms, this is \(R=P^2-2QA\).

And substituting (6) in (4), we now have

    (a^4 + b^4 + c^4) = 25 - 2(4 - 6abc)

or

(7) (a^4 + b^4 + c^4) = 17 + 12abc

This is \(D=B^2+2(P^2-2QA)=B^2+2P^2-4QA\). We still need to find Q.

So now we can evaluate the desired expression (a^4 + b^4 + c^4) if we can evaluate the expression abc.

When I got to this point, I realized I could get an expression involving the term abc by multiplying equation (1) by itself three times....

   (a + b + c)^3 = (a + b + c)(a + b + c)^2 =
   (a + b + c)(a^2 + b^2 + c^2 + 2ab + 2ac + 2bc) =
   a^3 +  ab^2 +  ac^2 + 2a^2b + 2a^2c + 2abc
                       +  a^2b         + 2abc + b^3 +  bc^2 + 2b^2c
       + 2ab^2 + 2ac^2         +  a^2c + 2abc       + 2bc^2 +  b^2c + c^3
   ----------------------------------------------------------------------
   a^3 + 3ab^2 + 3ac^2 + 3a^2b + 3a^2c + 6abc + b^3 + 3bc^2 + 3b^2c + c^3

   = (a^3 + b^3 + c^3) + 3(ab^2 + ac^2 + a^2b + bc^2 + a^2c + b^2c) + 6abc

and so

   6abc = (a + b + c)^3 - (a^3 + b^3 + c^3)
          - 3(ab^2 + ac^2 + a^2b + bc^2 + a^2c + b^2c)

We’d like to express this last term using those we’ve already seen.

Looking at this, I first tried grouping some terms...

  6abc = (a + b + c)^3 - (a^3 + b^3 + c^3)
         - 3[a(b^2 + c^2) + b(a^2 + c^2) + c(a^2 + b^2)]

and then, after some examination of this expression, I saw that I could get clever by adding and subtracting 3(a^3 + b^3 + c^3) to the expression on the right:

   6abc = (a + b + c)^3 
          - (a^3 + b^3 + c^3) + 3(a^3 + b^3 + c^3)
          - 3[a(b^2 + c^2) + b(a^2 + c^2) + c(a^2 + b^2)]
          - 3(a^3 + b^3 + c^3)
   6abc = (a + b + c)^3 + 2(a^3 + b^3 + c^3)
          - 3[a(a^2 + b^2 + c^2) + b(a^2 + b^2 + c^2)
              + c(a^2 + b^2 + c^2)]

(8) 6abc = (a + b + c)^3 + 2(a^3 + b^3 + c^3)
          - 3(a + b + c)(a^2 + b^2 + c^2)

In my terms, this says \(6Q=A^3+2C-3AB\).

Substituting from equations (1), (2), and (3), we have

   6abc = 3^3 + 2(7) - 3(3)(5) = 27 + 14 - 45 = -4

and so

(9)  abc = -4/6 = -2/3

Then, finally, substituting this in equation (7), we have

   (a^4 + b^4 + c^4) = 17 + 12abc = 17 + 12(-2/3) = 17-8

and we finally have our result:

    a^4 + b^4 + c^4 = 9

This time, too, Wolfram Alpha gives us the values of the variables and permits a direct check:

Checking, we find $$-0.240012+(1.62001-0.391436i)+(1.62001+0.391436i)=3$$

$$(-0.240012)^2+(1.62001-0.391436i)^2+(1.62001+0.391436i)^2\\=0.057606+(2.471210-1.268260i)+(2.471210+1.268260i)=5$$

$$(-0.240012)^3+(1.62001-0.391436i)^3+(1.62001+0.391436i)^3\\=0.013826+(3.506943-3.021915i)+(3.506943+3.021915i)=7.02$$

$$(-0.240012)^4+(1.62001-0.391436i)^4+(1.62001+0.391436i)^4\\=0.003318+(4.498396-6.268277i)+(4.498396+6.268277i)=9$$

So the answer is correct. (The sum of cubes appears to be a little more sensitive to rounding error.)

But how can we check the answer without such technology? One way is to generalize, producing a general formula that we might try out in an easy case or two.

Making it general, and checking

After going through the algebra for your particular case, I went back and worked out the general case:

(1)       a + b + c = x
(2) a^2 + b^2 + c^2 = y
(3) a^3 + b^3 + c^3 = z

I will spare you the details of the algebra for this general case (if you really love algebra, you might want to try to work it through for yourself). I came up with the following expression for a^4 + b^4 + c^4:

  a^4 + b^4 + c^4 = y^2 - 2[((x^2 - y)/2)^2 - (x^4 - 3x^2y + 2xz)/3]

In my terms, again, this is $$D=B^2-2\left[\left(\frac{A^2-B}{2}\right)^2-\frac{A^4-3A^2B+2AC}{3}\right]$$ We might simplify it to $$D=\frac{4}{3}AC+\frac{1}{2}B^2-A^2B+\frac{1}{6}A^4$$

This agrees with my formula, though it was obtained in a rather different way.

I checked this result using the values from your problem. With x=3, y=5, and z=7, we get

  a^4 + b^4 + c^4 = 25 - 2[((9-5)/2)^2 - (3^4-3(3^2)(5) + 2(3)(7))/3]
                  = 25 - 2[4-(81-135+42)/3]
                  = 25 - 2[4-(-12/3)]
                  = 25 - 2(4+4)
                  = 25 - 2(8)
                  = 25 - 16
                  = 9

This verifies that he did the same work both times, which is encouraging.

You can also check the general result by choosing numbers for a, b, and c. For example, if a = 1, b = 2, c = 3, then x = a + b + c = 6, y = a^2 + b^2 + c^2 = 14, and z = a^3 + b^3 + c^3 = 36; the formula should give us a^4 + b^4 + c^4 = 81 + 16 + 1 = 98.

  a^4 + b^4 + c^4 = y^2 - 2[((x^2 - y)/2)^2 - (x^4 - 3x^2y + 2xz)/3]
                  = 196 - 2[((36-14)/2)^2-(1296-3(36)(14)+2(6)(36))/3]
                  = 196 - 2[121-(1296-1512+432)/3]
                  = 196 - 2[121-216/3)
                  = 196 - 2(121-72)
                  = 196 - 2(49)
                  = 196 - 98
                  = 98

Thanks again for the nice problem.

This is how the general formula permits a powerful check: Starting with values for the sums, we aren’t even sure the variables exist. But starting with arbitrary values of the variables, we can make up a problem with a known solution and check it. (Why didn’t I think of that?)

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.