Completing the Square: Solving Multivariable Equations

  • Thread starter Thread starter Ted123
  • Start date Start date
  • Tags Tags
    Square
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
Ted123
Messages
428
Reaction score
0
How do I complete the square for: [tex]x^2 + 2y^2 + 2z^2 + 4xy +4xz + 4yz[/tex]
I can do it for a normal quadratic [itex]ax^2 + bx + c[/itex] but how do I do it for something like this with more than one variable?
 
Physics news on Phys.org
Ted123 said:
How do I complete the square for: [tex]x^2 + 2y^2 + 2z^2 + 4xy +4xz + 4yz[/tex]
I can do it for a normal quadratic [itex]ax^2 + bx + c[/itex] but how do I do it for something like this with more than one variable?
I doubt that there is one particular "correct" result for this.

Notice that this polynomial does contain a perfect square for two of the variables, y & z: [itex]2y^2+4yz+2z^2=2(y+z)^2\,.[/itex]

Factor 4x out of the two remaining "mixed" terms.
[itex]x^2+4x(y+z)+2(y+z)^2[/itex]​
I see two ways to finish. You can figure out how many terms of (y+z)2 to add & subtract, or you can figure out how many terms of x2 to add & subtract. The latter way gives a simpler looking answer.
 
SammyS said:
I doubt that there is one particular "correct" result for this.

Notice that this polynomial does contain a perfect square for two of the variables, y & z: [itex]2y^2+4yz+2z^2=2(y+z)^2\,.[/itex]

Factor 4x out of the two remaining "mixed" terms.
[itex]x^2+4x(y+z)+2(y+z)^2[/itex]​
I see two ways to finish. You can figure out how many terms of (y+z)2 to add & subtract, or you can figure out how many terms of x2 to add & subtract. The latter way gives a simpler looking answer.

I've got it equal to the sum of squares: [tex]2(x+y+z)^2 - x^2[/tex] What does this mean the rank and signature is? There is 1 positive square and 1 negative square so is the rank 1+1=2 and the signature 1-1=0?
 
Ted123 said:
How do I complete the square for: [tex]x^2 + 2y^2 + 2z^2 + 4xy +4xz + 4yz[/tex]
I can do it for a normal quadratic [itex]ax^2 + bx + c[/itex] but how do I do it for something like this with more than one variable?

You can apply (essentially) the algorithm that leads to Cholesky factorization of a matrix. In your example, start by looking at the x-terms, which are [itex]x^2 + 4xz + 4yz .[/itex] These are what you would get if you looked at [itex](x+2y+2z)^2,[/itex] because that is where you would get terms of the form 4xy and 4xz. Anyway, we have [tex]x^2 + 4xy + 4xz = (x+2y + 2z)^2 - 4y^2 - 4z^2 - 8yz,[/tex], so your function f(x,y,z) is
[tex](x+2y+2z)^2 -2y^2 - 2z^2 -4yz.[/tex] Now [tex]2y^2+2z^2+4yz = 2(y+z)^2,[/tex]
so we finally have [tex]f(x,y,z) = (x+2y+2z)^2-2(y+z)^2.[/tex]

RGV
 
Ray Vickson said:
You can apply (essentially) the algorithm that leads to Cholesky factorization of a matrix. In your example, start by looking at the x-terms, which are [itex]x^2 + 4xz + 4yz .[/itex] These are what you would get if you looked at [itex](x+2y+2z)^2,[/itex] because that is where you would get terms of the form 4xy and 4xz. Anyway, we have [tex]x^2 + 4xy + 4xz = (x+2y + 2z)^2 - 4y^2 - 4z^2 - 8yz,[/tex], so your function f(x,y,z) is
[tex](x+2y+2z)^2 -2y^2 - 2z^2 -4yz.[/tex] Now [tex]2y^2+2z^2+4yz = 2(y+z)^2,[/tex]
so we finally have [tex]f(x,y,z) = (x+2y+2z)^2-2(y+z)^2.[/tex]

RGV

So is the rank 2 and the signature 0?