I am trying to intersect a ray from the origin $\vec{R}(s):=s~\vec{D}$ with a 3D quadratic or cubic Bézier curve $\vec{B}(t)$ equipped with a radius $r(t)$ (a linear function). The distance from the ray's line to the Bézier curve's surface at any $t$ is: $$ \text{dist}(t) = \begin{Vmatrix} R\left(\frac{\vec{B}(t)\cdot\vec{B}~'(t)}{\vec{D}\cdot\vec{B}~'(t)}\right) - \vec{B}(t)\end{Vmatrix} - r(t) $$ To find the intersection, we set the above to $0$ and solve for $t$. This results in the following equation: $$ \vec{B}~'(t)^T \left(\vec{D} \vec{B}(t)^T - \vec{B}(t) \vec{D}^T\right)^2 \vec{B}~'(t) + \left(\vec{D} \cdot \vec{B}~'(t)\right)^2 r^2(t) = 0 $$ I have been unable to simplify it further (although it would be helpful if you found a way to). Therefore, I am currently trying to generalize it to a complex polynomial of $t$ so that I can solve it using the Durand–Kerner method.
Simply making everything complex-valued doesn't work; e.g. in a quick test with a quadratic $B(t)$, it converges (slowly) everywhere to real-valued roots. Yet it ought to almost-always be the case that most or all roots are complex (the ray usually misses the curve, and when it doesn't, it hits in only a few places).
I suspect this is because the dot product (and possibly matrix product?) needs some special attention to generalize appropriately. However, I don't know what the correct generalization is, and I wasn't able to find much relevant online.
My question is: Is this a reasonable approach for solving this problem? If so, what should I look at to generalize my equation into something Durand–Kerner can handle? Perhaps you have a better idea for how I should solve this problem?
If your algebra is correct (I didn't check it), then the intersection points correspond to the real roots $t$ of your second equation. This is a polynomial equation with real coefficients. So, to find these roots, just apply your favorite numerical root finding function. There are several available in the Numerical Recipes book and elsewhere, some of which are especially suited to handling polynomials. I suppose the Durand-Kerner algorithm would work, but not necessarily any better than other algorithms. It gives you complex roots, which you don't need. It might be simpler to use an algorithm that only returns real roots.
The Durand-Kerner algorithm works with polynomials having real coefficients, so, if you choose to use it, you don't need to do any "generalization" to get complex coefficients.