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

MÉTODOS NUMÉRICOS

EVALUACIÓN Nº 01: RECUPERATIVO - EVALUATIVO


FACULTAD DE INGENIERÍA – ESCUELA PETRÓLEO Y QUÍMICA - LUZ

Maracaibo, 17-03-2018

Nombre: _____________________________________ C.I.: ______________ Sec. ______ No. ____

1. AJUSTE DE CURVAS. ANÁLISIS DE DATOS EXPERIMENTALES (7 ptos.)

Utilice regresión lineal múltiple para ajustar

x1 0 1 1 2 2 3 3 4 4
x2 0 1 2 1 2 1 2 1 2
y 15,1 17,9 12,7 25,6 20,5 35,1 29,7 45,4 40,2

Calcule los coeficientes, el error estándar de la estimación y el coeficiente de correlación.

2. RAÍCES DE POLINOMIOS - MÉTODOS CERRADOS (3 ptos.)

Determine las raíces reales de


f ( x ) = - 12 - 21� x 2 - 2, 75 �
x +18 � x3 :
a) Gráficamente
b) Empleando el método de la falsa posición con un valor e S correspondiente a tres cifras significativas para
determinar la raíz más pequeña.

3. RAÍCES DE POLINOMIOS - MÉTODOS CERRADOS (OPCIONAL)

2
Determine la raíz real de ln x = 0.7 :
a) Gráficamente.
b) Empleando tres iteraciones en el método de bisección con los valores iniciales xl = 0,5 y xu = 2 .
c) Usando tres iteraciones del método de la falsa posición, con los mismos valores iniciales de b).

4. INTERPOLACIÓN (10 ptos).

Dados los datos:


x 1,0 1,3 1,6 1,9 2,2
f(x) 0,7651977 0,6200860 0,4554022 0,2818186 0,1103623
a) Calcule f ( 1,5 ) con el uso de polinomios de interpolación de Newton de órdenes 1 a 4. Elija los puntos
base para obtener una buena exactitud. ¿Qué indican los resultados en relación con el orden del polinomio
que se emplea para generar los datos de la tabla?
b) Vuelva a realizar el inciso a) del problema 4 con el uso de polinomios de Lagrange de órdenes 1 a 4.
4. INTERPOLACIÓN (10 ptos).

Dados los datos:


x 1,0 1,3 1,6 1,9 2,2
f(x) 0,7651977 0,6200860 0,4554022 0,2818186 0,1103623
c) Calcule (f 1,5 ) con el uso de polinomios de interpolación de Newton de órdenes 1 a 4. Elija los puntos
base para obtener una buena exactitud. ¿Qué indican los resultados en relación con el orden del polinomio
que se emplea para generar los datos de la tabla?
d) Vuelva a realizar el inciso a) del problema 4 con el uso de polinomios de Lagrange de órdenes 1 a 4.

Solución:

a.1) Calcule f ( 1,5 ) con el uso de polinomios de interpolación de Newton de orden 1 (Interpolación lineal):
Se selecciona n+1 datos, es decir dos datos en x0 y x1 :
Opción Nº 1:
x0 = 1,3 f ( x0 ) = 0, 6200860
x1 = 1, 6 f ( x1) = 0, 4554022
f ( x1 ) - f ( x0 )
f1 ( x ) = f ( x0 ) +
x1 - x0
(
�x - x0 )
b0 = f ( x0 )
f ( x1 ) - f ( x0 )
b1 =
x1 - x0
f (1, 6) - f (1, 6)
f1 (1,5) = f (1,3) + ( 1,5 - 1,3 )

1, 6 - 1,3
0, 4554022 - 0, 6200860
f1 (1,5) = 0, 6200860 + ( 1,5 - 1,3 ) = 0,5102968

1, 6 - 1,3

a.2) Calcule f ( 1,5 ) con el uso de polinomios de interpolación de Newton de orden 2 (Interpolación cuadrática):

f ( x2 ) - f ( x1) f ( x1 ) - f ( x0 )
-
f ( x1 ) - f ( x0 ) x2 - x1 x1 - x0
f 2 ( x) = f ( x0 ) +
x1 - x0
(
�x - x0 + ) x2 - x0
( ) ( x - x1 )
�x - x0 �

