1
$\begingroup$

An approximating formula dr(h) is used to calculate the derivative of a given function. With different steplengths these were the result ( in exact arithemtic and no rounding errors)

h      drh 0.1    0.50801203103 0.05   0.50100687738 0.001  0.50000000800 

Decide, with help from the table, how the error in this approximation formula depends on h. Hint: The error can be written as ch^p and I'm supposed to decide the p for this expression.

The last table value can, compared to the other two, be treated as the exact value of the derivative.

2 Answers 2

1

We have $c(0.1)^p=0.50801203103- 0.50000000800=a$ and $c(0.05)^p= 0.50100687738-0.50000000800=b$.

Divide. We get $2^p=a/b$.

To find $p$, take the logarithm (to any base you like) of both sides. We get $p\log 2=\log(a/b).$

We know $a$ and $b$, so we can find $p$.

Here, as instructed, we treated the last estimate as exact. If we do, then, for example, $0.50801203103- 0.50000000800$ is the error in the first estimate.

We could also eyeball the thing. When $h=0.1$, the error is about $0.008$. When we go to $h=0.05$, halving the size of $h$, our error dips to about $0.001$, so the error has been divided by $8$. It follows that $p$ must be close to $3$.

0

A more brute force approach: I plotted $\log(drh-0.5)$ vs. $\log h$ below. (It fits so nicely that I decided that it justified taking $0.5$ as the 'exact' value.) It is a nice straight line with slope $3.003$ (based on first and third point). Since the expected error model is $c h^p$, the corresponding graph would be $\log c + p \log h$ vs. $\log h$. From this we get $p \approx 3$. Subtracting $p \log h$ from middle point on the curve gives an estimate for $\log c \approx 2.0862$ which corresponds to $c \approx 8$. So the model is approximately $e \approx 8 h^3$.

enter image description here