Over on twitter, @MegaManSE asked

does anyone know the equation to find the acceleration to stop a moving object in a constant distance given some random starting velocity?

I didn’t, at the time, know … but I do know how to work it out from first principles, and it makes a decent little classical mechanics exercise, and also an excuse to figure out how to get MathJax hooked up on this blog, which might be useful in the future. So here’s how it’s done.

The first step in solving one of these problems is to rewrite the question as formally as possible:

At time $t=0$ an object is at position $x=0$ and moving with velocity $\nu=v$. Find the constant acceleration $a$ such that at some future time $t=T$, when the object is at position $x=d$, its velocity will be zero.

Now how do we do that? It’s time for just a little bit of integral calculus. Velocity is the rate at which a moving object’s position changes, as a function of time, and acceleration is the rate at which a moving object’s *velocity* changes, also as a function of time. The calculus was invented to answer the question, if I know what one of these is, what are the other two? It has a somewhat-deserved reputation for being confusing, but mostly that’s because it’s hard to explain *how you come up with its rules*. If you know the rules, they’re pretty easy to apply. The acceleration in this problem is constant, $a$, and we know at time $0$ the velocity is $v$ and the position is $0$. Therefore, the velocity at time $t$ is

$\nu(t) = v + \int_0^t a\; \text{d}t = v + at$

and the position is

$x(t) = 0 + \int_0^t v + at\; \text{d}t = 0 + vt + \frac{at^2}{2}$

These are both functions of *time*, but we want to solve for acceleration as a function of *distance* and starting velocity. But that’s just a matter of algebra. We want $\nu(T) = 0$, so we plug that into the first of these equations and solve for $T$:

$0 = v + aT \quad\rightarrow\quad T = \frac{-v}{a}$

And we want $x(T) = d$, so we plug both that and the formula for $T$ into the second equation:

$d = v\frac{-v}{a} + \frac{a}{2}\left(\frac{-v}{a}\right)^2$

Now all we have to do is solve for $a$:

$d = \frac{-v^2}{a} + \frac{v^2}{2a}$

$d = \frac{-2v^2 + v^2}{2a}$

$2ad = -v^2$

$a = \frac{-v^2}{2d}$

Wait, the acceleration comes out to be *negative*?! Yes. That’s how you know the object is slowing down rather than speeding up. (If the object weren’t moving in a straight line, its position, velocity, and acceleration would all have to be treated as 2- or 3-dimensional vectors, but the calculations would wind up being very nearly the same, only with more boldface. Also, if the *velocity* were negative, it would mean the object was moving backward. This is, in fact, the difference between velocity and speed: speed is the *magnitude* of velocity, without the direction, so it can never be negative.)

It’s great to see a Mozillian using MathJax (and so our MathML support)! Just a minor comment: in the first equation, the second member is not equal to the others. Obviously, you mean

$\nu(t) - v = \int_0^t a\; \text{d}t = at$

instead. The same holds for the

in the second equation, but this one does not change anything :-).I meant $v$ (and $0$) in there to be the constants of integration (while at the same time trying not to mention constants of integration, on the theory that it would just add confusion). Now I look at it harder, that would come out not

quitethe same thing as what I wrote—but not quite the same as what you wrote either. The acceleration only kicks in at time $t = 0$, so a more precise formulation would be$\nu(t) = \begin{cases} v & \text{if}\: t < 0 \\\\ v + A(t) - A(0) & \text{if}\: t \ge 0 \end{cases}$

where $A = \int a\, \text{d}t = at + C$, and we set $C = 0 \Leftrightarrow A(0) = 0$. Similarly for the position function. I think what I’ll do is move the $v +$ and $0 +$ outside the integrals to make it clearer that those are boundary conditions.

MathJax with a TeX starting point is nice until you use a feed reader to consume your content. MathML is more likely to be web compatible…

Yah I noticed that when it showed up on Planet Mozilla. I’m not going to write MathML by hand, though, it’s ridiculously verbose. Maybe I can find a WP plugin that does the conversion server-side instead.

I was taught v² = u² + 2as at some point. (My u is your v, and my v is zero, of course.) Apparently in the UK it’s now taught at around the age of 17, see http://www.gcse.com/fm/uvast.htm

I would use conservation of energy. The change in kinetic energy from stopping the object is equal to the work done on it:

$\begin{aligned} \frac{1}{2}m(0^2 - v^2) =& Fd = mad \\ -\frac{1}{2}v^2 =& ad \\ a =&\displaystyle \frac{-v^2}{2d} \end{aligned}$

The formula Neil gave is the special case of conservation of energy when dealing with a constant force (and it’s roughly equivalent to the middle formula here).

Using conservation of energy is quicker for problems like these where you just need to know about the state of object at one point (e.g. where it stops). However, you don’t get the full trajectory function ($x(t)$) that you found.

Actually, there is a whole alternative formulation of classical mechanics that doesn’t use Newton’s Laws or forces at all, called Lagrangian mechanics. You just write down the formulas for all the energy in the system, apply a differential equation, and you almost magically get a equation to solve for your trajectory (warning: lots of heavy math in that article).

That is an excellent strategy in general, but I was trying to minimize the number of potentially-unfamiliar concepts I used.