Tool to make automatic square completion. Square completing is a calculation method allowing to factor a quadratic polynomial expression using the polynomial depression method.

Completing the Square - dCode

Tag(s) : Symbolic Computation

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

**Completion of the square** is the name given to a method of factorization of the polynomials due to this degree. Factoring takes its name from the fact that the factored form obtained has the variable in a squared expression.

dCode can **complete the square** and find factors by depressing a polynomial expression

A quadratic polynomial $ x^2 +bx + c = 0 $ can be modified in $ (b/2)^2 - c - (b/2)^2 + c (= 0) $ that allows factorizing in $$ (x +(b/2))^2 - (b/2)^2 + c $$

__Example:__ $ p(x)=2x^2+12x+14 $, in order to **complete the square** hand, factorize the coefficient of $ x^2 $ : $ p(x)=2(x^2+6x+7) $ and continue with $ q(x) = x^2+6x+7 $

__Example:__ Identify the coefficient of $ x $, here $ 6 $ and divide it by $ 2 $ to get $ β=6/2=3 $ and use $ β $ to write $$ q(x) = x^2 + 6x + 7 = (x+3)^2 − β^2 + 7 = (x+3)^2 − 2 $$

__Example:__ Back to $ p(x) = 2q(x) $ to get the **completed square**: $$ p(x)=2x^2+12x+14=2((x+3)^2−2)=2(x+3)^2−6 $$

With the factorized form, it becomes simple to find the roots.

$$ p(x) = 0 \iff 2(x+3)^2−6 = 0 \iff (x+3)^2 = 3 \\ \iff x+3 = \pm \sqrt{3} \iff x = \pm \sqrt{3} - 3 $$

dCode can generalize this approach to other polynomials of order $ n > 2 $ by removing the term of degree $ n-1 $.

dCode retains ownership of the online 'Completing the Square' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Completing the Square' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Completing the Square' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Completing the Square' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

Please, check our dCode Discord community for help requests!

NB: for encrypted messages, test our automatic cipher identifier!

completion,complete,square,factorization,factor,factorize,polynomial,quadratic

Source : https://www.dcode.fr/square-completion

© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲
Thanks to your feedback and relevant comments, dCode has developed the best 'Completing the Square' tool, so feel free to write! Thank you!