b0 = f ( x0 )
f ( x1 ) - f ( x0 )
b1 =
x1 - x0
f ( x2 ) - f ( x1) f ( x1 ) - f ( x0 )
-
x2 - x1 x1 - x0
b2 =
x2 - x0
Se selecciona n+1 datos, es decir tres datos en x0 , x1 y x2 :
Opción Nº 1:
x0 = 1,3 f ( x0 ) = 0, 6200860
x1 = 1, 6 f ( x1 ) = 0, 4554022
x2 = 1,9 f ( x2 ) = 0, 2818186

b0 = f ( x0 ) = f (1,3) = 0, 6200860

f ( x1 ) - f ( x0 ) 0, 4554022 - 0, 6200860
b1 = = = -0,548946
x1 - x0 1, 6 - 1,3

f ( x2 ) - f ( x1) f ( x1) - f ( x0 ) 0, 2818186 - 0, 4554022 0, 4554022 - 0,6200860


- -
x2 - x1 x1 - x0 1,9 - 1, 6 1, 6 - 1,3
b2 = = = -0,0494433
x2 - x0 1,9 - 1,3

( ) (
( x - x1 )
f 2 (1,5) = 0,6200860 - 0, 548946 �x - x0 - 0, 0494433 �x - x0 � )
( 1,5 - 1,3) - 0, 0494433 �
f 2 (1,5) = 0, 6200860 - 0, 548946 � ( 1,5 - 1,3) �
( 1,5 - 1, 6 ) = 0,5112856

Opción Nº 2:
x0 = 1, 0 f ( x0 ) = 0, 7651977
x1 = 1,3 f ( x1 ) = 0, 6200860
x2 = 1, 6 f ( x2 ) = 0, 4554022

b0 = f ( x0 ) = f (1, 0) = 0, 7651977

f ( x1 ) - f ( x0 ) 0, 6200860 - 0, 7651977
b1 = = = -0,4837057
x1 - x0 1,3 - 1,0

f ( x2 ) - f ( x1 ) f ( x1 ) - f ( x0 ) 0, 4554022 - 0, 6200860 0, 6200860 - 0, 7651977


- -
x2 - x1 x1 - x0 1,6 - 1,3 1,3 - 1, 0
b2 = = = -0,10873388
x2 - x0 1, 6 - 1, 0

( ) (
( x - x1 )
f 2 (1,5) = 0, 7651977 - 0, 4837057 �x - x0 - 0,10873388 �x - x0 � )
( 1,5 - 1, 0 ) - 0,10873388 �
f 2 (1,5) = 0, 7651977 - 0, 4837057 � ( 1,5 - 1, 0 ) �
( 1,5 - 1,3)
f 2 (1,5) = 0,5124715
a.3) Calcule f ( 1,5 ) con el uso de polinomios de interpolación de Newton de orden 3 (Interpolación cúbica):

Se selecciona n+1 datos, es decir cuatros datos en x0 , x1 , x2 y x3 :

( ) ( ) ( )
( x - x1 ) + b3 �x - x0 �( x - x1 ) �( x - x2 )
f3 ( x) = b0 + b1 �x - x0 + b2 �x - x0 �

b0 = f ( x0 )
b1 = f �
x1, x0 �
� �
b2 = f �
�x2 , x1 , x0 �

b3 = f �
x3 , x2 , x1, x0 �
� �

Se formula el cálculo de b3 = f �
x3 , x2 , x1 , x0 �
� �, para la tercera diferencia dividida finita con:

f�
� �- f �
x3 , x2 , x1 � �x2 , x1, x0 �

f� �=
x3 , x2 , x1, x0 �
� x3 - x0

Previamente, se debe formular la segunda diferencia dividida finita para f �


x3 , x2 , x1 �
� �y f �
x2 , x1, x0 �
� �, como:

f�
� �- f �
x2 , x1 � �x1, x0 �
�y f� f�
� �- f �
x3 , x2 � x2 , x1 �
� �
f�
� �=
x2 , x1, x0 �
x2 - x0
x
�3 , x2 , x1

�=
x3 - x1
Por otra parte, se debe formular la primera diferencia dividida finita para f �
x1, x0 �
� �, f � �y f �
x2 , x1 �
� x3 , x2 �
� �,
como:

f ( x1 ) - f ( x0 )
f� �=
x1, x0 �
� x1 - x0
f ( x2 ) - f ( x1 )
f� �=
x2 , x1 �
� x2 - x1
f ( x3 ) - f ( x2 )
f� �=
x3 , x2 �
� x3 - x2

