To find a polynomial given its roots is straightforward compared to the reverse procedure. Simply convert the roots into factors:

3: (x - 3)

1-2i: (x - 1 + 2i)

1+2i: (x - 1 - 2i) - complex roots will always come in (a +/-bi ) pairs so this is the third root.

Then we simply multiple the factors together. Start with the complex factors, they'll collapse into something a bit easier without the complex term:

(x - 1 + 2i)(x - 1 - 2i) = x^2 - x - 2ix - x + 1 + 2i + 2ix - 2i + 4 <- Note that the i terms cancel, this should always be the case.

= x^2 - 2x + 5

So:

(x - 3)(x^2 - 2x + 5) = 0

= x^3 - 2x^2 + 5x - 3x^2 + 6x - 15

= x^3 - 5x^2 + 11x - 15

Note this "=0" is true for this and all c(x^3 - 5x^2 + 11x - 15) where c is a constant. This is the general form of the polynomial. Since we're given f(4) = 13 we can find c: