How to find speedometer error given total time, and distance/recorded speed per trip I have been given a problem where someone is driving a car whose speedometer is off by some constant c (e.g. if the speedometer shows 30, but the true speed is 45, then c=15)
They begin to log their n drives, each time taking note of the distance traveled and speedometer reading during that drive. (assume the speed was constant throughout the whole ride)
I am given the total time t driven over all the drives, but not the time for each individual drive.
I am supposed to find the error, c, given n, t, and d1,d2,...,dn and s1,s2,...sn where d(i) is the distance traveled during a drive and s(i) is the speedometer reading on that drive
So far I've found that t = [d1/(r1+c)]+[d2/(r2+c)]+...+[dn/(rn+c)]
I'm wondering how to algebraically solve this equation for c
Any help is appreciated (or perhaps there is a better way to solve this problem, any help in that direction would be appreciated too)
 A: As far as I can tell, your reasoning is correct.
If you have just two terms, you can solve it like this:
$$t=\frac{d_1}{r_1+c}+\frac{d_2}{r_2+c}$$
$$t=\frac{d_1 (r_2+c)+d_2(r_1+c)}{(r_1+c)(r_2+c)}$$
$$t(r_1+c)(r_2+c)=d_1 (r_2+c)+d_2(r_1+c)$$
$$t r_1 r_2+t (r_1+r_2)c+t c^2=d_1 (r_2+c)+d_2(r_1+c)$$
$$t r_1 r_2+(t (r_1+r_2)-d_1-d_2)c+t c^2=d_1 r_2+d_2 r_1$$
then use the quadratic formula
If you have $n$ terms, you will in general get an $n$th degree equation, which cannot be solved algebraically for $n>4$.
A: Starting from @Wouter's answer, you are looking for the zero of function
$$f(c)=\sum_{i=1}^n \frac{d_i}{r_i+c}-t$$ I would not recommend to transform it to a polynomial. Just keep it like that and use Newton method with analytical derivatives with $c_0=0$. It should converge quite fast (assuming $c >0$).
Since the higher order derivatives are very simple, you could even use Halley or Householder methods for faster convergence.
Notice that starting with $c_0=0$, since $f''(0)>0$ and $f(0)<0$, by Darboux theorem, there will be one overshoot of the solution. 