Por lo tanto, se establece los puntos a utilizarse en el diseño del polinomio de orden 3,

Opción Nº 1:
x0 = 1,3 f ( x0 ) = 0, 6200860
x1 = 1, 6 f ( x1 ) = 0, 4554022
x2 = 1,9 f ( x2 ) = 0, 2818186
x3 = 2, 2 f ( x3 ) = 0,1103623

Las primeras diferencias divididas del problema son [ecuación (18.12)]:


f ( x1 ) - f ( x0 ) 0, 4554022 - 0, 6200860
f� �=
x1, x0 �
� = f [ 1.6 , 1.3] = = -0,548946
x1 - x0 1, 6 - 1,3
f ( x2 ) - f ( x1) 0, 2818186 - 0, 4554022
f� �=
x2 , x1 �
� = f [ 1.9 , 1.6 ] = = -0,289306
x2 - x1 1,9 - 1,3
f ( x3 ) - f ( x2 ) 0,1103623 - 0, 2818186
f� �=
x3 , x2 �
� = f [ 2.2 , 1.9 ] = = -0,571521
x3 - x2 2, 2 - 1,9
Ahora, se procede a calcular la segunda diferencia dividida finita para f �
x2 , x1, x0 �
� �y f �
x3 , x2 , x1 �
� �, como:
f� �- f �
x2 , x1 �
� �x1 , x0 �

f� �=
x2 , x1, x0 �
� x2 - x0
f [ 1.9 , 1.6] - f [ 1.6 , 1.3] -0, 289306 + 0,548946
f [ 1.9 , 1.6 , 1.3] = = = -0,432733
1,9 - 1,3 1,9 - 1,3
f�
� �- f �
x3 , x2 � x2 , x1 �
� �
f� �=
x3 , x2 , x1 �
� x3 - x1
f [ 2.2 , 1.9] - f [ 1.9 , 1.6] -0,571521 + 0, 289306
f [ 2.2 , 1.9 ,1.6 ] = = = -0,47035833
2, 2 - 1, 6 2, 2 - 1, 6

Finalmente, la tercera diferencia dividida es [ecuación (18.14) con n = 3]:


f�
� �- f �
x3 , x2 , x1 � �x2 , x1, x0 �

f� �=
x3 , x2 , x1, x0 �
� x3 - x0

f [ 2.2 , 1.9 , 1.6] - f [ 1.9 , 1.6 , 1.3] -0, 47035833 + 0, 432733


f [ 2.2 , 1.9 , 1.6 , 1.3] = = = 1, 0034352
2, 2 - 1,3 2, 2 - 1,3

Los resultados de f ( x0 ) , f �
x1, x0 �
� �, f �
x2 , x1, x0 �
� �y f �
x3 , x2 , x1, x0 �
� �representan los coeficientes b0 , b1 , b2
y b3 de la ecuación (18.7), respectivamente; la ecuación (18.7) es

( x -1,3) - 0, 432733 �
f3 ( x) = 0, 6200860 - 0,548946 � ( x - 1,3 ) �
( x - 1, 6 )
( x - 1,3) �
+ 1, 0034352 � ( x - 1, 6 ) �
( x - 1,9 )

( 1,5 - 1,3 ) - 0, 432733 �


f3 (1,5) = 0, 6200860 - 0,548946 � ( 1,5 - 1,3) �
( 1,5 - 1, 6 )
( 1,5 - 1,3) �
+ 1, 0034352 � ( 1,5 - 1,6 ) �
( 1,5 - 1,9 )

f3 (1,5) = 0,52697894
Opción Nº 2:
x0 = 1, 0 f ( x0 ) = 0, 7651977
x1 = 1,3 f ( x1 ) = 0, 6200860
x2 = 1, 6 f ( x2 ) = 0, 4554022
x3 = 1,9 f ( x3 ) = 0, 2818186

Las primeras diferencias divididas del problema son [ecuación (18.12)]:


f ( x1 ) - f ( x0 )
f� �=
x1, x0 �
� x1 - x0
f (1,3) - f (1, 0) 0, 6200860 - 0, 7651977
f [ 1.3 , 1.0] = = = -0,48370566
1,3 - 1, 0 1,3 - 1, 0

f ( x2 ) - f ( x1 )
f� �=
x2 , x1 �
� x2 - x1
f (1, 6) - f (1,3) 0, 4554022 - 0, 6200860
f [ 1.6 , 1.3] = = = -0,548946
1, 6 - 1,3 1, 6 - 1,3

