EDIT: I am loathe to delete/restructure this post, so I will include the following: A function has a "wiggle root" at $c$ if $f(c)=0$ and $f(x)$ crosses the $x$-axis.
I am trying to set up a polynomial such that it has a wiggle root at $x=0$. I have gotten it such that there are wiggle roots at $x=-1$ and $x=1$. A wiggle root is defined as the behavior of what you see at $x = 1$ and $x = -1$ in the image below. I do not know how to describe it conceptually other than the derivative at that point is such that it approaches from the positive $y$-axis from the left and negative $y$-axis from the right.
My questions are:
- What part of the polynomial determines whether the root is a wiggle root or not?
- How do I create a polynomial that has a wiggle root and also satisfies these conditions: the polynomial should have 2 imaginary roots, 2 real roots, and double roots. It should be fully factorable.
Here are some other polynomials that I have tried:
$$P(x) = (x+1)(x+1)(x-1)(x-1)(x+i)(x-i)$$ or $$P(x) = x^6+2x^5+x^4−x^2−2x−1$$

What you describe as a "wiggle root" is a stationary point of inflection of the curve $y=f(x)$ that is also a root of the equation $f(x)=0$.
You therefore require:
1) $f(a)=0$ : to make $a$ a root of the equation
2) $f'(a)=0$ : to make $(a,0)$ a stationary point of the curve
3) $f''(a)=0$ : to make $(a,0)$ a point of inflection
You have tried to set up your polynomial as $f(x)=(x-a)^2(x-b)^2(x-ci)(x+ci)$, but this will not have stationary points of inflection at $x=a$ and $x=b$. To achieve that you will need something like:
$$f(x)=(x-a)^3(x-b)^3(x-ci)(x+ci)$$
To have a stationary point of inflection at $x=0$ you will have to include the factor $x^3$, giving you:
$$f(x)=x^3(x-a)^3(x-b)^3(x-ci)(x+ci)$$
I wasn't sure if you wanted there to be two real roots and a third root at $x=0$, but if you just want two real roots (one of which is $x=0$), then you want:
$$f(x)=x^3(x-a)^3(x-ci)(x+ci)$$