Condition Number Example - Square Root

Thomas J. Kennedy

Contents:

1 Overview

Let us examine a more interesting function…

$$ f(x) = \sqrt{1 + x} - \sqrt{x} $$

We know that the derivative can be computed directly.

$$ \begin{align} f^{\prime}(x) &= \frac{d}{dx}\left(\sqrt{1 + x} - \sqrt{x}\right) \\ &= \frac{d}{dx}\left(\sqrt{1 + x}\right) - \frac{d}{dx}\left(\sqrt{x}\right) \\ &= \frac{1}{2\sqrt{1 + x}} - \frac{1}{2\sqrt{x}} \\ &= \frac{\sqrt{x}}{\sqrt{x}}\frac{1}{2\sqrt{1 + x}} - \frac{\sqrt{1 + x}}{\sqrt{1 + x}}\frac{1}{2\sqrt{x}} \\ &= \frac{\sqrt{x}}{2\sqrt{x}\sqrt{1 + x}} - \frac{\sqrt{1 + x}}{2\sqrt{x}\sqrt{1 + x}} \\ &= \frac{\left(\sqrt{x} - \sqrt{1 + x}\right)}{2\sqrt{x}\sqrt{1 + x}}\\ \end{align} $$

Finding a common denominator is not required. However, it will allow for a nice cancellation.

2 Computing the Condition Number

We can compute the general form of the condition number ($x \ne 0$ and $f(x) \ne 0$) using…

$$ \begin{align} (\text{cond }f)(x) &= \left| \frac{x f^{\prime}(x)}{f(x)} \right|\\ &= \left| \frac{x\left(\sqrt{x} - \sqrt{1 + x}\right)}{2\sqrt{x}\sqrt{1 + x}} \times \frac{1}{\sqrt{1 + x} - \sqrt{x}} \right|\\ &= \left| \frac{x}{2\sqrt{x}\sqrt{1 + x}} \right|\\ &= \left| \frac{\sqrt{x}}{2\sqrt{1 + x}} \right|\\ &= \frac{1}{2} \left| \frac{\sqrt{x}}{\sqrt{1 + x}} \right|\\ &\to \frac{1}{2} \left| \frac{\to 0}{\to 1} \right| \to 0 \text{ as } x \to 0\\ \end{align} $$

While the condition number is not zero… it is definitely less than one.