Вы находитесь на странице: 1из 17

INTERPOLACION

A. Interpolacin de Lagrange
1.Calcula el polinomio de Lagrange para los siguientes datos :
X

Nmero de datos=3, n=2, X < X < X

El polinomiointerpolador de Lagrange tiene la forma :


i=2

P(X )=

Li( x) f ( Xi)
i=0

En forma equivalente :
P (X )=L ( X )f ( x )+ L( X )f (X )+ L ( X )f ( X )

J= 2
L (X )=

(xxj)/( x xj)=( x )/(2)(x 1)/(3)=(X 2X )/6

j=0( j 0)

J= 2
L ( X )=

(xxj)/(x xj)=( x+2)/(2)(x1)/(1)=(X 2X +2)/ 2


j=0( j 1)

J= 2
L (X )=

(xxj)/(x xj)=(x)/(3)(x +2)=( X 2+2 X )/3

j=0( j 2)

P ( X )=

( 32 ) X 2+( 7 /3 ) X 1

2.Calcula el polinomio de Lagrange para los siguientes datos :

Nmero de datos=4, n=3, X < X < X < X


El polinomiointerpolador de Lagrange tiene la forma :

3
P (X )=

Li( x) f ( Xi)

i=0
En forma equivalente :

P(X )=L ( X )f (x )+ L( X )f (X )+ L ( X )f ( X )+ L ( X ) f (X )
3

L (X )=

(xxj)/( x xj)=( x )/(1)(x2)/(3)(x3)(4 )=( X 35 X 2+6 x )/12


j=0( j 0)

L ( X )=

(xxj)/(x xj)=( x+1)(x2)/(2)( x3)/(3)=( X 34 X 2+ X 6)/6

j=0( j 1)

L (X )=

(xxj)/(x xj)=[(x+ 1)/3] [x /2][( x3)/1]=(X 32 X 23 x)/6


j=0( j 2)

3
L (X )=

(xxj)/(x xj)=[(x+1)/1][ x /3 ][( x2)/0]=Indeterminado

j=0( j 3)

No se puede resolver por Lagrange ya que

L (X )=indetermidado

3.Calcula el polinomio de Lagrange para los siguientes datos :

50

16

10

Nmero de datos=4, n=3, X < X < X < X


El polinomiointerpolador de Lagrange tiene la forma :

3
P (X )=

Li( x) f ( Xi)

i=0

En forma equivalente :
P (X )=L ( X )f (x )+ L( X )f (X )+ L ( X )f ( X )+ L ( X ) f (X )

J =3
L (X )=

(xxj)/(x xj)=(x + 4)/(2)( x +3)/(3)(x2)/(8)=( X 3+5 X 22 x24)/48

j=0( j 0)

J =3

L ( X )=

(xxj)/(x xj)=( x+6)/(2)(x +3)/(1)/( x2)/(6)=(X 3+7 X 236)/12


j=0( j 1)

J =3
L (X )=

[(x +2)/5 ]=( X 3+ 8 X 2+ 4 x+ 48)/15


( xxj)/(x xj)=[( x+ 6)/3 ]
j=0( j 2)

J =3
L (X )= (xxj)/(x xj)=[(x+ 6)/4][( x+ 4)/2][( x +3)/1]=( X 3+13 X 2+54 x+72)/240

j=0( j 3)
P ( X )=2 X 2+3 X + 4
Interpolando en X =1
P( X )=1

4. Calcula el polinomio de Lagrange para los siguientes datos:

196

84

26

Nmero de datos=4, n=3, X < X < X < X


El polinomiointerpolador de Lagrange tiene la forma :

3
P (X )=

Li( x) f ( Xi)

i=0
En forma equivalente :

P(X )=L ( X )f (x )+ L( X )f (X )+ L ( X )f ( X )+ L ( X ) f (X )
J =3

L (X )=

(xxj)/(x xj)=(x +3)/(1)( x)/(4 )( x2)/(6)=( X 3+ X 26 x )/24


