Let $f \in C[a,b]$ be a function whose derivative exists on $(a,b)$. Suppose $f$ is to be evaluated at $x_0$ in $(a,b)$, but instead of computing the actual value $f(x_0)$, the approximate value, $\tilde{f}(x_0)$, is the actual value of $f$ at $x_0 + \epsilon$, that is $\tilde{f}(x_0) = f(x_0 + \epsilon)$
a) Use the Mean Value Theorem to estimate the absolute error $|f(x_0) - \tilde{f}(x_0)|$ and the relative error $|f(x_0) - \tilde{f}(x_0)|/|f(x_0)|$, assuming that $f(x_0) \neq 0$.
b) If $\epsilon = 5 \cdot 10^{-6}$ and $x_0 = 1$, find bounds for the absolute and relative errors for
i. $f(x) = e^x$
ii. $f(x) = \sin x$
c) Repeat part (b) with $\epsilon = (5 \cdot 10^{-6}) x_0$ and $x_0 =10$
My work
Part a
There is some $c \in [x_0, x_0 + \epsilon]$ where $f'(c) = \frac{f(x_0 + \epsilon) - f(x_0)}{\epsilon} = \frac{\tilde{f}(x_0) - f(x_0)}{\epsilon}$
Absolute Error: $|f(x_0) - \tilde{f}(x_0)| = |f'(c) \cdot \epsilon|$
Relative Error $\frac{|f(x_0) - \tilde{f}(x_0)|}{|f(x_0)|} = \frac{|f'(c) \cdot \epsilon|}{|f(x_0)|}$
(Is this right? I'm suspicious this isn't the answer expected.)
Part b
Here, I simply calculate the absolute/relative error directly. I'm suspicious because I'm not using part (a) and I'm not calculating "bounds", I'm calculating error values.
i. $f(x) = e^x$
Absolute Error: $|f(1 + 5 \cdot 10^{-6}) - f(1)| = |e^{1 + 5 \cdot 10^{-6}} - e| \approx 1.359 \cdot 10^{-5}$
Relative Error: $|e^{1 + 5 \cdot 10^{-6}} - e|/e \approx 5.000 \cdot 10^{-6}$
ii. $f(x) = \sin x$
Absolute Error: $|f(1 + 5 \cdot 10^{-6}) - f(1)| = |\sin (1 + 5 \cdot 10^{-6}) - \sin 1| \approx 2.702 \cdot 10^{-6}$
Relative Error: $\frac{|\sin (1 + 5 \cdot 10^{-6}) - \sin 1|}{\sin 1} \approx 3.210 \cdot 10^{-6}$
Part c
Similar to (b)
i. $f(x) = e^x$
Absolute Error: $|f(10 + 5 \cdot 10^{-5}) - f(10)| = |e^{10 + 5 \cdot 10^{-5}} - e^10| \approx 1.101$
Relative Error: $|e^{10 + 5 \cdot 10^{-5}} - e^{10}|/e^{10} \approx 5.000 \cdot 10^{-5}$
ii. $f(x) = \sin x$
Absolute Error: $|f(10 + 5 \cdot 10^{-5}) - f(10)| = |\sin (10 + 5 \cdot 10^{-5}) - \sin 10| \approx -4.195 \cdot 10^{-5}$
Relative Error: $\frac{|\sin (10 + 5 \cdot 10^{-5}) - \sin 10|}{\sin 10} \approx 4.949 \cdot 10^{-6}$
Is this right? ...Everything after that should not be part of the question, as there are no questions. @OP: I suggest to edit this question, so that only your problem in part a) is asked. Then try to do b) and c) again. And if there are problems, open another question. – P. Siehr Sep 19 '17 at 12:58