Sunteți pe pagina 1din 12

FORMULARIO DE METODOS NUMERICOS

REGRESION POR MNIMOS CUADRADOS

Media aritmtica

y =
x =

yi
n

xi
n

Desviacin estndar:

S y=

St
n1
2

S t = ( y i y )

Varianza:

S y 2=

( y i y )2

Coeficiente de variacin:

c . v=
Regresin lineal

y=ao +a1 x+ e
n

S r = ( y i , medida yi , modelo ) = ( y ia oa 1 x i)
2

i=1

a1=

i=1

n x i yi x i y i
2

n x i2( x i )

ao = y a1 x

Error estndar de la estimacin

S y / x=

Sr
n2

Coeficiente de determinacin

r 2=

n1

S t S r
St

Coeficiente de correlacin:

Sy
100
y

r= r 2

r=

n x i y i( x i)( y i)

n x ( x ) n y ( y )
2

Regresin no lineales

y=a1 e x
1

y=a2 x

Regresin polinomial

y=ao +a1 x+ a2 x 2 +e
n

S r = ( y i ao a1 x ia2 x )

2 2

i=1

La ecuacin para formar la matriz queda de la siguiente manera:

( n ) ao + ( x i) a1+ ( x i2 ) a2= yi

( x i ) a o+ ( x i2) a1 + ( x i3 ) a2= xi y i

( x i2 ) ao + ( x i3) a1 +( x i4 ) a2= x i2 y i

Error estndar de la estimacin

S y / x=

Sr
n(m+1)

Regresin lineal mltiple

y=ao +a1 x1 + a2 x 2 +e
n

S r = ( y i ao a1 x ia2 x )

2 2

i=1

La ecuacin para formar la matriz queda de la siguiente manera:

n
x1 i
x2 i

x 1i x 2i
x1 i2 x 1 i x 2 i
x 1 i x 2 i x 2 i2

]{ } { }
a0
a1 =
a2

yi
x1 i yi
x 2 i yi

Error estndar de la estimacin

S y / x=

Sr
n(m+1)

Ecuaciones de potencias:

y=ao x 1a x2a . x m a
1

Ecuaciones de logaritmos:

logy=log ao +a 1 log x 1+ a2 log x 2 ++ am log xm

INTERPOLACIN
INTERPOLACIN POLINOMIAL DE NEWTON EN DIFERENCIAS DIVIDIDAS
Interpolacin lineal

f 1 ( x )=f ( x 0 ) +

f ( x 1 )f ( x 0 )
(xx 0)
x1x 0

Interpolacin cuadrtica

f 2 ( x )=b 0+ b1 ( x x0 ) + b2 ( xx 0 )( xx1 )
Donde:

b0 =f ( x 0 )

b1 =

f ( x 1 ) f ( x 0 )
x 1x 0

f ( x 2 )f ( x 1) f ( x 1 )f ( x 0 )

x2 x1
x 1x 0
b2 =
x 2x 0
Polinomios de interpolacin de Lagrange
n

f n ( x ) = Li ( x ) f ( x i )
i=0

Donde
n

Li ( x ) =
j=0
j i

xx j
x ix j

La versin lineal (n=1) es:

f 1 ( x )=

xx 1
xx 0
f ( x0 )+
f ( x1 )
x0 x1
x 1x 0

La versin de segundo grado es:

f 2 ( x )=

(xx 1)(x x2 )
( xx 0 )( xx 2)
(xx 0 )(xx 1)
f ( x0 )+
f ( x1 ) +
f ( x2 )
( x 0x 1)(x 0 x2 )
( x 1x 0 )( x 1x 2)
( x 2x 0 )(x 2x 1)

Coeficientes de un polinomio de interpolacin


2

f ( x )=a o +a1 x+ a2 x ++ an x

Se requiere de tres puntos:

f ( x 0 ) =a0 +a 1 x 0+ a2 x02

[ x 0 , f ( x 0) ]

[ x 1 , f ( x1 )]

[ x 2 , f ( x2 )]

f ( x 1 )=a0 +a1 x1 + a2 x 1

f ( x 2 )=a0 +a1 x 2+ a2 x 22
Interpolacin inversa
x
y

1
1

2
0.5

3
0.3333

4
0.25

5
0.2

6
0.1667

7
0.1429

Se transforma en:
f(x)
y

0.1429
7

0.1667
6

0.2
5

0.25
4

0.3333
3

0.5
2

1
1

INTERPOLACIN MEDIANTE TRAZADORES (SPLINES)


Trazadores lineales

m i=

f ( x i+1 )f ( x i )
x i+1+ xi

Trazadores cuadrticos

