Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have the following function; $$f(x) = -\frac{x}{2x + 4}\cdot v_r \Rightarrow \hat{f}(x) = -\frac{x}{4}\cdot v_r$$

Because $x$ is very small we can approximate $f(x)$ to $\hat{f}(x)$.

Now the relative error is computed. From my numerical methods course I know the relative error is defined as the real value minus the approximate value, the absolute error, divided by the real value. This is also stated on wikipedia;

$$ \eta_1 = \left|\frac{f(x) - \hat{f}(x)}{f(x)}\right|$$

However in the course I follow they say it is defined as;

$$ \eta_2 = \left|\frac{f(x) - \hat{f}(x)}{\hat{f}(x)}\right|$$

Now when I calculate $\eta_1$ and $\eta_2$ I get;

$$ \eta_1 = \left|\frac{x}{2}\right|$$

$$ \eta_2 = \left|\frac{x}{x + 2}\right|$$

Now my question is is that I don't really understand what the difference is between $\eta_1$ and $\eta_2$.

ps. if anyone can come up with a better topic title, or tags feel free.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Let's assume (as in your example) that you are using a linear approximation for a function $f$ near $x_0 = 0$ and that $f(x_0) =0$. Look at the ratio of the two forms for the relative error, at a point $x$. If the function $f$ has a continuous second derivative, it is $$ \frac{\eta_2}{\eta_1} = \frac{f(x)}{\hat f(x)} \approx \frac{0 + f'(0) x + f''(z) x^2 / 2}{0 + f'(0) x} = 1 + \frac{f''(z)}{2f'(0)} x $$ where $z$ is between $0$ and $x$. Therefore, for small $x$ the two errors are numerically very close. How small / how close depends on the ratio of $f''$ and $f'$ near $x = 0$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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