Numerical Analysis: Evaluating in a numerically stable fashion

In summary, Dr. Smith, a scientist specializing in numerical analysis, provides guidance for solving two questions related to evaluating sums and expressions in a numerically stable fashion. For the first question, they suggest using the triangle inequality and the Cauchy-Schwarz inequality to bound the error. For the second question, they recommend using a Taylor series expansion or a rational approximation method to minimize error. They also encourage the use of additional resources to gain a better understanding of the concepts and techniques involved in numerical analysis.
  • #1
copperback
1
0
Hi, I need help with the following numerical analysis questions. The textbook I'm using (Intro to Numerical Analysis by Stoer) doesn't have many examples so I'm having a lot of trouble figuring out what exactly I should be doing.

"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."

What I did was to expand the n terms in the form [(a+b)(1+esub1)+c](1+esub2)... and then reduce it using the formula for relative error: [fl(y)-y]/y. But the upper bound is given by 5*10^(-t), so what am i supposed to do next?

Another question is:
"Show how to evaluate the following expression in a numerically stable fashion:"

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

I combined the above to get 2x^2/[(x+1)(2x+1)]. What am I supposed to do next? Am I supposed to come up with an algorithm for solving it then calculate the relative error? The book doesn't really have any worked examples so I'm hopelessly lost.

Thanks for looking.
 
Physics news on Phys.org
  • #2




Thank you for reaching out for help with your numerical analysis questions. My name is Dr. Smith and I am a scientist who specializes in numerical analysis. I would be happy to assist you with your questions and provide some guidance on how to approach them.

For your first question, you are on the right track by using the formula for relative error. However, instead of expanding the n terms, try using the triangle inequality to bound the error. This will give you a crude bound for the error, which disregards higher order terms. You can also consider using the Cauchy-Schwarz inequality to further refine your bound.

As for your second question, you have correctly combined the expression to get 2x^2/[(x+1)(2x+1)]. To evaluate this expression in a numerically stable fashion, you can consider using a Taylor series expansion or a rational approximation method. These methods will help minimize the error in your calculation. Once you have calculated the expression, you can then use the formula for relative error to determine the accuracy of your result.

I understand that the textbook you are using may not have many examples, but there are many online resources and other textbooks available that have worked examples and step-by-step explanations. I would recommend doing some additional research and studying these examples to gain a better understanding of the concepts and techniques used in numerical analysis.

I hope this helps you in your studies and please don't hesitate to reach out if you have any further questions. Best of luck!


Dr. Smith
 

Related to Numerical Analysis: Evaluating in a numerically stable fashion

1. What is numerical analysis?

Numerical analysis is a branch of mathematics that deals with developing and using numerical methods and algorithms to solve mathematical problems that are too complex to be solved by analytical methods. It involves using computers to approximate solutions to mathematical problems.

2. What is numerical stability?

Numerical stability refers to the ability of a numerical algorithm to produce accurate results even in the presence of small errors or uncertainties in the input data. A numerically stable algorithm will produce results that are close to the true solution, while a numerically unstable algorithm may produce significantly different results due to even minor variations in the input data.

3. How is numerical stability evaluated?

Numerical stability is evaluated by analyzing the sensitivity of a numerical algorithm to changes in the input data. This can be done by performing a stability analysis, which involves calculating the error propagation in the algorithm and determining how it is affected by small changes in the input data. A stable algorithm will have a low error propagation, while an unstable algorithm will have a high error propagation.

4. Why is numerical stability important in numerical analysis?

Numerical stability is important in numerical analysis because it ensures that the results obtained from a numerical algorithm are reliable and accurate. An unstable algorithm may produce incorrect results, leading to erroneous conclusions and potentially causing problems in real-world applications. By using stable algorithms, we can trust the results and have confidence in the solutions obtained.

5. How can numerical stability be achieved in numerical analysis?

Numerical stability can be achieved in numerical analysis by using stable algorithms and avoiding operations that can magnify errors. This can involve using high-precision arithmetic, rounding or truncating results to reduce error propagation, and carefully selecting the order of operations. Additionally, regular error checking and refinement of the algorithm can help maintain numerical stability.

Similar threads

  • Calculus and Beyond Homework Help
Replies
14
Views
583
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
384
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
3K
  • Precalculus Mathematics Homework Help
Replies
4
Views
614
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
Back
Top