18.01.2015 Views

Appunti di Calcolo Numerico - Esercizi e Dispense - Università degli ...

Appunti di Calcolo Numerico - Esercizi e Dispense - Università degli ...

Appunti di Calcolo Numerico - Esercizi e Dispense - Università degli ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5. INTERPOLAZIONE<br />

x i f (x i ) f (·,·) f (·,·,·) f (·,·,·,·)<br />

0 1<br />

0.1 0.48<br />

0.48 − 1<br />

= −5.2<br />

0.1<br />

0.8 1.32<br />

1.32 − 0.48<br />

= 1.2<br />

0.7<br />

1.2 + 5.2<br />

= 8<br />

0.8<br />

1.2 5.32<br />

5.32 − 1.32<br />

= 10<br />

0.4<br />

10 − 1.2<br />

= 8<br />

1.1<br />

8 − 8<br />

1.2 = 0<br />

(a) La tabella delle <strong>di</strong>fferenza <strong>di</strong>vise è:<br />

(b) I polinomi <strong>di</strong> Newton <strong>di</strong> grado 0,1,2 e 3 sono:<br />

p 0 (x) = 1<br />

p 1 (x) = 1 − 5.2x<br />

p 2 (x) = 1 − 5.2x + 8x(x − 0.1) = 8x 2 − 6x + 1<br />

p 3 (x) = 1 − 5.2x + 8x(x − 0.1) + 0x(x − 0.1)(x − 0.8) = 1 − 5.2x + 8x(x − 0.1) = p 2 (x)<br />

Il polinomio p 3 (x) coincide con p 2 (x) in quanto p 2 (x 3 ) = p 2 (1.2) = f (1.2) = f (x 3 ) cioè il polinomio<br />

<strong>di</strong> grado 2 interpola non solo i dati (x 0 , f (x 0 )), (x 1 , f (x 1 )) e (x 2 , f (x 2 )) ma anche (x 3 , f (x 3 )).<br />

(c) Per le derivate <strong>di</strong> p n (x), n = 0,1,2 si ha<br />

p ′ 0 (x) = 0<br />

p 1 ′ (x) = −5.2<br />

p 2 ′ (x) = 16x − 6<br />

La stima <strong>di</strong> f (0.6) e f ′ (0.6) è:<br />

n p n (0.6) p n ′ (0.6)<br />

0 1 0<br />

1 -2.12 -5.2<br />

2 0.28 3.6<br />

(d) I polimoni <strong>di</strong> Lagrange per ricavare il polinomio p 2 sono dati considerando i valori x 0 , x 1 e x 2 :<br />

(x − 0.1)(x − 0.8)<br />

L 0 (x) =<br />

(−0.1)(−0.8)<br />

L 1 (x) =<br />

L 2 (x) =<br />

x(x − 0.8)<br />

0.1(0.1 − 0.8) = x2 − 0.8x<br />

−0.07<br />

x(x − 0.1)<br />

0.8(0.8 − 0.1) = x2 − 0.1x<br />

0.56<br />

= x2 − 0.9x + 0.08<br />

0.08<br />

Il polinomio è:<br />

p 2 (x) = 1L 0 (x) + 0.48L 1 (x) + 1.32L 2 (x)<br />

= x2 − 0.9x + 0.08<br />

− 0.48 x2 − 0.8x<br />

+ 1.32 x2 − 0.1x<br />

0.08<br />

0.07<br />

0.56<br />

= 12.5(x 2 − 0.9x + 0.08) − 6.857142857(x 2 − 0.8x) + 2.357142857(x 2 − 0.1x)<br />

82

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

Saved successfully!

Ooh no, something went wrong!