University of the Witwatersrand Computational Physics : 2004 Tutorial 1 : (40 Marks) Elementary Mathematical Operations

1. In discussing computer representation of numbers and arithmetic we can write :-
 true stored

The symbol represents any primary operation.
1. Find the relative error in addition to first order and show that if and differ in sign with then there is a disasterous loss of accuracy. (5)

2. Show in addition that error propogation in summing truncated series is minimised by adding terms in ascending order of magnitude. (5)

[10]

2. Suppose with .
1. Consider Euler's method and derive a non-recursive formula for the iteration in the numerical solution of the equation. Show that in the critical case stability depends on the choice of stepsize . (5)

2. Show that the exact solution occurs for the limit , .
( Hint: ) (5)

3. What problems occur in practice if becomes too small and what are the implications for the choice of ? How would one optimise ? (5)

[15]

2/Page two...

3.
1. Derive an analytic expression for the error in Simpson's Rule for one panel of integration.
(Hint : Expand the function in the integrand in a Taylor series, and compare to Simpson's Rule). (5)

2. Comment on the result. (3)

3. Can one correct for this error using the fact that an analytic expression is known for it. (2)

[10]

4.
How would one integrate

[5]