f ( x3 ) - f ( x2 )
f� �=
x3 , x2 �
� x3 - x2
f (1,9) - f (1, 6) 0, 2818186 - 0, 4554022
f [ 1.9 , 1.6] = = = -0,578612
1,9 - 1, 6 1,9 - 1, 6

Ahora, se procede a calcular la segunda diferencia dividida finita para f �


x2 , x1, x0 �
� �y f �
x3 , x2 , x1 �
� �, como:
f� �- f �
x2 , x1 �
� �x1, x0 �

f� �=
x2 , x1, x0 �
� x2 - x0
f [ 1.6 , 1.3] - f [ 1.3 , 1.0 ] -0,548946 + 0, 48370566
f [ 1.6 , 1.3 , 1.0 ] = = = -0,10873388
1, 6 - 1, 0 1,6 - 1,0

f�
� �- f �
x3 , x2 � x2 , x1 �
� �
f� �=
x3 , x2 , x1 �
� x3 - x1
f [ 1.9 , 1.6] - f [ 1.6 , 1.3] -0,578612 - 0,548946
f [ 1.9 ,1.6 , 1.3] = = = -0,0494433
1,9 - 1,3 1,9 - 1,3

Finalmente, la tercera diferencia dividida es [ecuación (18.14) con n = 3]:

f�
� �- f �
x3 , x2 , x1 � �x2 , x1, x0 �
�= -0, 0494433 + 0,10873388 = 0,0658784222
f�
� �=
x3 , x2 , x1, x0 �
x3 - x0 1,9 - 1, 0
Los resultados de f ( x0 ) , f �
x1, x0 �
� �, f �
x2 , x1, x0 �
� �y f �
x3 , x2 , x1, x0 �
� �representan los coeficientes b0 , b1 , b2
y b3 de la ecuación (18.7), respectivamente; la ecuación (18.7) es

( ) ( ) ( )
( x - x1 ) + b3 �x - x0 �( x - x1 ) �( x - x2 )
f3 ( x) = b0 + b1 �x - x0 + b2 �x - x0 �

( x - 1, 0 ) + 0,10873388 �
f3 ( x) = 0,7651977 - 0, 48370566 � ( x - 1, 0 ) �
( x - 1,3)
( x - 1, 0 ) �
+ 0,0658784222 � ( x - 1,3) �
( x - 1, 6 )

( 1,5 - 1, 0 ) + 0,10873388 �
f3 (1,5) = 0, 7651977 - 0, 48370566 � ( 1,5 - 1, 0 ) �
( 1,5 - 1,3)
( 1,5 - 1,0 ) �
+ 0,0658784222 � ( 1,5 - 1,3) �
( 1,5 - 1, 6 )

f3 (1,5) = 0,533559453778
a.4) Calcule f ( 1,5 ) con el uso de polinomios de interpolación de Newton de orden 4 (Interpolación de 4to Orden):

Se selecciona n+1 datos, es decir cinco datos en x0 , x1 , x2 , x3 y x4 :

( ) ( ) ( )
( x - x1 ) + b3 �x - x0 �( x - x1 ) �( x - x2 )
f 4 ( x) = b0 + b1 �x - x0 + b2 �x - x0 �

( x - x0 ) �( x - x1 ) �( x
b4 � (x
- x2 ) � - x3 )
b0 = f ( x0 )
b1 = f �
x1, x0 �
� �
b2 = f �
�x2 , x1 , x0 �

b3 = f �
x3 , x2 , x1, x0 �
� �
b4 = f �
�x4 , x3 , x2 , x1, x0 �

Se formula el cálculo de b4 = f �
x4 , x3 , x2 , x1, x0 �
� �, para la cuarta diferencia dividida finita con:

b4 = f �
f�
� �- f �
x4 , x3 , x2 , x1 � �x3 , x2 , x1, x0 �

� �=
x4 , x3 , x2 , x1, x0 �
x4 - x0

Previamente, se debe formular las terceras diferencias divididas finitas para b3 = f �


x3 , x2 , x1, x0 �
� �y
f�
x4 , x3 , x2 , x1 �
� �, con:

f�
� �- f �
x3 , x2 , x1 � �x2 , x1, x0 �

f� �=
x3 , x2 , x1, x0 �
� x3 - x0
f�
� �- f �
x4 , x3 , x2 � x3 , x2 , x1 �
� �
f� �=
x4 , x3 , x2 , x1 �
� x4 - x1

