If you want quarter circle you have to use either + (for positive quarter) and - (for negative quarter) in the equation you mentioned.
For getting half circle both + and - ve values of equation are considered.
I will consider like this
(x^2 + ax+b)^2=x^4+2ax^3+(a^2+2b)x^2+2abx+b^2
Now you have three quadratic parts. Instead of expanding and simplifying each one of them you can directly write the final expression as...