f i ( x )=a i x 2+ bi x+ ci
1. Los valores de la funcin de polinomios adyacentes deben ser
iguales en los nodos interiores. Con i=2, en total 2n-2
condiciones
2

ai1 x

i1

+bi1 xi1 +c i1=f ( x i1)

ai x 2i1 +bi x i1+ ci1=f ( x i1)


2. La primera y la ltima funcin deben pasar a travs de los
puntos extremos. En total tenemos 2n-2+2=2n condiciones

a1 x20 +b 1 x 0 +c 1=f ( x 0)
an x 2n+ bn x n + cn =f (x n )
3. Las primeras derivadas en los nodos interiores deben ser
iguales. De manera general la condicin se representa como:

2 ai1 x i1+ bi1=2 ai x i1 +b i

4. Suponga que en el primer punto la segunda derivada es cero.

a1=0

Trazadores cbicos

f i ( x )=a i x 3+ bi x2 +c i x+ d i

''

f i ( x )=

''

''

6
6
f ( x i+1 ) f ( x i ) ] +
f ( x i1) f ( x i ) ]
[
x i+ 1xi
xi xi1 [
''
( x ix i1 ) f ( x i1 ) +2

x i+1x i1 f ' ' ( x i )+ ( x i+1x i ) f ' ' ( x i+1 ) =

DIFERENCIACIN E INTEGRACIN NUMRICA


Frmulas de integracin de Newton-Cotes
b

I = f ( x ) dx f n ( x ) dx
a

Donde

f n( x )

es igual a un polinomio de la forma:

f n ( x )=a o +a1 x+ +an1 x n1 + an x n

Regla del trapecio


b

I = f ( x ) dx f 1 ( x ) dx
a

I =(ba)

f ( a ) + f (b)
2

f i ( xi1 )
f i ( xi )
f ( xi1 ) f i ( x i1 )( x ix i1 )
f ( xi )
(x ix )3+
( x xi1 )3+

xi x ) +
(
x ix i1
6
x ix i1
6 ( x ix i1 )
6 ( x ix i1 )

Error de la regla del tracio

Ea =

1
3
f ' ' ( )(ba)
12

f ' ' ( x)dx

''

f ( )=

ba

Regla del trapecio mltiple

h=

ba
n
n1

f ( x o ) +2 f ( x i ) + f ( x n )
i=1

I =(ba)

2n
Error
3

Ea =

( ba ) ' '
f ( )
12 n2
b

f ' ' ( x)dx

''

f ( )=

ba

REGLA DE SIMPSON
REGLA DE SIMPSON 1/3

h=

ba
2

I =(ba)

f ( x o ) +4 f ( x 1 ) +f ( x 2 )
6

Error
5

Et =

h (4) ( )
f
90

( ba )5 (4)
Ea =
f ( )
2880
b

f (4) (x )dx

f (4 ) ( )= a

ba

Regla de Simpson 1/3 mltiple

h=

ba
n
n1

f ( x o ) +4
I =(ba)

n1

i=1,3,5

f ( xi )+ 4

f ( x j ) +f ( x n )

j=2 , 4,6

3n

Error

Ea =

( ba )5 (4)
f ( )
180 n4

f (4) (x )dx

f (4 ) ( )= a

ba

Regla de Simpson 3/8

h=

ba
n

I =(ba)

f ( x o ) +3 f ( x1 )+3 f ( x 2 )+ f ( x 3 )
8

Error
5

Et =

3 h (4) ( )
f
80

( ba )5 (4)
Ea =
f ( )
6480
b

f (4) (x )dx

f (4 ) ( )= a

ba

Integracin con segmentos desiguales

I =h1

f ( x o ) +f ( x 1 )
f ( x1 )+ f ( x2 )
f ( x n1 ) + f ( x n )
+ h2
++h n
2
2
2

INTEGRACIN DE ECUACIONES
Extrapolacin de Richardson

4
1
I = I ( h2 ) I ( h 1 )
3
3
Cuadratura de Gauss

I =(ba)

f ( a ) + f (b)
2

DIFERENCIACIN NUMRICA
Diferencias divididas finitas hacia adelante:

Diferencias divididas finitas hacia atras:

Diferencias divididas finitas centradas:

Extrapolacin de Richardson:

4
1
D ( h2 ) D ( h1 )
3
3

D ( h1 ) y D ( h2 ) se resuelven con diferencias dividas centradas para mas exactitud

Derivadas de datos irregularmente espaciados


'

f ( x )=f ( x i1 )

2 xx ix i+1

( x i1x i ) ( xi 1 xi +1 )

+ f ( xi )

2 xx i1x i+1

( x ix i1) ( x ix i+1 )

+ f ( x i+1)

2 xx i1xi
(x i+1x i1)( x i+ 1xi )

S-ar putea să vă placă și