Would anyone know how to customize the CompleteSquare function. Reason is I am trying to extend it to complex numbers. Examples below. (Unfortunately the text editor is playing up but if you could copy and paste the text below in your Maple you should be able to see it more clearly).
eqn1 := x__1^2+4*x__1*x__2+2*x__2^2;
CompleteSquare(eqn1, [x__1, x__2]);
This gives the answer below which is correct.
However consider the complex function below:
I am trying to factorize this into the following:
The technique I am trying is to first try to come up with a generalized form of the CompleteSquare function and then try to extend it to complex factorization but so far haven't been successful.
Any useful comments appreciated.