# Stuck in expressing factor into a sum of three perfect squares.

Two part question.

(i) Consider the function $f(x)=x^3-6kx+k^3+8$. Show that we can write $f(x)$ as $(x+k+2)P(x)$ where $P(x)$ is a quadratic function.

(ii) Show that $2P(x)$ can be written as the sum of three perfect squares and hence solve $f(x)=0$ for all values of $k$.

My attempt.

(i) By long division I have $P(x)=x^2-(k+2)x+k^2-2k+4$. I believe this part to be correct by trying a few cases of $k$ with Wolfram Alpha.

(ii) $2P(x)=2x^2-2kx-4x+2k^2-4k+8$. No idea how to continue.

• I like this question, really interesting. Let me see if I can find a solution. Jun 1 '15 at 15:55
• For first part better way is to consider what is $a^3+b^3+c^3-3abc$ ^^
– Mann
Jun 1 '15 at 15:57
• @Mann so $2^3+k^3+x^3-3(2kx)$ let me think a little Jun 1 '15 at 15:59
• I seem to recall that $a^3+b^3+c^3=3abc$ when $a+b+c=0$ Jun 1 '15 at 16:02

You are correct on (i). For (ii), just split it up. First, notice the $-2kx$ term, that'd be the middle term in one square:

$$2x^2 - 2kx - 4x + 2k^2 - 4k + 8$$ $$= (x^2 - 2kx + k^2) + x^2 - 4x + k^2 - 4k + 8$$

Then $(x^2 - 4x)$ looks like the beginning of another square:

$$= (x^2 - 2kx + k^2) + (x^2 - 4x + 4) + k^2 - 4k + 4$$

And there's our third:

$$= (x-k)^2 + (x-2)^2 + (k-2)^2$$

The first zero is $x = -(k+2)$. The other zeros come from the fact that all three terms here are non-negative, the only possible zero arises when all three terms are themselves zero: $x = k = 2$ (which is a double root, or no real root).

• Beat me. Good work. Jun 1 '15 at 15:59

For i: It's enough to show that $f(-k-2)=0$.

For ii: Since $P(x)=(x-k)^2+(x-2)^2+(k-2)^2$ then $f(x)=0$ when $x=-k-2$ or when $k=2$.

• Good call for suggesting the Factor Theorem. But then, how would you find P(x)? Doesn't you suggestion just give an affirmative answer without supplying the other factor? Jun 1 '15 at 16:11
• The question i doesn't really ask for finding $P(x)$. Jun 1 '15 at 16:15
• Well for part (ii) you surely need it. Jun 1 '15 at 16:16