# Work out the values of a and b from the identity $x^2 - ax + 144 = (x-b)^2$

How do I solve the following question?

You are given the identity $x^2-ax+144 = (x-b)^2$

Work out the values of $a$ and $b$.

Question appears in AQA 43005/1H.

• It would be nice to add: "What are the possibles values for $a$ and $b$ if we want the identity to be true for all $x$ ($\in \mathbb{R}$)?" Otherwise, one could understand that you can give a solution depending on $x$. – Djaian Nov 5 '10 at 14:25
• @Djaian: I've written the question exactly as it is. As I understand it, I am required to give an answer in the form of a = 24 or a = -24, b = 12 or b = -12 (i.e. two values for each a and b). – Zaz Nov 5 '10 at 14:35
• be careful, if $a = 24$, then $b$ cannot be -12. If you want the identity to be true for all $x$, then you have 2 solutions: $a = 12$ , $b=24$ and $a= -12$ , $b = -24$. – Djaian Nov 5 '10 at 15:08

The prior answer presumes that you already know the fact that two polynomials functions are identical (if and) only if they have identical coefficients. But the above problem might be posed as motivation before this general fact is proved. In that case you can prove it directly without using this more general fact as follows. Evaluating the identity at $\rm\ x = 0\$ yields $\rm\ (-b)^2\! = 144 = 12^2.\:$ So $\rm (x-b)^2 = x^2 -2bx + 144 \equiv x^2 -ax + 144.\:$ RHS $\!-\!$ LHS yields $\rm\: (2b-a)\:x \equiv 0\:$. Evaluating at $\rm\ x = 1\$ yields $\rm\ a = 2b.\:$ And, of course, $\rm\ 0 = 12^2 - (-b)^2 = (12+b)\ (12-b)\ \Rightarrow\ b = \pm12\:$.

Note that the above proof yields$\ \ (1)$ the equation is true for all $\rm\: x\ \Rightarrow\ (2)$ the equation is true for $\rm x = 0,\ and\ x = 1\$ $\rm \Rightarrow$ $\rm\ (3)\ \ a = 2b,\ b^2 = 144.\:$ But $(3)$ implies that both sides of the equation have equal coefficients, so it is true for all $\rm\:x,\:$ implying $(1).\:$ So all three statements are equivalent.

Generally it is true over $\mathbb C$ that two polynomial functions of degree $\rm\:n\:$ are identical iff they have identical coefficients iff they have equal values at $\rm\:n+1\:$ points (or $\rm\:n\:$ points if they have the same leading coefficient - as above). In fact, this is true for polynomials with coefficients in any integral domain, i.e any ring without zero-divisors, i.e. $\rm\ ab = 0 \Rightarrow\ a=0\ or\ b=0,$ but it may be false in non-domans, e.g. functions $\rm\:x^p \equiv x\:$ over $\rm\:\mathbb F_p.$

• Thanks. The idea of evaluating the identity at $x=0$ and later at $x=1$ was particularly helpful, I hadn't considered that previously. – Zaz Nov 6 '10 at 16:16
• @Steve Thanks, typo fixed. – Bill Dubuque Apr 24 '12 at 16:42

You have to note first that $12^2=144$. After this, you have to recall the identity

$$(x-b)^2=x^2-2bx+b^2$$

Now compare coefficients to get the equations you need to solve for $a$ and $b$.

• Thanks, this was very helpful when figuring out how to solve this kind of problem. – Zaz Nov 6 '10 at 16:10

The RHS of

$$x^{2}-ax+144\equiv (x-b)^{2}\qquad (1)$$

can be expanded into

$$x^{2}-2bx+b^{2}.$$

So identity $(1)$ is equivalent to

$$x^{2}-ax+144\equiv x^{2}-2bx+b^{2}$$

or

$$(2b-a)x+144-b^{2}\equiv 0,$$

which can only be an identity (i.e. independent of the value of $x$) if

$$a=2b$$

and

$$b^{2}=144.$$

This system of equations has two solutions:

$$b=-12,a=-24$$

and

$$b=12,a=24.$$

### Find the Value of $b$

$x^2-ax+144\equiv(x-b)^2$

Expand the right-hand side:

$x^2-ax+144\equiv{x^2-2bx+b^2}$

Find the coefficient $(x=0)$:

$b^2=144$
$\Longrightarrow b=\pm{\sqrt{144}}=\pm12$

### Find the Value of $a$

Substitute $b=\pm12$ back into original equation:

$x^2-ax+144\equiv{x^2\pm{24x}+144}$
$\Longrightarrow -ax\equiv\pm{24x}$

Find the coefficient $(x=1)$:

$a=\pm{24}$

$a=24, b=12$ and $a=-24, b=-12$

Thanks to @J. M. and @Djaian.

• One nit: given $b=b=\pm12$, $b^2=144$, not $b=\pm144$ – Ross Millikan Nov 5 '10 at 18:28
• @Ross: Sorry, I've fixed it now. – Zaz Nov 5 '10 at 18:42

Posted by Pi R Squared on Yahoo Answers:

$a=24$ and $b=12$

$x^2-24x+144=(x-12)^2$

• Although this is correct, it doesn't really help as there is no explanation as to how the question was solved. – Zaz Nov 5 '10 at 14:09
• @Djaian was right (he deleted his comment). THere are multiple solutions. For instance a = -24 and b = -12. – Aryabhata Nov 5 '10 at 14:19
• @Josh: This answer and the comment should have been part of the question. – Aryabhata Nov 5 '10 at 14:23
• Right, since $(-12)^2=144$ as well. – J. M. is a poor mathematician Nov 5 '10 at 14:25
• @Djaian, Moron, J. M.: As I understand it, there are two, and only two, solutions for each a and b. Is this correct? – Zaz Nov 5 '10 at 14:39