Previamente, se debe formular la segunda diferencia dividida finita para f �


x4 , x3 , x2 �
� �, f �
x3 , x2 , x1 �
� �y
f�
x2 , x1, x0 �
� �, con:

f� �- f �
x2 , x1 �
� �x1, x0 �

f� �=
x2 , x1, x0 �
� x2 - x0
f�
� �- f �
x3 , x2 � x2 , x1 �
� �
f� �=
x3 , x2 , x1 �
� x3 - x1
f�
� �- f �
x4 , x3 � �x3 , x2 �

f� �=
x4 , x3 , x2 �
� x4 - x2

Por otra parte, se debe formular la primera diferencia dividida finita para f �
x1, x0 �
� �, f � �, f �
x2 , x1 �
� x3 , x2 �
� �, y
f�
x4 , x3 �
� �, con:

f ( x1 ) - f ( x0 )
f� �=
x1, x0 �
� x1 - x0
f ( x2 ) - f ( x1 )
f� �=
x2 , x1 �
� x2 - x1
f ( x3 ) - f ( x2 )
f� �=
x3 , x2 �
� x3 - x2
f ( x4 ) - f ( x3 )
f� �=
x4 , x3 �
� x4 - x3

Tabla Nº 01. Representación gráfica de la naturaleza recursiva de las diferencias divididas finitas
i xi f ( xi ) Primero Segundo Tercero Cuarto
0 x0 f ( x0 ) f�
x1, x0 �
� � f�
x2 , x1, x0 �
� � f�
x3 , x2 , x1, x0 �
� � f�
x4 , x3 , x2 , x1 , x0 �
� �
1 x1 f ( x1 ) f�
x2 , x1 �
� � f�
�x3 , x2 , x1 �
� f�
x4 , x3 , x2 , x1 �
� �
2 x2 f ( x2 ) f�
x3 , x2 �
� � f�
x4 , x3 , x2 �
� �
3 x3 f ( x3 ) f�
x4 , x3 �
� �
4 x4 f ( x4 )

Por lo tanto, se establece los puntos a utilizarse en el diseño del polinomio de orden 4,

Opción Nº 1:
x0 = 1 f ( x0 ) = 3
x1 = 2 f ( x1 ) = 6
x2 = 3 f ( x2 ) = 19
x3 = 5 f ( x3 ) = 99
x4 = 7 f ( x4 ) = 291

Tomando como referencia Tabla Nº 01. Representación gráfica de la naturaleza recursiva de las diferencias divididas
finitas, se tiene:
 Inicio de formulación de las primeras diferencias divididas finitas para f�
x1, x0 �
� �, f �
x2 , x1 �
� �,
f�
x3 , x2 �
� �, y f �
x4 , x3 �
� �, con:

f ( x1 ) - f ( x0 ) 6-3
f� �=
x1, x0 �
� x1 - x0
=
2 -1
=3

f ( x2 ) - f ( x1 ) 19 - 6
f� �=
x2 , x1 �
� x2 - x1
=
3- 2
= 13

f ( x3 ) - f ( x2 ) 99 - 19
f� �=
x3 , x2 �
� x3 - x2
=
5-3
= 40

f ( x4 ) - f ( x3 ) 291 - 99
f� �=
x4 , x3 �
� x4 - x3
=
7-5
= 96
Seguidamente, se debe formular las segundas diferencias divididas finitas para f �
x4 , x3 , x2 �
� �, f �
x3 , x2 , x1 �
� �y
f�
x2 , x1, x0 �
� �, con:

f� �- f �
x2 , x1 �
� �x1 , x0 �
�= 13 - 3 = 5
f�
� �=
x2 , x1, x0 �
x2 - x0 3 -1
f�
� �- f �
x3 , x2 � x2 , x1 �
� �= 40 - 13 = 9
f�
� �=
x3 , x2 , x1 �
x3 - x1 5-2
f�
� �- f �
x4 , x3 � �x3 , x2 �
�= 96 - 40 = 14
f�
� �=
x4 , x3 , x2 �
x4 - x2 7-3

Posteriormente, se debe formular las terceras diferencias divididas finitas para b3 = f �


x3 , x2 , x1 , x0 �
� �y
f�
x4 , x3 , x2 , x1 �
� �, con:

