UCCM2153 / UDPS2013 - Numerical Methods Topic 1: Mathematical Preliminaries Tutorial 1
UCCM2153 / UDPS2013 - Numerical Methods Topic 1: Mathematical Preliminaries Tutorial 1
Tutorial 1
3
Q1. Let f (x )=x .
b) Find the error term when P2 (0.5) is used to estimate f (0. 5 ) . [Ans.: 0.125]
2
c) Repeat part (a) using x=1 . [Ans.: P2 ( x )=1+ 3( x−1)+3( x−1 ) ]
d) Repeat part (b) using the polynomial from part (c). [Ans.: -0.125]
x
Q2. Find the second Taylor polynomial P2 ( x) for the function f (x )=e cos x at
about x=0 . [Ans.: P2 ( x )=1+ x ]
a) Use P2 (0.5) to approximate f (0. 5 ) . [ Ans.: 1.5]
c) Find an upper bound for |f ( x)−P2 (x )| over the interval [0,1]. [Ans.: 1.2520]
1 1
∫ f ( x)dx ∫ P2 (x )dx
d) Approximate 0 using 0 . [Ans.: 1.5]
1
∫ f ( x)dx ∫ P2 (x )dx
f) What is the actual error to approximate 0 using 0 ? [Ans.:
0.1220]
1 3 3
( − )
+
3 11 20 [Ans.: 0.211]
Compute the absolute error and relative error incurred. [Ans.: 0.0004;0.0019]
x cos x−sin x
f (x )=
Q4. Let x−sin x .
lim f ( x )
a) Find x →0 . [Ans.: -2]
b) Using four-digit rounding arithmetic to evaluate f (0.1). [Ans.: -1.941]
c) By replacing each trigonometric function in f (x ) with third Maclaurin
lim f ( x )
polynomial, approximate x →0 . [Ans.: -2]
Q5. Using the 64-bit long real number representation to find the equivalent decimal for the
following floating-point machine number.
1 10000001010 1001001100000000000000000000000000000000000000000000
[Ans.: -3224]
a)
sin ( 1n ) when n→ ∞ . [Ans.:
O ( 1n ) ; Hint :
sin ( 1n )≤ 1n for
n=1,2,... ]
and number x that produces an output for the product ( x−x 0 )(x −x1 ).. .( x−x n ) .
[No
fixed answer]
Q8. (i) Show that nth Taylor polynomial for f (x )=ln(1+x ) at x=0
n
xi
Pn ( x )=∑ (−1)i+1
i=1 i .
______________________________________________________________________________