1

I came across a problem in my textbook:

If $(x-2)^2$ is a factor of $f(x) = x^3+px+q$, then find the remainder when $f(x)$ is divided by $(x-1)$.

Finding the remainder is not difficult; I just need to find out what $p$ and $q$ are. Unfortunately, finding those 2 constants is the tough part. If the factor had been of the form $(x-a)(x-b)$, then it wouldn't have been difficult as I would get 2 seperate equations $f(a)=0$ and $f(b)=0$, and I would be able to solve for $p$ and $q$ from there. However, over here, I get two identical equations: $f(2) = 0$. I don't understand how I could find the constants when the factor is of the form $(x-a)^2$?

Bill Dubuque
  • 282,220
  • " I would get 2 seperate equations f(a)=0 and f(b)=0". You still do have two separate equations. You have one) $f(a)=f(2)=0$ and two) $f(b)=f(2)=0$. It's exactly the same! There's no requirement that $a\ne b$. So just do it with $a=b=2$. [I'm assuming you are saying you'd solve $(x-a)(x-b)(x-c)=x^3 + px + q$. Well you can still do exactly that with $a=b=2$] – fleablood Jun 16 '25 at 15:04
  • .... or to put it another way the factor $(x-a)^2$ IS of the form $(x-a)(x-b)$... with $a=b$. – fleablood Jun 16 '25 at 15:11
  • Hint: apply the Double Root Test to determine the constants - see the links in my comment here for many examples. In particular these posts show how to solve such problems using only algebra (no limits or calculus), using the Factor / Remainder Theorem. $\ \ $ – Bill Dubuque Jun 17 '25 at 09:09

4 Answers4

6

Since $(x - 2)^2$ is a factor, one can posit that: $$f(x) = x^3 + px + q = (x - 2)^2(x + r)$$ Upon expansion of the RHS or by Vieta's formulae, we observe that $-2 - 2 + r = 0$ because the coefficient of $x^2$ is $0$. Hence, $r = 4$.

Finally, the remainder when $f(x)$ is divided by $x - 1$ is: $$f(1) = (1 - 2)^2(1 + 4) = \boxed 5$$

4

The most elementary approach is likely to expand $x^3 + px + q = (x-2)^2(x+r)$, compare the coefficients on the left and right, solve for $p$, $q$, and $r$, then evaluate $f(1)$. This is done in Joyneel Bepari's answer.

An alternative approach uses a result from calculus. Two important facts:

  1. If $(x-a)^2$ is a factor of a polynomial $f(x)$, then $x-a$ is a factor of $f'(x)$.[1]
  2. If $x-a$ is a factor of a polynomial $f(x)$, then $f(a)$ is the remainder when $f(x)$ is divided by $x-a$.

Given that $(x-2)^2$ is a factor of $f(x) = x^3 + px + q$, it follows that \begin{equation*} f(2) = 8 + 2p + q = 0,\tag{$\ast$}\label{eq1} \end{equation*} and that \begin{equation*} f'(2) = 12 + p = 0.\tag{$\ast\ast$}\label{eq2} \end{equation*} Together, (\ref{eq1}) and (\ref{eq2}) form a system of two linear equations in two variables. Since (\ref{eq2}) gives $p=-12$, it follows that \begin{align*} (\ref{eq1}) &\iff 8 - 24 + q = 0 \\ &\iff q = 16. \end{align*} Therefore \begin{equation*} f(1) = 1 - 12 + 16 = 5. \end{equation*}


[1] Proof: Suppose that $(x-a)^2$ is a factor of $f(x)$. Hence $$ f(x) = (x-a)^2 g(x), $$ where $g(x)$ is another polynomial. By the product rule, $$ f'(x) = 2(x-a)g(x) + (x-a)^2g'(x) = (x-a)[ 2g(x) + (x-a)g'(x)]. $$

  • This is a really nice answer; as a learning exercise I think it's interesting to consider what happens with $(x-a)(x-b)$ when $b$ is getting very close to $a$, particularly to understand the shape of the graph of $(x-a)^2 g(x)$ and why its derivative must have a root at $x=a$ – Silverfish Jun 16 '25 at 23:23
  • @Silverfish Divisibility / remainder applications of the Double Root Test are ubiquitous and occur in many prior problems here, e.g. here and here. We need only algebra (not limits or calculus) to handle the case when two roots coincide, e.g. see here. $\ \ $ – Bill Dubuque Jun 17 '25 at 09:04
2

If you want to use just the factor theorem we have

$f(2) = 8 + 2p + q = 0$ so $q= -2p-8$ and $f(x) = x^3 +px - 2p-8$.

Now if we do synthetic division and divide by $x-2$ we get:

$x^3 + px - 2p -8 = $
$x^2(x-2) + 2x^2 + px + -2p - 8=$
$x^2(x-2) + 2x(x-2) + 4x+px + 2p -8=x^2(x-2) + 2x(x-2) + (4+p)x + 2p-8=$
$x^2(x-2) + 2x(x-2) + (4+p)(x-2) + 2p+8 - 2p-8=x^2(x-2)+2x(x-2) + (4+p)(x-2)=$
$(x-2)(x^2 + 2x + (4+p))$.

So $\frac {f(x)}{x-2} = (x^2+2x+(4+p))=g(x)$ and we know $x-2$ is a factor of that.

Apply the factor theorem to get $g(2) = 2^2+2\cdot 2+ 4+p=0$. so $p = -12$.

Then $q = 16$ and we have

$f(x) = x^3 -12x +16$ and factoring out $(x-2)^2$ we get

$f(x)=x^3-12x + 16=$
$f(x)= x(x^2-4x +4) +4x^2 - 16x + 16=$
$f(x)= x(x^2-4x+4) + 4(x^2 - 4x +4)=$
$f(x)=(x+4)(x^2-4x+4) = (x-2)^2(x+4)$.

But.. that's maybe not the easiest way.

Using Joyneel Bepari's method we know the degree of $f(x)$ is $3$ and $(x-2)^2$ with degree $2$ is a factor means the remaining factor is of degree one.

So $f(x) = x^3 + px + q = (x-2)^2(x-c)$ for some $c$.

$(x-2)^2(x-c) = (x^2 - 4x + 4)(x-c) = x^3 + (-c-4)x^2+ (4+4c)x -4c = x^3 + px + q$

so

$-c-4 = 0$
$4+4c=p$
$-4c = q$

So $c=-4$, $p=-12$ and $q=16$.

And $f(x) = x^3-12x + 16 = (x-2)^2(x+4)$

To me that'd be the easiest way.

fleablood
  • 130,341
0

Given the equation: $$x^3 + px + q = (x-2)^2(x-a)$$ We can use the factor theorem to find the values of $p$ and $q$.

Since $(x-2)^2$ is a factor, $x=2$ is a repeated root.

Let's expand the right-hand side: $$(x-2)^2(x-a) = (x^2 - 4x + 4)(x-a)$$ $$= x^3 - ax^2 - 4x^2 + 4ax + 4x - 4a$$ $$= x^3 - (a + 4)x^2 + (4a + 4)x - 4a$$ Comparing coefficients with the left-hand side $x^3 + px + q$, we get:

  • $-(a + 4) = 0$ (since there's no $x^2$ term on the left)
  • $4a + 4 = p$
  • $-4a = q$

From the first equation, $a = -4$.

Substituting $a = -4$ into the other equations:

  • $p = 4(-4) + 4 = -12$
  • $q = -4(-4) = 16$

So, $p = -12$ and $q = 16$.