You are on page 1of 3

UNIVERSIDAD DEL VALLE SEDE TULUÁ

FACULTAD DE INGENIERÍA
PROGRAMA: INGENIERÍA DE SISTEMAS
ASIGNATURA: SIMULACIÓN Y COMPUTACIÓN NUMÉRICA 750016M GRUPO
51 Sem 2024 01
TALLER No 2: Polinomios de Taylor. Elementos de teoría del error

Profesor: Efraín Vásquez Millán

1. Compute the absolute error and relative error in approximations of p by p∗ .

a. p = π, p∗ = 22 7 d. p = 100 ∗
3 , p = 33· 3 g. p = 8!, p∗ = 39900
b. p = 13 , p∗ = 0· 333 e. p = e, p∗ = 2,718 √
π
c. p = 1000 , p∗ = 0· 0031 f. p = e10 , p∗ = 2200 h. p = 2, p∗ = 1· 414

2. Use three-digit rounding arithmetic to perform the following calculations. Compute the absolute error
and relative error with the exact value determined to at least five digits.

a. 133 + 0· 921 3
f. −10π + 6e −
62
b. 133 − 0· 499
³ 2 ´³ 9 ´
c. (121 − 0· 327) − 119 g.
9 7
d. (121 − 199) − 0· 327
22
13
− 67 π− 7
e. 14 h. 1
2e − 5· 4 17

3. Let
x cos x − sinx
f (x) =
x − sinx
a. Find lı́m f (x)
x→0
b. Use four-digit rounding arithmetic to evaluate f (0· 1)
c. Use four-digit rounding arithmetic to evaluate (b).
d. The actual value is f (0· 1) = −1· 99899998. Find the relative error for the values obtained in parts
(b) and (c).
4. The two-by-two linear system

ax + by = e
cx + dy = f

where a, b, c, d, e, f , are given, can be solved for x and y as follows :

let m = ac , provided a 6= 0;

d1 = d − mb;
f1 = f − me;
y = df11 ;
x = e−bya ;
Solve the following linear systems using four-digit rounding arithmetic

1
a. b.
1· 130x − 6· 990y = 14· 20 1· 013x − 6· 099y = 14· 22
8· 110x + 12· 20y = −0· 1370 −18· 11x + 112· 2y = −0· 1376

5. Convert the following binary numbers to decimal basis(basis 10).

a. 10101dos c. 111000dos e. 0· 11011dos . g. 0· 1010101dos


b. 11111110dos d. 1000000111dos f. 0· 10101dos h. 0· 1110110110dos

6. Convert the following numbers to binary form by sequences {Qk }, {bk }:

a. 23 b. 87 c. 378 d. 2388

7. Convert the following numbers to binary fraccions of the form 0· d1 d2 ...dn


7 23 1 1
a. 16 c. 32 e. 10 g. 7
13 75 1
b. 16 d. 128 f. 3

8. For the following seven-digit binary approximation. Find the error in the approximation R−0· d1 d2 d3 d4 d5 d6 d7 .
1 1
a. R = 10 ≈ 0· 0001100dos b. R = 7 ≈ 0· 0010010dos

1 1 3 3 3
9. Show that the binary expansion 5 = 0· 0011dos is equivalent to 5 = 16 + 256 + 4096 + ... .

10. Computers use a normalized floating-point binary representation for real numbers. This mean that the
mathematical quantity x is not actually stored in the computer. Instead, the computer stores a binary
approximation to x:

x ≈ ±q × 2n , (1)

The number q is the mantisa and it is a finite binary expresion satisfying the inequality 21 ≤ q < 1.
The integer n is called the exponente. In a computer, only a small subset of the real number system
is used. Typically, this subset contains only a portion of the binary numbers suggested by (1). The
number of binary digits is restricted in both the numbers q and n. For example, consider the set of all
positive real numbers of the form
0.d1 d2 d3 d4(dos) × 2n , (2)
where d1 = 1 and d2 , d3 and d4 are either 0 or 1 and n ∈ {−3, −2, −1, 0, 1, 2, 3, 4}. There are eight
choices for the mantissa and eight choices for the exponent in (2)and this produces a set of 64 num-
bers:(see table). It is important to learn that when the mantissa and exponent in (2) are restricted,
the computer has a limited number of values it chooses from to store as an approximation to the real
number x.
What would happen if a computer had only a 4-bit mantissa and was restricted to perform the com-
putation. Assume that the computer rounds all real numbers to the closest binary number in Table.
At each step the reader can look at the table to see that the best approximation is being used.

a. ( 13 + 15 )+ 1
6
1
b. ( 10 + 13 )+ 1
5
3
c. ( 17 + 19 )+ 1
7
7
d. ( 10 + 19 )+ 1
7

2
M antisa n = −3 n = −2 n = −1 n=0 n=1 n=2 n=3 n=4
0· 1000dos 0· 0625 0· 125 0· 25 0· 5 1 2 4 8
0· 1001dos 0· 0703125 0· 140625 0· 28125 0· 5625 1· 125 2· 25 4· 5 9
0· 1010dos 0· 078125 0· 15625 0· 3125 0· 625 1· 25 2· 5 5 10
0· 1011dos 0· 0859375 0· 171875 0· 34375 0· 6875 1· 375 2· 75 5· 5 11
0· 1100dos 0· 09375 0· 1875 0· 375 0· 75 1· 5 3 6 12
0· 1101dos 0· 1015625 0· 203125 0· 40625 0· 8125 1· 625 3· 25 6· 5 13
0· 1110dos 0· 109375 0· 21875 0· 4375 0· 875 1· 75 3· 5 7 14
0· 1111dos 0· 1171875 0· 234375 0· 46875 0· 9375 1· 875 3· 75 7· 5 15

11. Show that when 2 is replaced by 3 in all the formulas in {Qk } y {bk }, the result is a method for finding
the base 3 expansion of a positive integer. Express the following integers in base 3.

a. 23 b. 421 c. 1784

12. Show that when 2 is replaced by 3 in {dk } y {Fk }, the result is a method for finding the base 3
expansion of a positive number R that lies in the interval 0 < R < 1. Express the following numbers
in base 3.
1 1 1 11
a. 3 b. 2 c. 10 d. 27

13. Compare³the results of calculating f (500) and g(500), using six digits and rounding. The functions are
√ √ ´ x
f (x) = x x + 1 − x and g(x) = √ √ .
x+1+ x
14. Compare the results of calculating f (0· 01) y P (500)
ex − 1 − x 1 x x2
using six digits and rounding, where f (x) = and P (x) = + + .
x2 2 6 24
15. Sabiendo que
Z 1
2 2
ex dx = 0· 544987104184 = p
0
2
determinar la precisión de la aproximación obtenida al reemplazar el integrando f (x) = ex por la serie
x4 x6 x8
de Taylor truncada P8 (x) = 1 + x2 + + + . Calcular el error relativo y establecer el número
2! 3! 4!
de cifras significativas de exactitud.

You might also like