# solve for time given distance, initial velocity, and acceleration

I've been having trouble sorting this one out. I need to compute the time it will take for a vehicle traveling along a straight line to reach a particular point. I have the initial velocity ($v_i$), acceleration ($a$), and distance ($dx$) to the point. I don't have the final velocity $v_f$ nor the time $t$ I've been trying to solve this equation for time ($t$) but that's where I'm stuck.

$$dx = v_it + {1\over2}at^2$$

-

Well, it's possible to get two positive solutions, in case $a$ and $dx$ have opposite signs. The desired answer is probably the smallest positive solution. – Rahul Dec 26 '12 at 16:39
In this case $dx$ and $v_i$ are positive but $a$ can be negative. – progrmr Dec 26 '12 at 21:49
Use the Quadratic Formula. ${}{}{}{}{}{}{}{}{}$