I struggle with this problem:

enter image description here

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.


1 Answer 1


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$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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