# Newton's method problem

I struggle with this problem: I understand how to apply Newton's method to a already given function but I can't seem to find that function in this case from the given input n, t, d and s. I'm completely new to numerical method's so sorry if I don't see the obvious. It would be nice if someone could lead me in the right direction on how to solve this.

The Netwon(-Raphson) method helps you finding the root(s) of a function $$f(x)$$, that is, those values of $$x_0$$ for which $$f(x_0) = 0$$. In your case, the unknown value is $$c$$, so we start by writing down the problem in terms of a function $$f(c)$$ that is zero when $$c$$ takes the "correct" value (which we call $$c_0$$).
Since this looks like homework, I don't want to give you the solution right away, but just help you find it yourself. On one hand, you have the total time it took to drive for the whole journey, $$t$$. On the other hand, you have the distance and speed (to be corrected by $$c$$) associated with each segment. Now, the equation you need to solve looks like this:
$$t = T(c_0)$$
where $$T(c)$$ is the time it takes to drive all the segments as a function of $$c$$. Clearly, $$T(c)$$ is a function of the sets of $$d_i$$ and $$s_i$$ (and its derivation is left to you!). Finding the correct value of $$c$$ thus reduces to finding the root of the function $$T(c) - t$$.