j=0( j 0)

J= 3
L ( X )=

(xxj)/(x xj)=( x+ 4)/(3)( x)/(5)/(x 2)=( X 3+2 X 28 X )/15

j=0( j 1)

J= 3
L (X )=

(xxj)/(x xj)=[( x+ 4)/ 4][( x+3)/3][( x+2)/2]=(X 3+ 5 X 22 x24 )/24


j=0( j 2)

J =3

(xxj)/(x xj)=[(x+ 4)/6][(x+ 3) /2][(x )/2]=( X 3+7 X 2+12 x)/60

L (X )=

j=0( j 3)

P3 ( X )=3 X 3+ X
Interpolando en X =1

P( X )=4

4. Interpolar la funcion f ( x ) =e x sen ( x )x1


en los puntos xi=1+ (i 1 ) 2, i=1, ,5 , usando el polinomio

interpolador de Lagrange.
X

1/2

0.3095598757

0.7907862882

1/2

0.7095609168

0.2873552
872

Nmero de datos=5, n=4, X < X < X < X < X

El polinomiointerpolador de Lagrange tiene la forma :


3

P(X )=

Li( x) f ( Xi)
i=0

En forma equivalente :

P (X )=L ( X )f (x )+ L( X )f ( X )+ L ( X )f ( X )+ L ( X ) f (X ) + L ( X )f ( X )

J =5
L ( X )=

(xxj)/(x xj)=(x +1/2)( x1/2)( x )( x1)/(3/8)=2( X 4X 3X


j=1( j 1)

J= 4
L (X )=

3
x
X 4X X 2+
( xxj )
1
2
2
=( x +4 )( x ) x ( x1 )=3
2
8
( xixj )

( )

j=1( j 2)

J =4
L (X )=
(xxj)
=
( xixj)

( 12 )( x ) ( x 1 ) =8 ( X 4+ X 3 X 2X / 2)/ 3

( x+1 )( x) x +
3
2

j=1( j 3)

J =4

L (X )=
(xxj)
=
( xixj)
j=1( j 4)

( 12 ) ( x )( x1) =8( X 3+ X 21/2)/3

( x+1 ) x+

3
2

2
+ X / 4)/3
4

3
P ( X )=3 X 3+ X

Interpolando en X =1
P( X )=4

B . Interpolacin de Newton
8. Obtener el polinomio de interpolacin usando la formulade interpolacin de

Newtonen diferencias divididas con losdatos de la tabla que aparece a continuacin ;

0.3

0.4

0.7

Tabla de diferencias divididas


i

Xi

0 0

F( Xi) Primera Diferencias Divididas

1 0.3 0.4

2 2

2
3/ 17

0.7

El polinomio de interpolacin de Newton es :

Segunda Diferencias Divididas

37/34

P (X )=F [ X ] f [ X , X ]( X X )+ F[ X , X , X ](X X )( X X )

P (X )=1+(2)( X)+(37/34)( X )( X0.3)=(37/34) X 2(791 /340) X +1

C . Splines Lineales

10.Calcules las funciones con Splin es lineales para los siguientes datos:
X

Tabla de diferencias divididas

Xi

F( Xi)

Primera Diferencias Divididas

F[X,X]

F[X,X]

F[X,X]

F(X) = 0+2(X-2),

X E [2,3]

2+1(X-3), X E [3,4]
3+2(X-4), X E [4,5]
11. Calculeslas funciones con Splines lineales para los siguientes datos:

Tabla de diferencias divididas

Xi

F( Xi)

Primera Diferencias Divididas

1
3

F[X,X
]

-5

-2

F[X,X
]
F[X,X
]
F[X,X
]

F(X) = 0+ (1/3) (X+1),

X E [-1,2]

1+2(X-2),

X E [2,3]

3-5(X-3),

X E [3,4]

-2+4(X-4),

X E [4,5]

