# Find the stopping distance

(original question, see edits below for full context)

After much frustration, I have figured out a function which maps velocity during acceleration/deceleration for my project.

$$\text{velocity} =s+\frac{-x^2\cdot 0.5\cdot j}{100000}$$ \begin{alignat}{1} x & = \text{time} \\ s & = \text{start velocity} & = 100 \\ j & = \text{jerk factor} & = 1 \\ \end{alignat}

For this function, $y$ represents velocity. Here's how it graphs using the above numbers... I need to capture the point at which velocity will reach zero, so I know how many milliseconds $x$ it will take to come to a full stop.

If I know how long 'stopping' takes, I can use it to decide how soon a vehicle can stop to arrive at a point.

Given a provided $s$ and $j$, how can I calculate when $y$ will be zero? How do I arrive at $4472.136$ given the above numbers?

I believe the answer to the question involves polynomial factoring, but I have no idea how to get rid of the $x$ for this formula. I am aware this 'collides with zero' multiple times, but I only need one of those numbers since it's $-/+$

Can anyone shed some light? It is much appreciated

Edit

I've tested the chosen answer, and I'm pleased to say it works perfectly! Jan Eerland's answer correctly finds the intersection with zero. I'm not really sure how. Actually I needed to remove the velocity from the equation for it to work...

This answer very quickly (and elaborately) solved the posted math problem. I'm posting my graph here with hopes my addition helps future readers. Since it solved the raised math question, it's the correct answer in this context.

However, R. J. Mathar pointed out my math doesn't make sense... and he's correct. I notice the curve should be linear, because my example does not dictate how the ^2 responds over time.

Here's a new formula which I think is correct, at least, it works in conjunction with my test spreadsheet numbers...

$$velocity\ =s+\frac{-x\cdot 1000\cdot j}{100000}$$ Actually...

It seems I just found the intersection for my new linear curve...

If anyone is wondering, I'm okay with my implementation having a linear decrease in velocity. In my implementation it will not really be noticed - so you should take that into account when deciding if this solution works for YOUR project...

I hope it helps someone out there!

$$x\ =\left(\frac{100s}{j}\right)$$ • If I remember rightly, the distance covered is the integral of velocity over the time period. So you need to integrate your function, check that it equals zero at $t=0$ and then substitute your stopping time in to get distance covered. – samerivertwice Jul 20 '16 at 14:27

## 2 Answers

$$\text{Velocity}=\text{s}-\frac{jx^2}{200000}\Longleftrightarrow x=\pm\frac{200\sqrt{5}\cdot\sqrt{\text{s}-\text{Velocity}}}{\sqrt{j}}$$

Assuming $j\ne0$.

So, we get:

$$x=\pm\frac{200\sqrt{5}\cdot\sqrt{100-0}}{\sqrt{1}}=\pm2000\sqrt{5}$$

But time has to be positive so it is $x=2000\sqrt{5}\approx4472.14$

$$\text{Velocity}=\text{s}-\frac{jx^2}{200000}\Longleftrightarrow$$ $$\text{Velocity}-\text{s}=-\frac{jx^2}{200000}\Longleftrightarrow$$ $$-\text{Velocity}+\text{s}=\frac{jx^2}{200000}\Longleftrightarrow$$ $$200000\left(-\text{Velocity}+\text{s}\right)=x^2\Longleftrightarrow$$ $$\frac{200000\left(-\text{Velocity}+\text{s}\right)}{j} = x^2 \Longleftrightarrow$$ $$\pm\sqrt{\frac{200000\left(-\text{Velocity}+\text{s}\right)}{j}}=x$$

• Whoa! That is one comprehensive answer. I'm about to sleep but I'll check that one out tomorrow. Thanks so much! – 1owk3y Jul 20 '16 at 16:47
• @1owk3y You're welcome, I'm glad that I could help! Sleep well :) – Jan Eerland Jul 20 '16 at 17:21
• Thanks for your answer Jan. It solved my original question, so it's technically correct! See edits to my question for more info. Thanks again for your answer! I'm not sure how you arrived at the equivalent formula on the first step - but algebra was never my strong suit! Anyway thanks again! – 1owk3y Jul 21 '16 at 13:28

The first equation does not make much sense to me because on the left hand side there is a velocity (in units of length over time) and at the right hand side we first see a variable $s$ considered a position, which has units of meter. So there there is something fundamentally unphysical in that initial equation, unless you declare s to be the velocity at time 0.

Also the jerk factor cannot be a pure number for the same reason, but must have some units of velocity divided by time squared (or acceleration divided by time).

• Hi RJ - yeah you're correct regarding the question... it was a typo... I meant to write 'start velocity' not 'start position', so your assumption is totally accurate. I'll edit my question, thanks for pointing that out! – 1owk3y Jul 21 '16 at 11:56
• Regarding jerk factor, in my scenario jerk (=1) modifies velocity by 10 every 1000ms... that's part of the reason why the formula includes 100000. I think? Math is not my strong suit... I basically had to brute force my formula into a graphics calculator until it worked :) Actually... I'm starting to see what you mean though... using ^2 results in a curve, which is not mandated over time... it needs to be a linear reduction... I think I may need to heavily revise my question. Thanks again for pointing that out. I can't believe you picked those issues up... – 1owk3y Jul 21 '16 at 12:25