# Completing the square

tuanle007
x^2 + y^2 - 2pxy = (x-py)^2 - (py)^2 + y^2

can someone please help me with this. i totally forgot how to do completing the square.

## Answers and Replies

kamerling
x^2 + y^2 - 2pxy = (x-py)^2 - (py)^2 + y^2

can someone please help me with this. i totally forgot how to do completing the square.

you yust did complete the square. you only have a term of the form (x-A)^2 left and terms that do not depend on x.

Last edited:
Homework Helper
Gold Member
When you perform the right-hand side multiplication and simplification, the right-hand side becomes x^2 + y^2 - 2pxy, which is the same as the left-hand side. Why do you want to complete the squares on this?

tuanle007
yeah...thats my teacher doing that..
i just want to refresh my memory on how that work..
i still dont understand...can you clearly described the steps

Homework Helper
Gold Member
tuanle007 - Completing the square is based on starting with a rectangle and rearaanging part of it to form the sides of a square, and arithmetically & geometrically adding the missing portion in order to COMPLETE the square.

Example: x*x + b*x, where b is a constant, x is a variable. The expression can represent a rectangle with x and x+b. Notice carefully that the expression can be factored as x(x + b) = x*x + b*x.

If you draw a picture, you can see this and more in a clearer manner. Assume the height is x, and the length from left to right is x+b. Go to the middle of the 'b' portion starting at the top and cut this part in half, cutting vertically. Take the piece off, and reposition it on the left side of the entire figure so that you now have the left side of the square being x+b/2, and the top side of the square being also x+b/2. Notice now that a piece is missing at the bottom right. What is it and how much is it? It is (b/2)*(b/2).

Hopefully you can follow and understand that; the rest is up to you. How far can you go now?

Homework Helper
Gold Member
yeah...thats my teacher doing that..
i just want to refresh my memory on how that work..
i still dont understand...can you clearly described the steps

I tried uploading a figure about my previous post; not sure it will work.

#### Attachments

• complete_square.bmp
260.9 KB · Views: 478
tuanle007
i think i kinda remember it now..
what i did was I put everything on the left side as X and everything on the right as Y
so i have
x^2 - 2pxy = -y^2
then I complete the X on the left side
(x^2 - 2pxy) + (2py/2)^2 = -y^2 + (2py/2)^2

the left side factored out to be

(x-py)^2 = -y^2 + py^2
so then move everything to the left we get

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

tuanle007
ok, i understand the completing the square part,
but can someone explain how the next step is..
where does the (1-p)^2 comes about and things like that
thanks

#### Attachments

• untitled.PNG
45.4 KB · Views: 442
Homework Helper
Gold Member
ok, i understand the completing the square part,
but can someone explain how the next step is..
where does the (1-p)^2 comes about and things like that
thanks

That expression was not part of your original equation. Also, 'p' was not specifically called a constant nor variable.

Homework Helper
i think i kinda remember it now..
what i did was I put everything on the left side as X and everything on the right as Y
so i have
x^2 - 2pxy = -y^2
then I complete the X on the left side
(x^2 - 2pxy) + (2py/2)^2 = -y^2 + (2py/2)^2

the left side factored out to be

(x-py)^2 = -y^2 + py^2
so then move everything to the left we get

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

ok, i understand the completing the square part,
but can someone explain how the next step is..
where does the (1-p)^2 comes about and things like that
thanks
That's the easy part! Long before you learned to "complete the square" you learned that "ax+ ay= a(x+ y)", the "distributive law" in technical terms. There is a y^2 term in both y^2 and -py^2 so : y^2- py^2= y^2(1)- y^2(p)= y^2(1- p).

tuanle007
yeah..i figured it out after i sat there for 2 hours..
you guys are the best..