12. Aproximar el valor de ln9.2 utilizando interpolacin con Splines


Lineales
X

9.5

11

2.1972

2.2513

2.3979

Tabla de diferencias divididas

Xi

F( Xi)

Primera Diferencias Divididas

2.1972

541/5000

F[X,X]

9.5

2.2513

11

2.3979

733/7500

F(X) = 2.1972+ (541/5000)(X-9),

F[X,X]

X E [9,9.5]

2.2513+ ( 733/7500 (X-9.5),

X E [9.5, 11]

Hallando ln9.2 = 2.22198

13

Interpolar con Splines Cuadrticos los siguientes puntos.


X
y

-2
-1

0
0

2
-3

3.5
1

a1 x 2 +b1 x+ c 1 , x [2,0]
S ( x ) = a2 x 2 +b2 x+ c 2 , x [0,2]
a3 x 2 +b3 x+ c 3 , x [2,3.5]
Si x=2 S (2 ) =4 a12 b1 +c 1=1(1)

{
{

Si x=0 S ( 0 )= 0 a1 +0 b1 + c1=0(2)
0 a2 +0 b2 +c 2=0(3)
Si x=2 S ( 2 )= 4 a2 +2 b2 +c 2=3 ( 4 )
4 a3 +2 b3 + c3 =3 ( 5 )
Si x=3.5 S ( 3.5 )=12.25 a3+ 3.5 b3 +c 3=1(6)

2a 1 x +b1
S (x) 2a 2 x +b1
2a 3 x +b1
Si x=0 S ( 0 )=0 a1 +b 1=0 a2 +b 2(7)
Si x=2 S ( 2 )=4 a2 +b 1=4 a3 +b3 ( 8)

Tomamos como valor


ecuaciones:

a1=0.

con eso tenemos las siguientes

2 b 1+ c1=1
c 1=0
c 2=0
4 a2 +2 b2 +c 2=3
4 a3 +2 b3 +c 3=3
12.25 a3 +3.5 b3 +c 3=1
b1=b2
4 a2 +b2=4 a 3+ b3

a1=0

b1=

a2=1
a3 =

1
2

c 1=0
c 2=0

1
b2=
2

37
9

b3 =

c 3=

359
18

184
9

1.
14

Calcule las funciones con Splines cuadrticos para los siguientes


datos.

2.
7.
12.
13.

X
y

3.
8.

0
0

4.
9.

a1 x 2 +b1 x+ c 1 , x [0,1]
S ( x ) = a2 x 2 +b2 x+ c 2 , x [1,2]
a3 x 2 +b3 x+ c 3 , x [2,3]

14.
15.

Si x=0
S ( 0 )=0 a1 +0 b 1+ c1 =0(1)

16.

Si x=1
S ( 1 )= a1 +b 1+ c1 =2(2)
a2 +b 2+ c2 =2(3)

1
2

5.
10.

2
4

6.
11.

3
3

17.
18.

Si x=2
S ( 2 )=

4 a2 +2 b2 +c 2=4 ( 4 )
4 a3 +2 b3 + c3 =4 ( 5 )

Si x=3
S ( 3 ) =9 a3 +3 b3 + c3 =3(6)

19.

20.

2a 1 x +b1
S (x) 2a 2 x +b1
2a 3 x +b1

21.

Si x=1
S ( 1 )=2 a1 +b1 =2 a2+ b2 (7)

22.

Si x=2
S ( 2 )=4 a2 +b 2=4 a3 +b3 ( 8)

23.

a1=0.

Tomamos como valor

con eso tenemos las

siguientes ecuaciones:
24.

c 1=0

25.

b1 +c 1=2

26.

a2 +b 2+ c2 =2

27.

4 a2 +2 b2 +c 2=4

28.

4 a3 +2 b3 +c 3=4

29.

9 a3 +3 b 3+ c3 =3

30.

b1=2a 2+ b2

31.

4 a2 +b2=4 a 3+ b3

32.
33.

a1=0

36.

b1=2

39.

c 1=0

34.

a2=0

37.

b2=2

40.

c 2=0

35.

a3 =3

38.

b3 =14

41.

c 3=12

15
16
17 Calcule las funciones con Splines cuadrticos para los siguientes
datos.
18

19

-2

20

21

22

23

24

25

26

-2

27

-3

28

a1 x 2 +b1 x+ c1 , x [2,1]
S ( x ) = a x 2+ b x +c , x [1,3]
2
2
2
29
a3 x2 +b 3 x +c 3 , x [3,4]

30
S (2 ) =2 a1 +(2) b1 +c 1=0 (1)
31 Si x=2

{
{

Si x=1
S ( 1 )= a1 +b 1+ c1 =1(2)
32
a2 +b 2+ c2 =1(3)
Si x=3
S ( 3 ) = 9 a2+ 3 b2 +c 2=2 ( 4 )
33
9 a3 +3 b3 +c 3=2 ( 5 )
S ( 4 )=16 a3+ 4 b 3+ c 3=3(6)
34 Si x=4

35

2a 1 x +b1
S (x) 2a 2 x +b1
36
2a 3 x +b1
S ( 1 )=2 a1 +b1 =2 a2+ b2 (7)
37 Si x=1
S ( 3 ) =6 a2 +b2 =6 a3 +b 3( 8)
38 Si x=3

39 Tomamos como valor


ecuaciones:

40 2 b 1+ c1=0
41 b1 +c 1=1

42 a2 +b 2+ c2 =1
43 9 a2 +3 b2 + c2=2
44 9 a3 +3 b 3+ c3 =2
45 16 a3 + 4 b3 +c 3=3
46 b1=2a 2+ b2
47 6 a2 +b 2=6 a3 +b 3
48

a1=0.

con eso tenemos las siguientes

49 a1=0

52

55

b1=0.33333333333

50
a2=0.96666666666

c 1=0.66666666666

56 c 2=0.25

53
b2=2.16666666666

51
a3 =2.33333333333

57 c 3=29

54
b3 =17.3333333333

58
59 Interpolar con Splines cuadrticos los siguientes puntos y
aproximar el valor en x=2.5.
60
65

X
y

61
66

-1
0

62
67

0
-1

63
68

3
-4

64
69

70

a1 x 2 +b1 x+ c1 , x [1,0 ]
S ( x ) = a2 x 2+ b2 x +c 2 , x [0,3]
71
a3 x 2+b 3 x +c 3 , x [3,4]

72
S (1 )=(12)a1 +(1)b 1+ c 1=0(1)
73 Si x=1

{
{

Si x=0
S ( 0 )= 0 a1 +0 b1 + c1=1(2)
74
0 a2 +0 b2 +c 2=1(3)

75

Si x=3
S (3)=

9 a2+ 3 b2 +c 2=4 ( 4 )
9 a3 +3 b3 + c3 =4 ( 5 )

S ( 4 )=16 a3+ 4 b 3+ c 3=0(6)


76 Si x=4

77

2a 1 x +b1
S (x) 2a 2 x +b1
78
2a 3 x +b1

S ( 0 )=2(0) a1 +b1=2(0)a2+ b2 (7)


79 Si x=0
S ( 3 ) =6 a2 +b2 =6 a3 +b 3( 8)
80 Si x=3

81 Tomamos como valor


ecuaciones:

a1=0.

con eso tenemos las siguientes

4
0

82 b1+ c 1=0
83 c 1=1
84 c 2=1
85 9 a2 +3 b2 + c2=4
86 9 a3 +3 b 3+ c3 =4
87 16 a3 + 4 b3 +c 3=0
88 b1=b2
89 6 a2 +b 2=6 a3 +b 3
90
91

a1=0

92

a2=0

93

a3 =5

94

b1=1

95

b2=1

96

b3 =31

97

c 1=1

98

c 2=1

99

100

c 3=29

Вам также может понравиться