Exercise 1: Condition Number of ln(x) Near x=1.001 — Possible Solution ==================================================================== APPLYING THE FORMULA ------------------------------ The condition number formula is cond = |x * f'(x) / f(x)|. For f(x) = ln(x), f'(x) = 1/x. Substituting: cond = |x * (1/x) / ln(x)| = |1 / ln(x)| At x = 1.001: ln(1.001) = 0.0009995003330834232 cond = |1 / 0.0009995003330834232| = 1000.499916708417 So the condition number of evaluating ln(x) at x=1.001 is approximately 1000.5. WHAT THIS VALUE MEANS ------------------------------ A condition number around 1000 means that a small relative error in the input x gets amplified roughly a thousandfold in the relative error of the output ln(x). For example, if x itself carries a relative error of about 10^-10 (a perfectly ordinary size of floating-point representation error, per Chapter 3's own machine epsilon), the resulting ln(x) value would carry a relative error around 10^-7 - a thousand times worse than the input's own error, even if the logarithm is computed with a perfectly accurate algorithm. WHY THIS HAPPENS SPECIFICALLY NEAR x=1 ------------------------------ The condition number formula reduces to 1/ln(x) for the logarithm, and ln(x) approaches 0 as x approaches 1 (since ln(1) = 0 exactly). Dividing by a value approaching zero is exactly the mechanism that makes the condition number blow up - this is structurally the same kind of behavior as this chapter's own f(x)=1/(x-1) example near its singularity at x=1, just for a different function whose own "trouble point" happens to also sit at x=1. Evaluating ln(x) far from 1 (e.g. at x=10) would give a much smaller, well-behaved condition number, because ln(x) is no longer close to zero there. WHY THIS WORKS AS AN ANSWER ------------------------------ The answer substitutes correctly into the chapter's own formula, arrives at a precise numeric condition number rather than a vague "it's sensitive," explains concretely what that number implies about error amplification, and identifies the structural reason (the function value approaching zero in the denominator) that connects this case to the chapter's own worked example rather than treating it as an isolated fact.