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 ?$$
 A: 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.
A: 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).
A: I find that it helps a great deal to understand the fundamental phenomenon.  You have your equation correct, but consider it's derivation:
We start with Newton's second law,
${\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}$.

A: 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.
A: There are three cases here:


*

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

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

*Lastly, the acceleration is a function of velocity $a(v)$. Then the time as a function of velocity us
$$ t(v) = t_c + \int \frac{1}{a(v)}\,{\rm d}v \tag{5}$$
and the position as a function of velocity is
$$ x(v) = x_c + \int \frac{v}{a(v)}\,{\rm d}v \tag{6}$$
which need to be back-solved for $x(v(t))$
Where $x_c$, $v_c$, $t_c$ and $w_c$ are integration constants of appropriate units
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 $
