Professional Documents
Culture Documents
COMPUTACIONAL
V0
Construcción de las Dif. Finitas
✤ Expansiones de Series de
Taylor
✤ Mediante el uso de
polinomios de orden -n
✤ Expansiones de Series de
Taylor
✤ Mediante el uso de
polinomios de orden -n
✤ En diferencias finitas:
✤ ojo, a veces … ✓ ◆ ✓ ◆
2 2
@ (x xi ) @
(x) = (xi ) + (x xi ) + +
@x
i 2! i @x2
3
✓ 3 ◆ n
✓ n ◆
(x xi ) @ (x xi ) @
3
+ .... + n
+H
3! @x i n! @x i
Diferencias Finitas - Serie de Taylor
✤ En cualquier caso, la
interpretación de la serie es:
✤ o agrupando términos…
@f f (x + x) f (x)
= + O( x)
@x x x
✓ ◆ ✓ 2
◆ 2
✓ 3
◆
@ i+1 i xi+1 xi @ (xi+1 xi ) @
= +H
@x i xi+1 xi 2 @x2 i 6 @x3 i
✓ ◆ ✓ 2
◆ 2
✓ 3
◆
@ i i 1 xi xi 1 @ (xi xi 1) @
= + +H
@x i xi xi 1 2 @x2 i 6 @x3 i
Diferencias Finitas - Serie de Taylor
@ i+1 i 1 2
= + O(( x) )
@x i 2 x
✤ El error de truncamiento siempre podrá expresarse como:
m m+1 n
✏⌧ = ( x) ↵m+1 + ( x) ↵m+2 + ... + ( x) ↵n+1
✤ Por lo que el término líder (primer término en esta sumatoria), será el
que determine la “rata” a la cual se reduce el error de truncamiento
@f (2 x)2 @ 2 f (2 x)3 @ 3 f
f (x + 2 x) = f (x) + (2 x) + 2
+ 3
+ ···
@x x 2! @x x 3! @x x
✤ ó
n n 1
pn (x) = an x + an 1x + · · · + a1 x + a0
f (x) = Ax2 + Bx + C
✤ Asuma que xi = 0
✤ Entonces…
fi = C
fi+1 = A( x)2 + B( x) + C
2
fi+2 = A(2 x) + B(2 x) + C
Diferencias Finitas - Polinomios
✤ De esta forma es posible ver que
fi+2 2fi+1 + fi
A=
2( x2 )
C = fi
Diferencias Finitas - Polinomios
✤ De esta forma es posible ver que
✤ y en x=0
Diferencias Finitas - Polinomios
✤ Es posible también construir los esquemas para mallas NO-uniformes
2
f (x) = Ax + Bx + C
✤ Asuma que
xi = 0
xi+1 = xi + xi+1
xi+2 = xi + xi+1 + xi+2
= xi+1 + xi+2
✤ y definamos una relación de expansión: xi+2
re =
xi+1
Diferencias Finitas - Polinomios
✤ De esta forma, es posible obtener:
@2f fi+2 (1 + re )fi+1 + re fi
2
=2
@x re (1 + re )( xi+1 )2
(x x1 )(x x2 ) · · · (x xn )
f (x) = f (x0 )
(x0 x1 )(x0 x2 ) · · · (x0 xn )
(x x0 )(x x2 ) · · · (x xn )
+ f (x1 )
(x1 x0 )(x1 x2 ) · · · (x1 xn )
+ ···
(x x0 )(x x1 ) · · · (x xn 1 )
f (xn )
(xn x0 )(xn x1 ) · · · (xn xn )
✤ Pero este método es más complejo.
Diferencias Finitas -
Metodología alternativa
✤ En general, cualquier esquema de diferencias finitas se puede expresar
como: m
n
@ f X
n
= ! k f i+k
@x
k= l
✓ ◆ ✓ ◆ ✓ ◆
@f @f @f fi+2 fi 2 fi+1 fi 1
↵ + +↵ = +
@x i 1 @x i @x i+1 4 x 2 x
Esquemas “Compactos”
✤ Ahora la formulación depende de tres parámetros (↵, , ) .
Dependiendo del valor que tomes, se podrán tener esquemas de
diferente orden de exactitud
Esquemas “Compactos” - Ejercicio
✤ A manera de ejemplo, usando una formulación compacta Padé-4,
determine los valores de la primera derivada de la función:
x
f =2e sin(2 ⇡ x)
✤ Obtenga el nivel de error comparando contra la solución analítica
x x
g= 2e sin(2 ⇡ x) + 4⇡ e cos(2 ⇡ x)
(1 + re,h )2
r⌧ =
re,h
Mallas No-Uniformes
✓ 2
◆
(1 re ) x i @
✏⌧ ⇡
2 @x2 i
✤ Así:
✓ ◆
@2 i+1 (xi xi 1 ) + i 1 (xi+1 xi ) i (xi+1 xi 1)
⇡ 1
@x2 i 2 (xi+1 xi 1 )(xi+1 xi )(xi xi 1)
⇣ ⌘ ⇣ ⌘
@ @
✓ ◆ @x @x
@ @ i+ 12 i 1
⇡ 1
2
@x @x i 2 (xi+1 xi 1)
i+1 i i i 1
i+ 12 xi+1 xi i 1
2 xi xi 1
⇡ 1
2 (xi+1 xi 1)
Número de onda equivalente
N/2 1
X
f (xi ) = ˆ
f (kq )e ikq xi
q= N/2
eikx eik(x+ x)
eik(x x)
sin(k x) ikx ikx
= =i e = ike↵ e
x 2 x x
sin(k x) k 3 ( x)2
kef f = =k
x 6