Understanding Numerical Analysis Error Bounds

In summary, the two questions have different issues with summation. The first question asks about the error that can be made when adding terms, while the second asks about a specific case. The first question has a relative error that can be large, while the second does not.
  • #1
happyg1
308
0
Here are my questions:
"Evaluating the summation as i goes from 1 to n of a sub i in floating point arithemetic may lead to an arbirarily large error. If however, all summands a sub i are of the same sign, then this relative error is bounded. Derive a crude bound for this error, disregarding terms of higher order.

Is this a taylor series expansion question? I don't know where to start.

The next one is:
"Show how to evaluate the following expression in a numerically stable fashion:"

(1/1+2x)-((1-x)/(1+x))

again, I don't know exactly where to start. Do I rearrange the formula? Do I calculate the relative error?

Any pointers will be greatly appreciated.
CC
 
Physics news on Phys.org
  • #2
First Question, which is very general:

Suppose you use an 8-digit calculator to add terms.
That means the ninth digit is totally unknown (ignored),
so the value entered could be off by .000000005 .
Keeping the decimal in the same place for each term,
after adding n of these terms, the total error might be
as large as n times this error. {more likely sqrt(n)(error)}

If all the terms are the same sign, the result of adding n
has to be at least |sum| > .1 + n(.0000001) ...
so, what's the relative error in this worst-case scenario?

If some of the terms are opposite signs, the total error
might be just as large, but the actual result of the sum
could be as small as zero! What would be the rel.error?

Second Question, which is a specific case:

Start by writing the first few terms of a series expansion
for each part. Re-arrange to get a single expansion;
ie, get all x^n terms together. Do they cancel?
Numerically stable means you should cancel symbolically,
as much as possible, before computing numerically.
 
  • #3
Hi,
On that first one, I tried to get a formula for the error using the a+'b+'c+((a+b(1+eps1)+c)(1+eps2) and expand it out for n elements in the sum. When I canceled out the terms that had error multiplied together, I got a strange looking sum. I then used the formula for relative error that goes (approximated value - real value)/real value. So I wind up with a messy looking formula. I understand that idea of the error adding up as the terms are summed, I'm just having a hard time with the application. After I get this formula I am unsure of where to go. I don't know if it's even a correct approach.

That second one, I can see why it's not numerically stable becuase there's a relatively small number being subtracted from a relatively large number, and there's a possibility that the tiny number could get "lost". I did get the common denominator and found a better equation. My professor says that I now need to calculate the relative error of the new formula and investigate it. So I'm lost on that, now...I plan to sit down with it and try it out again this morning.

I haven't seen a single problem worked out. I understand the derivations of the formulas and they make sense to me, but I can't seem to put it all together.

I have an additional problem that is asking to estimate the relative error. It reads like this:
Suppose a computer program is available which yields values for arcsin y in floating point representation with t decimal mantissa places and for |y|<=1 subject to a relative error eps with |eps|<=10exp-t. In view of the relation

arctan x = arcsin x/(sqrt(1+x^2))
this program could also be used to evaluate arctan x. Determine for which values x this procedure is numerically stable by estimating the relative error.

So I have tried to calculate the relative error by taking the derivative and multiplying that by x/arctan x but it makes no sense to me. What do I do with it now?

Thanks for any input,
CC
 

1. What is numerical analysis?

Numerical analysis is a branch of mathematics and computer science that deals with the development and use of algorithms to solve mathematical problems using numerical approximation techniques.

2. What are some applications of numerical analysis?

Numerical analysis has a wide range of applications in various fields such as engineering, physics, finance, and computer science. It is used to solve complex mathematical problems that cannot be solved analytically, such as calculating the trajectory of a spacecraft, simulating weather patterns, and predicting stock market trends.

3. What are some common numerical analysis methods?

Some common numerical analysis methods include root finding, interpolation, numerical integration, and differential equation solving. These methods involve using algorithms to find approximate solutions to complex mathematical problems.

4. How accurate are numerical analysis methods?

The accuracy of numerical analysis methods depends on various factors such as the complexity of the problem, the precision of the input data, and the chosen algorithm. In general, numerical analysis methods provide approximate solutions that are close to the actual solution but not always exact.

5. What are the advantages and disadvantages of using numerical analysis?

The main advantage of numerical analysis is its ability to solve complex mathematical problems that cannot be solved analytically. However, it also has some limitations, such as the potential for round-off errors and the need for significant computing power and time to obtain accurate results.

Similar threads

  • Introductory Physics Homework Help
Replies
15
Views
2K
  • Quantum Physics
Replies
5
Views
968
  • Computing and Technology
Replies
4
Views
744
  • Introductory Physics Homework Help
Replies
9
Views
1K
  • Quantum Physics
Replies
1
Views
572
Replies
4
Views
908
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
27
Views
3K
  • Programming and Computer Science
Replies
5
Views
2K
Back
Top