0% found this document useful (0 votes)
80 views2 pages

Lecture 01

This document provides an introduction to numerical analysis and computation. It discusses two fundamental limitations of numerical computation: limited storage and limited time. To compute a square root numerically within these limitations, an approximation scheme is introduced. The scheme uses an initial guess that is iteratively improved using a formula to produce increasingly accurate solutions over multiple phases, using only a limited number of simple arithmetic operations. As an example, the scheme is shown to compute the square root of 5 to high precision in only 12 operations over 3 phases, demonstrating how numerical methods can overcome the limitations of exact computation.

Uploaded by

George Hansen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views2 pages

Lecture 01

This document provides an introduction to numerical analysis and computation. It discusses two fundamental limitations of numerical computation: limited storage and limited time. To compute a square root numerically within these limitations, an approximation scheme is introduced. The scheme uses an initial guess that is iteratively improved using a formula to produce increasingly accurate solutions over multiple phases, using only a limited number of simple arithmetic operations. As an example, the scheme is shown to compute the square root of 5 to high precision in only 12 operations over 3 phases, demonstrating how numerical methods can overcome the limitations of exact computation.

Uploaded by

George Hansen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

cs412: introduction to numerical analysis 09/05/06

Lecture 1: Introduction

Instructor: Professor Amos Ron Scribes: Yunpeng Li, Mark Cowlishaw

1 The Essence of Computation


What is computation? This is the most fundamental question in computer science. In order to
understand what computation is, we need to clarify one common misunderstanding. To illustrate,
consider the following example.

Example 1.1. Solve the quadratic equation

x2 + bx + c = 0 (1)

Of course, we can perform some simple algebraic manipulations leading to the familiar quadratic
formula: √
−b ± b2 − 4c
x1,2 = (2)
2
But does this bring us any closer to finding a numerical solution? The answer is no; while
we can easily perform simple operations like addition and multiplication, it is unclear how we can
calculate a square root. So this algebraic manipulation has gotten us nowhere.

1.1 An Approximation Scheme


So how do we calculate a square root? Before we can answer, we must consider two of the funda-
mental limitations of numerical computation:

• Limited storage - since there is only a limited amount of space to store any number, we cannot
always get an exact numerical solution. Rather, we can only get a solution that is accurate
up to the limit of our precision (for example, 16 digits).

• Limited time - Each operation (e.g. addition, multiplication) takes time to complete. We can
only perform a limited number of operations during a particular calculation, or it will take
too long to finish.
For example, consider the problem of evaluating a quadratic function f (x) = ax2 + bx + c
at a point. The evaluation will take 5 steps: 3 multiplications (x ∗ x, a ∗ x2 , b ∗ x) and two
additions.

To compute a square root, we would like a method that can calculate a numerical solution that
is accurate up to the limit of our representation and performs few operations. One such method
uses an initial guess at the square root value xold to calculate a more accurate value xnew . The
calculation can be repeated using the new value as input, producing increasingly accurate solutions.

1
In later lectures we will see how this method works in general, but for now, consider the following
formula for calculating the square root of 5:

x2old + 5
xnew = (3)
2xold
If we start with an initial value xold = 2.2 and repeat the computation for 3 steps, Matlab
produces the following results:

Phase 0: x = 2.2 x2 = 4.84


Phase 1: xold = 2.2 xnew = 2.23636363636364 x2new = 5.00132231404959
Phase 2: xold = 2.23636363636364 xnew = 2.23606799704361 x2new = 5.00000008740261
Phase 3: xold = 2.23606799704361 xnew = 2.23606797749979 x2new = 5.00000000000000

Using this procedure, only 3 × 4 = 12 simple arithmetic operations are required to arrive at a
numerical solution that is accurate to the limit of Matlab’s precision.

You might also like