Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I find the distance traveled of an object if the speed is not constant?

share|cite|improve this question

closed as off-topic by Danu, Sebastian Riese, John Duffield, ACuriousMind, Daniel Griscom Feb 24 at 1:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Danu, Sebastian Riese, John Duffield, ACuriousMind, Daniel Griscom
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 5 down vote accepted

If the speed is a function of time, than the total distance is just the integral with respect to time. For example, the distance traveled $D$ for an object moving at a velocity $v(t)$ over a time interval $t_0$ to $t_f$ is


This is elementary calculus. If you didn't know this already, then you almost certainly don't know calculus and this is not the place to try to teach you a course in calculus. Either way - you will simply need calculus to solve this problem.

share|cite|improve this answer
+1 for being direct. – David Z Mar 4 '11 at 22:56
Yea... I didn't see this answer for some reason. +1. Good point about needing to know calculus already. – Stan Liou Mar 4 '11 at 23:28

Well, you could always lay down a measuring tape between the final position and the initial position and see what it reads ;-)

But seriously though: I'm guessing that all you know is the velocity as a function of time, right? In that case, you'll have to do an integral. Velocity is defined as the time derivative of position,

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

and if you invert that formula (technically: solve the differential equation) to solve for the change in position, you get

$$\mathbf{x}(t) = \int_{t_i}^{t_f} \mathbf{v}(t)\mathrm{d}t$$

share|cite|improve this answer

You use integral calculus. The distance traveled is the integral of the speed over time.

If the speed were constant, the distance traveled would be the speed multiplied by the time.

If the speed is changing, we don't know what speed to use. The solution is to break time up into little chunks - one minute, say. How fast were you traveling in the first minute? Multiply that speed by one minute to get the distance traveled in the first minute only. How fast were you traveling in the second minute? Multiply that by one minute to get the distance traveled in the second minute. Add those two up to get the total distance traveled in the first two minutes, and repeat for the entire trip. Now you have an estimate for the total distance.

If the speed changes significantly inside one minute, this method fails again. No problem, just break time down into one-second intervals. Find the speed in each second, multiply by one second, and add them all up. If the speed is changing significantly in one second, use intervals of .01 seconds, etc.

Usually, as you use smaller and smaller time intervals and calculate the total distance, you'll find that the total distance you calculate converges to some number. For example, you might find a distance of 10.45m if you calculate in 1-minute chunks, 10.87m in one-second chunks, 10.88m in .01s chunks, and 10.88m in .0001s chunks. Then you know the true distance traveled is 10.88m.

This process is called "taking an integral". Sometimes it is possible to find the integral exactly without breaking things up into chunks. For example, if the speed is changing at a constant rate, so speed = acceleration*time for some number "acceleration", the distance traveled is exactly 1/2*acceleration*time^2. For more details, read any book on integral calculus. To learn how to program these algorithms efficiently, look for techniques of numerical integration.

share|cite|improve this answer

It depends on whether you mean to find the final displacement, $$\mathbf{D} = \int_{t_0}^{t_1}\mathbf{v}\:dt,$$ or quite literally the distance traveled. Think of the difference between the two in this way: if you travel from New York to London and back again, do you consider the length of both legs of the journey, or just the difference between your initial and final destination? In words, did you travel (roughly) 11,000 km, there and back, or (roughly) 0 km, since you wound up where you started? The former is the distance you traveled, the latter is the magnitude of your displacement.

If it's the total distance traveled you want, then the formula is $$S = \int_{t_0}^{t_1}v\:dt,$$ where $v$ is the magnitude of your velocity velocity vector $\mathbf{v}$. Note that this is in general different from the magnitude of the displacement $D = |\mathbf{D}|$, unless the motion is always in one direction.

If you know the velocity as a function of time, then you're done. But if you're given the trajectory but not the velocity, that becomes a bit more tricky. Consider the Pythagorean theorem or distance formula: $$\Delta s^2 = \Delta x^2 + \Delta y^2.$$ It is also correct in three dimensions for infinitesimal displacements: $$ds^2 = dx^2 + dy^2 + dz^2.$$ Therefore: $$\left(\frac{ds}{dt}\right)^2 = \frac{dx^2 + dy^2 + dz^2}{dt^2} = v^2.$$ Or: $$S = \int_{t_0}^{t_1}\sqrt{\left(\frac{dx}{dt}\right)^2+\left(\frac{dy}{dt}\right)^2+\left(\frac{dz}{dt}\right)^2}\:dt.$$ You can also find lengths of curves that are not given in terms of time, but by some other parameter, even one of the coordinates (just replace $t$ with that parameter above, e.g., if you have a curve as a function of $x$, then replace every $dt$ with $dx$, and be mindful of $dx/dx = 1$).

share|cite|improve this answer

In principle, as the others say, you need to calculate the integral of the speed over time to determine the distance traveled.

But a non-constant speed doesn't necessarily mean that the function that describes the speed is complicated. For instance, you may be able to know the average speed simply analyzing the speed function.

Say that the speed increases linearly with time: constant acceleration. Then, you know the starting speed (at A) and the ending speed (at B), and you can easily calculate the average:

$$ v_{avg} = \frac{v_{B} - v_{A}}{t_B - t_A} $$

share|cite|improve this answer

You can use a simple way it does include calculus.First find the maximum value of s(distance/displacement).By using the differentiation formula :ds/dt.Then add the time (t) value to the s equation.

   EXAMPLE:Lets say t=2 then apply the vale to the s equation say : s=20t-5t^2
        So the max value of s=20 then multiply with 2 and voila 
                you got your total distance(s=40m).

Hope this helps.

share|cite|improve this answer

Integrating velocity is OK, but usually I do simpler things to know the answer.
It depends on the context. Traveled you said?
An odometer is the ideal instrument. Cars, bycicles, pedestrians can use one.
I can use a GPS in cars, bykes, pedestrian, airplanes and sea turtles, etc, complemented by Google Maps. Trucks have a record of the instant speed for audit purposes (I think), this way is more complicated because you will have to integrate.
A movie cam is sometimes useful to record and keep track of the space traversed. It is used in sports and dancers and to study the body motion. In football games on TV sometimes they give us the distance that each player traversed. They have to know the angle of the playfield with the recording camera, identify the player .. and SUM to the previous data. A sumation is more used in the real world than integration because we take measures at time intervals and accumulate to previous data. An integral presume that we have a continuous flux of data.

If the object is fast compared to light speed then data must be relativistic corrected as the same if you pretend to measure the space traversed when you walk an escalator in relation to the floor of the escalator itself or the outer building.

How interesting that our minds have an automatic complicated answer.
Answering 'If you want to know the traversed space you must have to know the velocity' forgets that to know the velocity is more difficult (need to know more: the space and the time consumed at every moment)

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.