f�
� �- f �
x3 , x2 , x1 � �x2 , x1, x0 �
�= 9 - 5 = 1
f�
� �=
x3 , x2 , x1, x0 �
x3 - x0 5 -1
f�
� �- f �
x4 , x3 , x2 � x3 , x2 , x1 �
� �= 14 - 9 = 1
f�
� �=
x4 , x3 , x2 , x1 �
x4 - x1 7-2

Finalmente, se formula el cálculo de b4 = f �


x4 , x3 , x2 , x1, x0 �
� �, para la cuarta diferencia dividida finita con:

b4 = f �
f�
� �- f �
x4 , x3 , x2 , x1 � �x3 , x2 , x1, x0 �
�= 1 - 1 = 0
� �=
x4 , x3 , x2 , x1, x0 �
x4 - x0 7 -1
x0 = 1 f ( x0 ) = 3
x1 = 2 f ( x1 ) = 6
x2 = 3 f ( x2 ) = 19
x3 = 5 f ( x3 ) = 99
x4 = 7 f ( x4 ) = 291

( ) ( ) ( )
( x - x1 ) + b3 �x - x0 �( x - x1 ) �( x - x2 )
f 4 ( x) = b0 + b1 �x - x0 + b2 �x - x0 �

( x - x0 ) �( x - x1 ) �( x
b4 � (x
- x2 ) � - x3 )
( 4 -1) + 5 �
f 4 (4) = 3 + 3 � ( 4 - 1) �
( 4 - 2 ) + 1�
( 4 - 1) �
( 4 - 2) �
( 4 - 3) + 0 �
( 4 - 1) �
( 4 - 2) �
( 4 - 3) �
( 4 - 5)

( 4 - 1) + 5 �
f 4 (4) = 3 + 3 � ( 4 - 1) �
( 4 - 2 ) + 1�
( 4 - 1) �
( 4 - 2) �
( 4 - 3) = 48
a) Vuelva a realizar el inciso a) del problema 3 con el uso de polinomios de Lagrange de órdenes 1 a 3

Parte b.1) Polinomios de Lagrange de orden 1

n 1

=‫=׮‬
f n ( x) � Li ( x) f ( xi )
i =0
f1( x) �
i =0
Li ( x) f ( xi )

f1 ( x ) = L0 ( x ) �f ( x0 ) + L1 ( x ) �f ( x1)

n x -x 1 x -x
j j
L
Donde: i ( x ) = �
j =0 xi - x j
� Li ( x ) = �
j =0 xi - x j
j �i j �i

n x -x n x -x
j j
Li ( x ) = � Li ( x) = �
j = 0 xi - x j j = 0 xi - x j
j �i j �i
1 x -x x - x1 1 x -x x - x0
j j
L0 ( x ) = � = Li =1 ( x) = � =
j =0 xi - x j x0 - x1 j =0 xi - x j x1 - x0
j �i j �i

Ahora, se tiene
x - x1 x - x0
f1 ( x ) = �f ( x0 ) + �f ( x1)
x0 - x1 x1 - x0

Seguidamente, se sustituye los valores respectivos según los puntos de datos seleccionados:

x0 = 3 f ( x0 ) = 19
Opción Nº 01:
x1 = 5 f ( x1 ) = 99

4-5 4-3 4-5 4-3


f1 (4) = �f (3) + �f (5) = �19 + �99 = 59
3-5 5-3 3-5 5-3

Parte b.2) Polinomios de Lagrange de orden 2

n 2

=‫=׮‬
f n ( x) � Li ( x) f ( xi )
i =0
f 2 ( x) �
i =0
Li ( x) f ( xi )

f 2 ( x) = L0 ( x) �f ( x0 ) + L1 ( x) �f ( x1 ) + L2 ( x) �f ( x2 )

n x -x n= 2 x - x
j j
L
Donde: i ( x ) = �
j =0 xi - x j
� Li ( x ) = �
j =0 xi - x j
j �i j �i
n x -x n x -x
j j
Li ( x) = � Li ( x) = �
j = 0 xi - x j j =0 xi - x j
j �i j �i
n=2 x - x x - x1 x - x2 n=2 x - x x - x0 x - x2
j j
Li =0 ( x) = � = � Li =1 ( x) = � = �
j = 0 xi - x j x0 - x1 x0 - x2 j = 0 xi - x j x1 - x0 x1 - x2
j �i j �i

n x -x
j
Li ( x) = �
j = 0 xi - x j
j �i
n=2 x - x x - x0 x - x1
j
Li =2 ( x) = � = �
j =0 xi - x j x2 - x0 x2 - x1
j �i

