25.04.2013 Views

f a f a X Y f( )a ( ) ( ) af fay y= = Figure 2.2: Errors in a pratical situation f

f a f a X Y f( )a ( ) ( ) af fay y= = Figure 2.2: Errors in a pratical situation f

f a f a X Y f( )a ( ) ( ) af fay y= = Figure 2.2: Errors in a pratical situation f

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Lecture 3 (Tue, Aug. 28). Condition<strong>in</strong>g<br />

Consider a general problem (f(x)) which is well def<strong>in</strong>ed. Suppose we have the <strong>in</strong>put x = a<br />

and we need to f<strong>in</strong>d the result (answer) y = f(a). Now suppose we use a method ˆ f(x) to<br />

approximate f(x) with an <strong>in</strong>put â that is close to a with an absolute backward error |a − â|.<br />

Here |·|| is a certa<strong>in</strong> measure (norm). Then with a certa<strong>in</strong> measure (norm) |·|| that might be<br />

different from the one for a, the absolute error of the result is |f(a) − ˆ f(â)|, which is called<br />

the absolute forward error.<br />

The error <strong>in</strong> the result (by ignor<strong>in</strong>g the norm) can be decomposed <strong>in</strong>to two parts (Fig-<br />

ure <strong>2.2</strong>):<br />

f(a) − ˆ f(â) = f(a) − f(â)<br />

<br />

+ f(â) −<br />

Propagated data error<br />

ˆ f(â)<br />

<br />

Computational error<br />

The computational error is caused by the approximation of the method. The propagated<br />

<strong>Figure</strong> <strong>2.2</strong>: <strong>Errors</strong> <strong>in</strong> a <strong>pratical</strong> <strong>situation</strong><br />

a<br />

a<br />

X<br />

f<br />

f<br />

f<br />

Y<br />

y = fa ( )<br />

f( a)<br />

<strong>y=</strong> f(<br />

a)<br />

data error is caused the sensitivity of the problem itself.<br />

The condition<strong>in</strong>g of a problem f is about to sensitivity of the result f(a) to a small<br />

change <strong>in</strong> a. The absolute condition number κf(a) is def<strong>in</strong>ed by<br />

κf(a) = lim sup â→a<br />

If f is a function and is differentiable at a, then<br />

κf(a) = |J(a)|,<br />

|f(a) − f(â)|<br />

.<br />

|a − â|<br />

1


2<br />

where J(x) is the Jacobian of f(x). Obviously, for any â close to a,<br />

|f(a) − f(â)| ≈ κf(a)|a − â|.<br />

So κf(a) is large, a small change <strong>in</strong> a may result <strong>in</strong> a large change <strong>in</strong> f(a). In this case, we<br />

say the problem is ill-conditioned. Otherwise it is well-conditioned.<br />

Similarly, when a = 0 and f(a) = 0, us<strong>in</strong>g the relative backward error |a − â|/|a| and<br />

relative forward error |f(a) − f(â)|/|f(a)|, we can def<strong>in</strong>e the relative condition number<br />

˜κf(a) = lim sup â→a<br />

If f(x) is differentiable at a, then<br />

When â is close to a,<br />

|f(a) − f(â)|/|f(a)|<br />

|a − â|/|a|<br />

˜κf(a) = |a|<br />

|f(a)| |J(a)|.<br />

|f(a) − f(â)|<br />

|f(a)|<br />

≈ ˜κf(a)<br />

|a − â|<br />

.<br />

|a|<br />

= |a|<br />

|f(a)| κf(a).<br />

Aga<strong>in</strong>, ˜κf(a) measures the sensitivity of f(x) at a, but <strong>in</strong> a relative sense.<br />

Example 3.1 Let f(x) = √ x. Determ<strong>in</strong>e κf and ˜κf at a > 0.<br />

Solution. S<strong>in</strong>ce J(a) = f ′ (x) = 1/(2 √ a),<br />

κf(a) = |J(a)| = 1<br />

2 √ a , ˜κf(a) = a<br />

√ |J(a)| =<br />

a a<br />

√<br />

a<br />

1<br />

2 √ a<br />

= 1<br />

2 .<br />

Hence, <strong>in</strong> absolute sense, the problem is ill-conditioned when a is close to 0, and it is well<br />

conditioned when a is away from 0, say a ≥ 1.<br />

In relative sense, the problem is well-conditioned for any a > 0 (even for a = 0 <strong>in</strong> the<br />

limit sense).<br />

Example 3.2 In this example we <strong>in</strong>vestigate how a root of a polynomial will change when<br />

an error is <strong>in</strong>troduced to a particular coefficient. Let p(x) = a0 + a1x + . . . + anx n and λ be<br />

a s<strong>in</strong>gle root of p(x) = 0. (That means p(x) = (x − λ)q(x) and q(λ) = 0.) It is well-known<br />

that λ is a function of the coefficients a0, . . . , an. In particular, λ is a function of ai for some<br />

i when other coefficients rema<strong>in</strong> unchanged. Let λ = f(ai). Determ<strong>in</strong>e κf(ai) and ˜κf(ai).<br />

Solution. The function λ = f(ai) is a s<strong>in</strong>gle variable function. S<strong>in</strong>ce λ is a s<strong>in</strong>gle root of<br />

p(x), f(ai) is differentiable. We need to f<strong>in</strong>d f ′ (ai).<br />

Because λ is a root of p(x) = 0,<br />

p(λ) = a0 + a1λ + . . . + ai−1λ i−1 + aiλ i + ai+1λ i+1 + . . . + anλ n = 0.<br />

Differentiat<strong>in</strong>g both sides with respect to ai we have<br />

[a1 + . . . (i − 1)ai−1λ i−2 + iaiλ i−1 + (i + 1)ai+1λ i + . . . + nanλ n−1 ]f ′ (ai) + λ i = 0,


or equivalently<br />

So<br />

and<br />

p ′ (λ)f ′ (ai) = −λ i ⇒ f ′ (ai) = − λi<br />

p ′ (λ) .<br />

κf = |f ′ (ai)| = |λ|i<br />

|p ′ (λ)| ,<br />

˜κf = κ |ai|<br />

|λ|<br />

i−1 |ai||λ|<br />

=<br />

|p ′ .<br />

(λ)|<br />

Roughly speak<strong>in</strong>g, the problem of f<strong>in</strong>d<strong>in</strong>g a root of a polynomial equation is ill-conditioned<br />

if p ′ (λ) is small. In particular, when λ is a multiple root, p ′ (λ) = 0 and κf = ∞ (˜κf = ∞).<br />

3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!