How can I express x^2 - 7*x + 2 as (x - p)^2 + q ?

o One way to approach this question is to expand the right expression (x - p)2 + q.
As we know from binomial expansions this gives us x2 - 2px + p2 + q.

o Now we need to ensure that we choose values for p and q such that the above expression is equal to x2 - 7*x + 2. To find these values we can use the method of equating the coefficients which means that we look separately at the coefficients for x2, x and the last part without x and equate these three parts in both terms.

o For x2, the coefficients are luckily both times already 1, otherwise the example would not be solvable
o For x, the number 7 needs to be equal to 2p, hence p = 7/2
o For the term without x, 2 needs to be equal to (p2 + q). p is already chosen to be 7/2, hence q = 2 - (7/2)2 = 2 - 49/4 = -41/4 o This way we found that x2 - 7
x + 2 = (x - 7/2)2 - 41/4

Related HTML and CSS Mentoring answers

All answers ▸

What is the difference between classes and IDs?


What's the difference between por and para in Spanish?


Describe the advantages and disadvantages of the three main ways of adding CSS to a website


how to code the details tag/ how to put a drop down option in a form?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo
Cookie Preferences