Some notes on A1, following the questions I got
during office hours.
Q2a A bit more elaboration on parts of this question:
Find condition number and for what x’s (say x1, x2, x3, …)
it becomes infinity.
Then assume you are at x1+delta, (then x2+delta, …),
for |delta| small.
Substitute x1+delta for x in the condition number. Simplify,
following the rule that higher orders of delta can be ignored
next to lower orders. Arrive at a (fairly simple) expression
that involves delta.
Find for what delta this expression is greater than 1/Emach.
Q2b A bit more elaboration on parts of this question:
Generically state what problems may occur in expression given
when x ~ 0.
Give mathematically equivalent expression that does not suffer
from problems above, when x ~ 0.
Find x for which the first expression, when computed on floating-point system
gives a very wrong result, and
for which the second expression, when computed on floating-point system
gives a reasonable (still approximate) result, and explain.
It is ok to get ideas from matlab or other computing, but you need to explain.
Q2c Do not alter the output format, as stated.
Only nicely aligned and correct results will get full marks.
(If you use python, you must find a compatible format for output.)
Q3d (and b) Keep in mind that Taylor series of cos(x) about 0
converges faster (with smaller number of terms), when |x| is small.
Use (the easy) properties of cosine, so that the number of terms
you need for the x’s indicated remains small.
The cases x = 1, x = 2, x = 4, x = 6, should be seen
as indicative cases, to think about. I could have asked for
x = 1.5, x = 3, x = 3.5, x = 5 or
x = 1.2, x = 2.5, x = 4.5, x = 6.1 (and many more other cases).