Ahora, se tiene
x - x1 x - x2 x - x0 x - x2 x - x0 x - x1
f 2 ( x) = � �f ( x0 ) + � �f ( x1) + � �f ( x2 )
x0 - x1 x0 - x2 x1 - x0 x1 - x2 x2 - x0 x2 - x1

Seguidamente, se sustituye los valores respectivos según los puntos de datos seleccionados:

x0 = 3 f ( x0 ) = 19
Opción Nº 01: x1 = 5 f ( x1 ) = 99
x2 = 7 f ( x2 ) = 291

4-5 4-7 4-3 4-7 4-3 4-5


f 2 (4) = � �f (3) + � �f (5) + � �f (7)
3-5 3-7 5-3 5-7 7 -3 7 -5

4-5 4-7 4-3 4-7 4-3 4-5


f 2 (4) = � �19 + � �99 + � �291 = 45
3-5 3-7 5-3 5-7 7 -3 7-5

x0 = 2 f ( x0 ) = 6
Opción Nº 02: x1 = 3 f ( x1 ) = 19
x2 = 5 f ( x2 ) = 99
x - x1 x - x2 x - x0 x - x2 x - x0 x - x1
f 2 ( x) = � �f ( x0 ) + � �f ( x1 ) + � �f ( x2 )
x0 - x1 x0 - x2 x1 - x0 x1 - x2 x2 - x0 x2 - x1
4-3 4-5 4-2 4-5 4-2 4-3
f 2 (4) = � �f (2) + � �f (3) + � �f (5)
2-3 2-5 3-2 3-5 5-2 5-3

4-3 4-5 4-2 4-5 4-2 4-3


f 2 (4) = � �6 + � �19 + � �99 = 50
2-3 2-5 3- 2 3-5 5-2 5-3
Parte b.3) Polinomios de Lagrange de orden 3

n 3

=‫=׮‬
f n ( x) � Li ( x) f ( xi )
i =0
f3 ( x) �
i =0
Li ( x) f ( xi )

f3 ( x) = L0 ( x) �f ( x0 ) + L1( x) �f ( x1) + L2 ( x) �f ( x2 ) + L3 ( x) �f ( x3 )

n x -x n =3 x - x
j j
L
Donde: i ( x ) = �
j =0 xi - x j
� Li ( x ) = �
j =0 xi - x j
j �i j �i

n x - xj
Li ( x ) = �
j = 0 xi - x j
j �i
n =3 x - x x - x1 x - x2 x - x3
j
Li =0 ( x) = � =
j =0 xi - x j x0 - x1 x0 - x2 x0 - x3
j �i

n x -x
j
Li ( x) = �
j = 0 xi - x j
j �i
n =3 x - x x - x0 x - x2 x - x3
j
Li =1 ( x) = � =
j =0 xi - x j x1 - x0 x1 - x2 x1 - x3
j �i

n x -x
j
Li ( x ) = �
j =0 xi - x j
j �i
n =3 x - x x - x0 x - x1 x - x3
j
Li =2 ( x ) = � =
j =0 xi - x j x2 - x0 x2 - x1 x2 - x3
j �i

n x -x
j
Li ( x ) = �
j =0 xi - x j
j �i
n =3 x - x x - x0 x - x1 x - x2
j
Li =3 ( x) = � =
j =0 xi - x j x3 - x0 x3 - x1 x3 - x2
j �i

Ahora, se tiene

f3 ( x ) =
( x - x1 ) ( x - x2 ) ( x - x3 ) �f ( x ) + ( x - x0 ) ( x - x2 ) ( x - x3 ) �f ( x )
( x0 - x1 ) ( x0 - x2 ) ( x0 - x3 ) 0
( x1 - x0 ) ( x1 - x2 ) ( x1 - x3 ) 1
+
( x - x0 ) ( x - x1 ) ( x - x3 ) �f ( x ) + ( x - x0 ) ( x - x1 ) ( x - x2 ) �f ( x )
( x2 - x0 ) ( x2 - x1 ) ( x2 - x3 ) 2
( x3 - x0 ) ( x3 - x1 ) ( x3 - x2 ) 3
Seguidamente, se sustituye los valores respectivos según los puntos de datos seleccionados:

x0 = 3 f ( x0 ) = 19
x1 = 5 f ( x1 ) =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