You are on page 1of 6

TRuncatiTaylor

pule
onError.cExpansion
om of faith ) around

f- Cx) .

faith)
Ai
=
fail
.
+ flash f +

"ca)Ñ+f¥ʰˢ
27
+ . . .

For practical purposes ,


we cannot include all ( infinite number )
of terms .
We need to Truncate somewhere .

Let's
say we
only include first two terms .
in our
approximation
of faith .

faith) =
fad +

ftah-fz.ph f¥fi + + . . .

ifwerieepne
-

two terms
Truncate rest
of
them
.

Truncation error tan be


approximated by f-
"
(a) fi
2-
because ◦< hat , therefore tf term is dominating .
Sofar we approximated value of faith ) using Taylor
series .

Let's say we want to compute the derivative (numerical ) .

him fH+ah)-#
'
Derivative is defined as
, f- a) =

So would expect that if his chosen


naturally one

as small as
possible the value of derivative will
be MORI accurate .

true due to
However, this is not .
mainly
numerical
→ rors .

Let's consider
Taylor series expansion of faith) .

faith) =
fad + flash f +

4- "ca)Ñ+f¥fi + . . .

We want
approximation of f' ex ), rearrange the terms .

faith) fcx)
"c¥.h2 f÷hˢ
f
'
f- ai h = - -
_ _ . . .

Divide both sides by h .

f¥h f¥ "¥,h f÷yñ f


'
f- an = ) - -
- _ . . .
'

fc-xi-ha-fd-f_xh-f-j.tn?.. EsTimatedTauecf
f- a) =

derivative .

What is expression of truncation error ?


Truncation Error -

f' h

The above
expression says if his small truncation error will get small
.

Let's define absolute error as


,

d =

/ FED _

fC×+# h
↑ ↑
True Value Estimated Value .

fcxtcoscx)
CosC✗th)#s×
;
Estimated Value =
)

f
'
True Value = a) = Sina )

¥4m
.

..
which is
Truncation error is not the
only error

in There
prevalent our
example. are various sources

of bound-off cross
presentin our estimation,

f(x).
#th)
-

We will consider the round-off errors in


representing
fixth) and fex) in 64-bit
floating point
representation.
The relativeerror in
storing fixth) can be written as

e =

yxh
li e

f(xth)
=>
F(xt h) e,(f(x+h))
= +

no w -

True value Value. relativeerror.


stored.

Similarly, we can write relative rounding error for


f(x) as,

f(x) f(x) 22/f(x h)/


=
+ +

wo 2 -
True Value stored value relative error.
f(x) f(x)
h) xth)) e2f(xth) f) th
+
-
=
+

-
↑ 2 wo ⑳
value of Estimated Error
True
derivative value
Rounding Truncation
due to
storing Error.
f(x) 4f(x 1) +

We' see that


truncation, error decreases, with
in
decrease h. However, rounding error
h.
increases which we decrease the value of

We need find the optimal


to value of h
such that the total error is minimised.

Δ = Truncation Error
+Round-off error.

Δ =


f(x)h +

h)1eff(x))
h
We know the upper bound for relative round-off
error is machine precision, tm.

e,,t2 Gm.
<

2m)
=>
a
f(x)h Hf(x)
+
=
To find minimum of X, we take derivative of
* wot ho

Elfix-omtinl
e
=
interested in
Generally, for such problems we are

approximate value for he


hi πEm 1.25
=

You might also like