Jeremy,
This seems to be what mathematica is doing to create the complex cubed root, which follows what was explained at wikipedia.
You take (-1/2)*the real number cube root (-1475.23 in my case, *-1/2 = 737.613) and add the same number multiplied by the square root of 3. This equals 737.613 + 1277.58... which is what I get in mathematica, but without the "i" imaginary number.
So I can handle the cubed roots as follows, but I still don't know what to do with the "i" imaginary number which should follow the 1277.58:
Code:
p1=(1/(6*power(2,(1.0/3.0))*dur))*(1-SQRT(3))
p2=(-2*power(dist,3))-(6*MA*power(dist,2))-(6*dist*power(MA,2))-(2*power(MA,3))+(6*power(dist,2)*MD)+(12*dist*MA*MD)+(6*power(MA,2)*MD)-(6*dist*power(MD,2))-(6*MA*power(MD,2))+(2*power(MD,3))+(18*dist*MA*dur*initspeed)+(18*power(MA,2)*dur*initspeed)-(18*MA*MD*dur*initspeed)-(27*MA*power(dur,2)*power(initspeed,2))
p3=(4*power(((6*MA*dur*initspeed)-power(dist+MA-MD,2)),3))
p4=SQRT((p3+power(p2,2)))
tmp=(p2+p4)
if tmp < 0 then
p5 = power(-tmp, 1.0/3.0)
p5a= p5/2
p5b= ((p5/2)*SQRT(3))
p6 = p5/2+((p5/2)*SQRT(3))
else
p6 = power(tmp, 1.0/3.0)
endif
p7=(dist+MA-MD)/(3*dur)
p8=(SQRT(3)+1)*((6*MA*dur*initspeed)-power(dist+MA-MD,2))
p9=(3*power(2,(2.0/3.0))*dur)*p6
p10=(p7-p8)/p9
p11=(p1*p6)+p10