Completing the square with multiple variables

$\begingroup$

I'm trying to understand a solution to a PDE problem, and it involves reducing an expression by completing the square. I'm not sure how to go about the steps.

The expression is: $$-x^2+2xy-y^2+4kty$$ which becomes: $$-x^2+2(x+2kt)y-y^2$$ and finally $$-(y-2kt-x)^2+4ktx+4k^2t^2$$

Can someone show me how to arrive to this simplification?

$\endgroup$

1 Answer

$\begingroup$

$$-x^2+2(x+2kt)y-y^2$$ $$=-x^2-4k^2t^2-4ktx+2(x+2kt)y-y^2+4k^2t^2+4ktx$$ $$=-(x+2kt)^2+2(x+2kt)y-y^2+4k^2t^2+4ktx$$ $$=-[(x+2kt)^2-2(x+2kt)y+y^2]+4k^2t^2+4ktx$$ $$=-[y^2-2(x+2kt)y+(x+2kt)^2]+4k^2t^2+4ktx$$ $$=-[y-(x+2kt)]^2+4k^2t^2+4ktx$$ $$=-[y-x-2kt]^2+4k^2t^2+4ktx$$ $$=-(y-2kt-x)^2+4ktx+4k^2t^2$$

Hope this is clear enough to clear your doubts.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like