Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have an object falling down in a parabolic trajectory. I can estimate the total distance traveled during the time t, i.e. the length of the parabola's arc is known. I need an efficient algorithm that estimates the horizontal displacement of an object. The estimation can be rough. An error within, say, 2-3% is acceptable.

share|cite|improve this question
Are you assuming that at time $t=0$ the object has velocity zero? If not there are parabolas having some fixed arc length which have different horizontal displacement, so that you can't determine the horizontal displacement only from the arc length. – coffeemath Jul 7 '13 at 15:36

1 Answer 1

Given a (differentiable) function $f: \mathbb{R} \to \mathbb{R}$, the arc length $l$ of the path between points $f(\alpha)$ and $f(\beta)$ is given by $$ l = \int_\alpha^\beta \sqrt{1+(f'(x))^2}\,dx $$

A general quadratic function is given by $f(x) = ax^2+bx+c$, and so $f'(x) = 2ax + b$. Substituting this into the expression for $l$ above and integrating gives $$ l = \left.\frac{1}{4a} \left((b+2ax) \sqrt{1+(b+2ax)^2} + \text{arcsinh}(b+2ax) \right)\right|^\beta_\alpha \ . $$ The distance traveled in the $x$-direction, say $\Delta x$, is $\beta - \alpha$. You have stated that you know $l$; in order to know $\Delta x$ you need to know at the very least $a$ and $b$ (the coefficients of the quadratic function $f$). In this event, you might be able to solve the preceding equation for $\Delta x$ (technically it would be one equation in two unknowns, so I am not even sure you could manipulate it to get $\beta - \alpha$). However, if you know $a$ and $b$ then it is likely that you can find $\Delta x$ without having to go to this trouble.

share|cite|improve this answer
I think the result of the integral should have $\sin^{-1}$ – whatever Jul 7 '13 at 16:28
@metacompactness Oh man that was bad. I forgot to square the derivative in the integral! Thanks for catching this; fixed now. Turns out it's an arcsinh (so says Mathematica). – Eric Kightley Jul 7 '13 at 16:36
Thanks Eric. This is an attempt to solve the problem of finding displacement for some device using its accelerometer data (see e.g.…). The approach with cancelling the gravity vector using the gyroscope and some heuristics gives terrible results after integrating the acceleration twice. The drift is just enormous. I thought then I could just let the gravity vector be there and make some adjustments. Any ideas on how this can be done? – mojuba Jul 7 '13 at 17:08
@mojuba The link you posted is for the calculation of the (horizontal) distance traveled by an iphone (1 dimensional motion) whereas this question is about finding the horizontal distance traveled by a projectile from its path length (2D motion). – whatever Jul 7 '13 at 17:18
@metacompactness: as I said, I'm trying to solve the same problem. The source of error in the traditional approach with cancelling the gravity vector is that the device can't cancel g accurate enough. I'm now trying to build a solution that just takes raw accelerometer data with g included. Of course the device is not falling when it's in your pocket, but if you take raw accelerometer data it would appear to the algorithm that it is. – mojuba Jul 7 '13 at 17:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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