Relative Error of Elementary Functions: Examining f(x) = x2 & ex

In summary, the conversation discusses the potential for a similar result to hold for elementary functions such as sin, ln and exponentiation, where the relative error is bounded in terms of the rounding unit. The questions posed are: does this hold for functions such as f(x) = x^2 and f(x) = e^x, and if so, what form must the function take? The response suggests that the definition of "relative error" should be stated and the rest of the problem can be solved through arithmetic.
  • #1
yenbibi
2
0
With exact rounding, we know that each elementary operation has a relative
error which is bounded in terms of the rounding unit n; e.g., for two foating point
numbers x and y, (x + y) = (x + y)(1 + E); |E| <= n. But does a similar result hold
for elementary functions such as sin, ln and exponentiation? In other words is it true
that for a function f(x), (f(x)) = f(x)(1+CE), for some (hopefully small) positive constant C?
Note: E=epsilon
a) Consider f(x) = x2. Compute the a formula for the relative error in f(x)
assuming the relative error in x is e and ignoring error in evaluating f(x). Does
(f(x)) = f(x)(1 + CE) hold for this example?
b) Repeat question a but now for f(x) = ex.
c) Show that if (f(x)) = f(x)(1 + CE) holds, then f(x) must have the form
f(x) = axb with constants a and b.
 
Physics news on Phys.org
  • #2
You have posted several of what are obviously homework problems in a forum that specifically says "this forum is not for homework". In any case, we are not going to do the problems for you. What have you tried and where are you stuck?

You might start by stating the definition of "relative error". After you know what that means, the rest of the problem should be just arithmetic.
 
  • #3


a) For f(x) = x^2, the relative error is given by: (f(x)) = ((x + E)^2)/x^2 - 1 = (x^2 + 2xE + E^2)/x^2 - 1 = 2xE/x^2 + E^2/x^2. This can be rewritten as (f(x)) = (2E/x) + (E^2/x^2). Since x is the only variable in this expression, it is clear that this does not follow the form f(x)(1+CE).

b) For f(x) = e^x, the relative error is given by: (f(x)) = (e^(x+E))/e^x - 1 = (e^x * e^E)/e^x - 1 = e^E/e^x - 1. This can be rewritten as (f(x)) = (e^E - 1)/e^x. Again, this does not follow the form f(x)(1+CE).

c) If (f(x)) = f(x)(1+CE) holds, then we can rewrite it as: (f(x)) = f(x) + CEf(x). This can be rearranged to: CEf(x) = (f(x)) - f(x) = (f(x) - f(x))/f(x) = 0. Therefore, if (f(x)) = f(x)(1+CE) holds, then f(x) must have the form f(x) = ax^b, where a and b are constants.
 

1. What is the relative error of an elementary function?

The relative error of an elementary function is the difference between the exact value and the approximate value of the function, divided by the exact value. It is expressed as a percentage or decimal and represents the accuracy of the approximation.

2. How is the relative error calculated?

The relative error of an elementary function can be calculated by subtracting the approximate value from the exact value, taking the absolute value of this difference, and then dividing it by the exact value. The result is then multiplied by 100 to express it as a percentage.

3. Why is it important to examine the relative error of elementary functions?

Examining the relative error of elementary functions is important because it allows us to understand the accuracy of the approximations made by these functions. It helps us determine how close the approximate value is to the exact value, and whether the approximation is acceptable for the given application.

4. What is the significance of f(x) = x2 & ex in studying relative error of elementary functions?

The functions f(x) = x2 and ex are commonly used elementary functions, and studying their relative error allows us to gain a better understanding of how these functions behave. By examining the relative error of these functions, we can also gain insights into the accuracy of other more complex functions that involve these elementary functions.

5. How can we reduce the relative error of elementary functions?

There are several ways to reduce the relative error of elementary functions. One way is to use more precise mathematical methods or algorithms to calculate the values of the functions. Another way is to use a smaller interval or range of values to approximate the function. Additionally, using a higher number of decimal places in calculations can also help reduce the relative error.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
12
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
513
Replies
3
Views
1K
Replies
3
Views
704
Replies
3
Views
2K
  • Differential Equations
Replies
1
Views
665
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
Back
Top