You are on page 1of 5

FAC.:DEINGENIERADOCENTE:ING.PASTORL.BARRNL.UNIV.:MARTINLAGUNAA.

Aproximacin polinominal con mnimos Cuadrados

i xi yi
1 x1 y1
y f x
2 x2 y2
La funcin pasa entre 3 x3 y3
los puntos
n xn yn

x1 x2 x3 x4 x5 x6 y a0 a1 x a2 x 2 ......... an x n

Sistemalineal:

ma0 a1 x1 a2 x 2 an x n x y 0

a0 x1 a1 x 2 a2 x 3 an x n 1 x y 1

a0 x 2 a1 x3 a2 x 4 an x n 2 x y
2


a0 x n a1 x n 1 a2 x n 2 an x n n x n
y

Formamatricial:

m 0 m m m
m 0
xi x x yi xi
1 2 n
i i x
i
i 1 i 1 i 1 i 1
i 1
m 1 m m m
a m

xi xi2 x xIn 1 yi xi1
0
3
i
a
i 1 i 1 i 1 i 1
1 i 1
m 2 m m m
* a m

xi xi3 x xin 2 2 yi xi2
4
i
i 1 i 1 i 1 i 1 i 1
an
m m m m m
xn nn n
x x
n 1 n2
xi yi xi
i 1
i
i 1
i
i 1
i
i 1
i 1

p x a0 x 0 a1 x1 a2 x 2 ............. an x n
4
Pgina

U.M.S.A./ING.:MECELMMEC130
FAC.: DE INGENIERA DOCENTE:ING. PASTOR L. BARRN L. UNIV. : MARTIN LAGUNA A.

Problema 1
En la tabla se muestra la variacin de la velocidad de una partcula
en funcin del tiempo. Ajustar la tabla por el mtodo de mnimos
cuadrado, construir todas las aproximaciones posibles y comparar
los resultados.
Calcular la distancia recorrida por la partcula entre 2s y 8s.
t s 0 3 5 9
v m s 20 3.64 2.35 1.38

Solucin: reordenando en forma matricial, se tendr por tanto para un polinomio de grado n

m 0 m m m
n m 0
xi xi1 xi2 x i yi * xi
i 1 i 1 i 1 i 1
i 1
m 1 m m m
m

xi xi2 x xin 1 a0 yi * xi1
3
i
i 1 i 1 i 1 i 1
a1 i 1
m 2 m m m
m
xi xi3 x xin 2 * a2 yi * xi2
4
i
i 1 i 1 i 1 i 1 i 1

an

m n m m m m
xi xin1 x yi * xi
n2
i xin n n

i 1 i 1 i 1 i 1 i 1

donde m es el nmero de puntos considerados.

Resumiendo en una tabla las sumatorias calculadas

Sustituyendo los valores de la tabla en la ecuacin anterior se obtiene el sistema matricial

4 17 115 881 a0 27.37


17 115
881 7267 a1 35.09
*
115 881 7267 62417 a2 203.29

881 7267 62417 547795 a3 1398.05

U.M.S.A. / ING. : MEC-ELM MEC-130 Pgina-1


FAC.: DE INGENIERA DOCENTE:ING. PASTOR L. BARRN L. UNIV. : MARTIN LAGUNA A.

El numero de coeficientes que se necesitan determinar depende del orden del polinomio que ajusta el
grupo de datos; esto se hace particionando la matriz. Por ejemplo para un polinomio de orden 1, se toma
una matriz de dos por dos para dar.

1
1
4 17 a0 27.37 a0 4 17 27.37 4 17 27.37 14.918
17 115 a 35.09 a 17 115 35.09
1 1 17 115 35.09 1.9

a0_1G
a1_1G ( 14.918 1.9 )

Por tanto el polinomio de orden 1 para ajustar el grupo de datos es:

p1( x) a0_1G a1_1G x 1.9 x 14.918

2 x 8
dx
Distancia recorridas en 2 y 8 segundos: v dx vdt x vdt x vdt m
dt x1 2

8
p ( x) dx 32.508
1

2

Para un polinomio de orden 2, se toma una matriz de tres por tres para dar.

1
4 17 115 a0 27.37 a0 4 17 115 27.37
17 115 881 * a 35.09 a 17 115 881 35.09
1 1
115 881 7267 a2 203.29 a2 115 881 7267 203.29

1
4 17 115 27.37 19.5

17 115 881 35.09 6.003

115 881 7267 203.29 0.447

a0_2G
a1_2G a2_2G ( 19.5 6.003 0.447 )

Por tanto el polinomio de orden 1 para ajustar el grupo de datos es:

2 2
p2( x) a0_2G a1_2G x a2_2G x 6.003 x 0.447 x 19.5

2 x 8
dx
Distancia recorridas en 2 y 8 segundos: v dx vdt x vdt x vdt m
dt x1 2

8
p ( x) dx 12.006
2

2

U.M.S.A. / ING. : MEC-ELM MEC-130 Pgina-2


FAC.: DE INGENIERA DOCENTE:ING. PASTOR L. BARRN L. UNIV. : MARTIN LAGUNA A.

Para un polinomio de orden 3, se toma una matriz de cuatro por cuatro para dar.

4 17 115 881 a0 27.37


17 115

881 7267 a1 35.09
*
115 881 7267 62417 a2 203.29

881 7267 62417 547795 a3 1398.05

2
a0_3G
a1_3G a2_3G a3_3G 20 9.8293 1.7568 9.9398 10

Por tanto el polinomio de orden 1 para ajustar el grupo de datos es:

2 3 3 2
p3( x) a0_3G a1_3G x a2_3G x a3_3G x 9.8293 x 0.099398 x 1.7568 x 20

2 x 8
dx
Distancia recorridas en 2 y 8 segundos: v dx vdt x vdt x vdt m
dt x1 2

8
p ( x) dx 18.877
3

2

Resumimos todos los polinomios en una tabla

Orden Polinomio Distancia Mtodo

8
1 p1 x 1.9 x 14.918 p x 32.508
1 Mnimos Cuadrados
2
8
2 p2 x 0.447 x 2 6.003 x 19.5 p x 12.006
2 Mnimos Cuadrados
2
8
3 p3 x 0.099398 x3 1.7568 x 2 9.8293x 20 p x 18.877
3 Mnimos Cuadrados
2
8
3 p3 x 0.099398 x 3 1.7568 x 2 9.8293 x 20 p x 18.885
3 Lagrange
2

U.M.S.A. / ING. : MEC-ELM MEC-130 Pgina-3


FAC.: DE INGENIERA DOCENTE:ING. PASTOR L. BARRN L. UNIV. : MARTIN LAGUNA A.

Graficamos la tabla de datos en circulos y los ajuste de grado 1, 2 y 3

20 0
3.64 3
v t
2.35 5
1.38 9

Grfica de la tabla de datos y todas sus funciones de ajuste


20
Variable dependiente p(x)

p1( x)
10
p2( x)

p3( x)

0 2 4 6 8
t x

Variable independiente x

U.M.S.A. / ING. : MEC-ELM MEC-130 Pgina-4

You might also like