# How to get distance when acceleration is not constant?

I have a background in calculus but don't really know anything about physics. Forgive me if this is a really basic question.

The equation for distance of an accelerating object with constant acceleration is:

$$d=ut +\frac{1}{2}at^2$$

which can also be expressed

$$d=\frac{\mathrm{d}x}{\mathrm{d}t}t+\frac{\mathrm{d^2}x}{\mathrm{d}t^2}\frac{t^2}{2}$$

(where x(t) is the position of the object at time t)

That's fine for a canonball or something like that, but what about a car accelerating from 0 to cruising speed? The acceleration is obviously not constant, but what about the change in acceleration? Is it constant? I suspect not. And then what about the change in the change of acceleration, etc. etc.? In other words, how does one know how many additional terms to add in the series?

$$d=\frac{\mathrm{d}x}{\mathrm{d}t}t+\frac{\mathrm{d^2}x}{\mathrm{d}t^2}\frac{t^2}{2}+\frac{\mathrm{d^3}x}{\mathrm{d}t^3}\frac{t^3}{3}+\frac{\mathrm{d^4}x}{\mathrm{d}t^4}\frac{t^4}{4}\cdot etc. \cdot ?$$

-
rather seems like a Tailor expansion of X(distance) –  Santosh Linkha Oct 11 '11 at 8:11
You add stuff to the equation until you reach a constant value –  Yotam Oct 11 '11 at 9:03
for a variable or otherwise velocity profile, $s$ = area under the velocity time graph $$s=\int{vtdt}$$ Now, if you have an equation for velocity, probably you can find the distance traveled.. –  Vineet Menon Oct 11 '11 at 9:08
Position is initial position plus the time-integral of velocity. Velocity is initial velocity plus the time-integral of acceleration. Acceleration is initial acceleration plus the time-integral of jerk. There's no end to this. Use as many terms as you care to. At some point you gotta make some assumptions or use experimental data - your math modeling will disconnect from reality. –  Mike Dunlavey Oct 11 '11 at 14:11
Related question (answered) physics.stackexchange.com/q/106352 –  jumpjack Apr 17 '14 at 7:56

Technically, the equation

$$d = \frac{\mathrm{d}x}{\mathrm{d}t}t + \frac{\mathrm{d}^2x}{\mathrm{d}t^2}\frac{t^2}{2}$$

is not right. Instead, for constant acceleration, you need

$$d = \left(\left.\frac{\mathrm{d}x}{\mathrm{d}t}\right|_0\right) t + \left(\left.\frac{\mathrm{d}^2x}{\mathrm{d}t^2}\right|_0\right) \frac{t^2}{2}$$

In other words, a quantity like $\mathrm{d}x/\mathrm{d}t$ changes in time, but you want to use the initial velocity only. I think this is what you probably intended to begin with, though.

If you wanted to solve the problem purely kinematically, then you could try to expand the position in a Taylor series as you wrote in your answer. However, this only works if the function is equal to its Taylor series. For simple functions like exponentials and trig functions this is true, but for a person driving a car it is not. If a function equals its Taylor series everywhere, then if you observe its position over any finite interval of time, no matter how short, you can completely determine what the car will do in the future. This is not realistic.

Instead, you will want some way of determining either the velocity or the acceleration as a function of time or position. In physics, it is common to be able to determine the acceleration as a function of position. The reason is that acceleration comes from the equation $$F=ma$$ so that if you can determine the forces present, you know the acceleration, and higher-order derivatives are not necessary.

