It is most likely NOT your alternator. Everything is going to dim in the car when the idle drops down to 500rpm because the alternator cannot put out enough juice to keep things up to snuff. To check it, have someone keep the engine up over 1000 rpm while you put a multi-meter on the battery terminals. Voltage should be around 13.5-14.1 vdc.

When you say "juddering" ... Is this just your way of saying "shuddering" or rough idle? Assuming this is what you are saying, there could be a plethora of things causing this. Is the car over a 100k miles? If so, have you done a tune up on it (ie: plugs and O2s))? Have you tried cleaning the MAF and throttle body? Does it need a clean air filter? Do you have any codes? The Air Idle Control (AIC) valve might be your problem. Any/all of these and more could be causing your rough idle and bouncing rpms.

Juddering under load
I've got the following polynomial
$$
x^3-6x^2-2x+40
$$
and I want to find its roots. The only option I see at the moment is to compute all the divisors of $40$ and their inverse, and manually check if it's result is $0$. This works, because $4$ is a zero and now we can divide the polynomial by the factor $x-4$, resulting in a second degree polynomial (which is easier to solve).

I was wondering if there's any other method/idea to manually find the roots of this polynomial?