If you know the velocity as a function of time, you can simply integrate it to find the displacement. $$d(t) = \int_{t_0}^t v(t') \mathrm{d}t'$$

If you know the acceleration as a function of time, you can integrate that too, although this situation is less common.

$$d(t) = v_0(t - t_0) + t\int_{t_0}^t a(t')\mathrm{d}t' - \int_{t_0}^t t'a(t')\mathrm{d}t'$$

I found this expression by looking for something whose derivative with respect to time was the velocity

$$v(t) = v_0 + \int_{t_0}^t a(t')\mathrm{d}t'$$

If you know the velocity as a function of position, you have the differential equation

$$\frac{\mathrm{d}x}{\mathrm{d}t} = v(x)$$

which you can solve by separation of variables.

If you know the acceleration as a function of position, you have the differential equation

$$\frac{\mathrm{d}^2x}{\mathrm{d}t^2} = a(x)$$

which is not always easy to solve. In more realistic scenarios, the acceleration will depend not only on the object's own position, but also on the positions of the things it's interacting with. This gives coupled differential equations, which can be simplified in a special cases, but frequently can only be solved numerically.

-
Did you mean to say that the Taylor series converges to the function, rather than the other way around? That actually occurs for any analytic function, according to Wikipedia. For functions of real variables, the conditions might be even more relaxed. –  David Z Oct 11 '11 at 20:17
@David Yes, that's what I meant, thanks. The point about functions that don't equal their Taylor series is that observing the car now doesn't tell you what it will do in the future, but observing an analytic function now, over any finite time period, does tell you what it will do in the future. Hence, a car's position is not well-described by its Taylor series. –  Mark Eichenlaub Oct 12 '11 at 0:39
Thank you for your feedback and comments. I'm still working through it, but one question does occur to me now: It seems to me that most people calculate distance traveled of an object with acceleration, jerk, what have you, using the unintegrated taylor series. But there is something about such a taylor series that is just crying out to be inetgrated. Don't you have to integrate the distance formula in order to get the distance traveled? –  ben Oct 12 '11 at 0:58
@Ben No. A Taylor series is already "integrated", so to speak. If you are given the position and all the derivatives at a certain time, you can imagine doing integration, using that infinite list of derivatives, to find the position at future times. The result of this integration is the Taylor series. –  Mark Eichenlaub Oct 12 '11 at 1:00
@Mark (3 comments up): yeah, I figured that's what you meant about the series not converging to the function. The thing is, that would imply that $x(t)$ for any physical object is necessarily a non-analytic function, which seems like a very counterintuitive conclusion. It's something to think about, I guess. –  David Z Oct 12 '11 at 1:10

You can keep on adding higher order derivatives until they become vanishingly small. A convenient point of entry to this topic would be the Wikipedia article Jerk (physics).

Bear in mind that when you're in a car, jerk is only of relevance during the time when the accelerator pedal is actually moving, to a first-order approximation.

Update: It seems a question with a great deal of relevance to yours was posed a few hours ago on math.se - What is an example of an application of a higher order derivative ($y^{(n)}$, $n≥4$)?. Arturo's answer expands on higher derivatives in kinematics (jounce!), whilst Greg's answer includes a source of jerk in driving I didn't consider (steering).

-
In cam design we often use position, velocity, acceleration, jerk, snap, crackle and pop. In the cases where snap needs to be non-linear, then pop is non-zero. –  ja72 Oct 12 '11 at 4:40
What sort of devices are you designing cams for? –  ben Oct 12 '11 at 19:58

I find that it helps a great deal to understand the fundamental phenomenon. You have your equation correct, but consider it's derivation:

${\bf F} = \dot{\bf p}$

where ${\bf F}$ is the force vector and $\dot{\bf p}$ is the derivative with respect to time of the momentum. The equation you gave is obtained by assuming a constant force and integrating twice with respect to time. That is,

$\frac{d {\bf F}}{dt} = 0 \implies \iint_0 ^t {\bf F} dt^2 = \frac{{\bf F} t^2}{2} + C_1 t + C_0$

so that

$x = \frac{{\bf F} t^2}{2m} + C_1 t + C_0$

with the constants determined by the initial conditions and the conservation laws. You said that you have a decent background in calculus, so, if you know the equation for the force, you should be able to substitute it into Newton's law and integrate to get your solution.

## EXAMPLE

Assume everything is in the $\hat x$ direction for convenience. If we take a simple force like

${\bf F}(t) = \sin(\frac{\pi t}{t_{max}} - \frac{\pi}{2}) + F_{max}$

then,

$\int_0 ^t {\bf F}(t) dt = F_{max} t-\frac{t_{max}}{\pi} \sin(\frac{\pi t}{t_{max}}) + C_1$

and,

$\iint_0 ^t {\bf F}(t) dt^2 = \frac{F_{max} t^2}{2}+\frac{t_{max}^2}{\pi^2} \cos(\frac{\pi t}{t_{max}}) + C_1 t + C_0$

Working from Newton's equation this gives

$x = \frac{F_{max} t^2}{2m}+\frac{t_{max}^2}{\pi^2 m} \cos(\frac{\pi t}{t_{max}}) + C_1 t + C_0$

From the initial conditions and the conservation laws we see that

$C_0 = x_0 - \frac{t_{max}^2}{\pi^2 m}$

and

$C_1 = v_0$

resulting in

$x = \frac{F_{max} t^2}{2m}+\frac{t_{max}^2}{\pi^2 m} \cos(\frac{\pi t}{t_{max}}) + v_0 t + x_0 - \frac{t_{max}^2}{\pi^2 m}$.

In the simple case of zero initial velocity and position,

$x = \frac{F_{max} t^2}{2m}+\frac{t_{max}^2}{\pi^2 m} \cos(\frac{\pi t}{t_{max}}) - \frac{t_{max}^2}{\pi^2 m}$.

-
The double integrals are confusing/ambiguous when they indicate integrating over the same variable two times. –  Mark Eichenlaub Oct 11 '11 at 16:16
Thanks for the feedback. –  AdamRedwine Oct 11 '11 at 17:03
@AdamRedwine The effort you put into this response is much appreciated. –  ben Oct 14 '11 at 10:05
@ben: Thanks, I'm trying to get back into working physics problems as preparation for the GRE. You might be interested in checking out the program I used to make the graphs. It is called sagemath and is completely free and available online (as well as download on Nix like systems). alpha.sagenb.org –  AdamRedwine Oct 14 '11 at 11:58

You are talking about Taylor series. The full thing is:

$$x(t) = x(0) + x'(0) t + x''(0) {t^2\over 2} + x^{(3)}(0) {t^3\over 6} + x^{(4)}(0) {t^4\over 4!} ...$$

Each higher order derivative adds a term, and the n-th term is divided by $n!$. You can see that this is the unique expression by noting that if you differentiate this n times and plug in x=0, you get the same answer on both sides. To prove it rigorously is not hard either, but requires a good bound on the size of the n-th derivative in an interval.

-
Ah, so I had the taylor series wrong in my original post. I forgot to include the "!" to denote factorials in the denominators. –  ben Oct 12 '11 at 0:52

There are three cases here:

1. The acceleration is a function of time $a(t)$. Then the velocity is $$v(t)=\int a(t)\,{\rm d}t$$ and the position as a function of time $$x(t)=\int v(t)\,{\rm d}t$$ The distance is calculated from $x(t)$.

2. The acceleration is function of position $a(x)$. Then the velocity as a function of position is $$\frac{1}{2}v(x)^2 = \int a(x)\,{\rm d}x$$ and the time as a function of position $$t(x) = \int \frac{1}{v(x)}\,{\rm d}x$$ which needs to be back-solved for $x(t)$.

3. Lastly, the acceleration is a function of velocity $a(v)$. Then the time as a function of velocity us $$t(v) = \int \frac{1}{a(v)}\,{\rm d}v$$ and the position as a function of velocity is $$x(v) = \int \frac{v}{a(v)}\,{\rm d}v$$ which need to be back-solved for $x(v(t))$

Example 1

$a(t) = -100 \sin(10 t)$, with $x(0)=0$ and $v(0)=10$ $$v(t) = \int -100\sin(10 t)\,{\rm d}t = 10\,\cos(10 t)$$ $$x(t) = \int 10\cos(10 t)\,{\rm d}t= \sin(10 t)$$

Example 2

$a(x) = -100 x$, with $x(0)=0$ and $v(0)=10$ $$\frac{1}{2}v(x)^2 = \int -100 x {\rm d}x = 50 (1-x^2)$$ $$v(x) = 10 \sqrt{\left(1-x^2\right)}$$ $$t(x) = \int \frac{1}{10 \sqrt{\left(1-x^2\right)}}\,{\rm d}x = \frac{\sin^{-1}(x)}{10}$$ $$x(t) = \sin(10 t)$$

Example 3

$a(v) = 100 - 5 v$, with $x(0)=0$ and $v(0)=10$ $$t(v) = \int \frac{1}{100 - 5 v}\,{\rm d}v = -\frac{1}{5}\ln{ \left( \frac{20-v}{10} \right) }$$ $$x(v) = \int \frac{v}{100 - 5 v}\,{\rm d}v = 2-\frac{v}{5}-4 \ln{\left(\frac{20-v}{10}\right)}$$ with solution $v(t) = 20-10 \hat{e}^{-5 t}$ and $x(v(t)) = 2 \hat{e}^{-5 t}+20 t-2$

-