Está en la página 1de 29

Ecuaciones Diferenciales

Ordinarias

Solución Numérica

Método de Diferencias Finitas


Sistemas de EDO -
Problema Valor Frontera
Cuando las condiciones la EDO se dan por lo menos
en algún punto diferente del valor inicial de la
variable independiente.

M x 
y" 
EI

Condiciones de Frontera Condiciones Iniciales


y(0)=0 y(L)=0 y(0)=0 y’(0)=0
Método de Diferencias Finitas
Sea la ecuación diferencial ordinaria de segundo orden:
y ' '  p x  y ' q x  y  r  x 
x  a, b
y a    y b   
Dividiendo el intervalo en (n+1) partes iguales
ba
h
n
x0  a x1  a  h x2  a  2 h xn 1  b
y  x0   y 0   y  x1   y 1 y  xn   y n y  xn  1   y n  1  
3
Método de Diferencias Finitas
Sean las fórmulas de diferenciación numérica para la primera
y segunda derivada

yi 1  yi 1
y 'i 
2h
yi 1  2 yi  yi 1
y ' 'i 
h2

4
Método de Diferencias Finitas

Reemplazando en la ecuación diferencial para cada nodo i =1, 2, …, n:

y ' 'i  pxi  y 'i  qxi  yi  r xi 

5
Método de Diferencias Finitas

Se tendrá un sistema de n ecuaciones con n incógnitas:


Para i  1 : n
yi 1  2 yi  yi 1  yi 1  yi 1 
 p xi    q xi  yi  r  xi 
 
2
h 2h
y0  
yn 1  

6
Método de Diferencias Finitas

Agrupando:

Para i  1 : n

 1 
h 
   h 
p  xi  yi 1  2  h 2 q  xi  yi  1  p xi  yi 1  h 2 r  xi 
 2   2 
y0  
yn 1  

7
Método de Diferencias Finitas

Luego:


 1 
h 
  
p  x1  y0  2  h 2 q  x1  y1  1 
h 
p  x1  y 2   h 2 r  x1 
 2   2 

 1 
h 
  
p  x2  y1  2  h 2 q  x2  y 2  1 
h 
p  x 2   y3   h 2 r  x 2 
 2   2 


 1 
h 
  
p  xn  y n 1  2  h 2 q  xn  y n  1 
h 
p  xn  y n 1   h 2 r  xn 
 2   2 
y0  
y n 1  

8
Método de Diferencias Finitas
Expresado en forma matricial tenemos un sistema tridiagonal:

 
 2  h 2
q  x1   1 
h
p  x1  0  0 
2
   y1 
p  x2  2  h 2 q  x2  p  x2 
h h
 1  1    
 2 2   y2 
 0 1
h
p  x3    0    
 2  
   y n 1 
2  h 2 q  xn 1  p  xn 1  
h
    1
y 
 2  n 
p  xn  2  h 2 q  xn  
 h
0  0 1
 2 
   
  h r  x1   1  2 p  x1  
2 h
   
  h r  x2 
2

   
 
  h 2 r  xn 1  
   
  h r  x n   1  p  xn    
2 h
  2  
9
Método de Diferencias Finitas
Ejemplo.- Resolver la siguiente ecuacion diferencial ordinaria:
y”-y’-2y=0 con condiciones de frontera: y(0)=0.1 e
y(0.5)=0.283. considere h=0.1.
Solucion.-
Discretización:

x0 x1 x2 x3 x4 X5
0 0.1 0.2 0.3 0.4 0.5
y0 y1 y2 y3 y4 y5
0.1 ?? ?? ?? ?? 0.283

10
Método de Diferencias Finitas
Se usarán las siguientes fórmulas de diferenciación numérica:
yi 1  yi 1
y 'i 
2h
y  2 yi  yi 1
y ' 'i  i 1
h2
Sea la ecuación diferencial para cada nodo “i”:

y"i  y 'i 2 yi  0
Para i  1 : 4
yi 1  2 yi  yi 1 yi 1  yi 1
2
  2 yi  0
h 2h
11
Método de Diferencias Finitas
Reemplazando para cada nodo:

y2  2 y1  y0 y2  y0
2
  2 y1  0
h 2h
y3  2 y2  y1 y3  y1
2
  2 y2  0
h 2h
y 4  2 y3  y 2 y 4  y 2
2
  2 y3  0
h 2h
y 5  2 y 4  y 3 y5  y 3
2
  2 y4  0
h 2h
12
Método de Diferencias Finitas
Teniendo en cuenta que: y0=0.1, y5=0.283 y h=0.1

1000.1  200 y1  100 y2  50.1  5 y2  2 y1  0


100 y1  200 y2  100 y3  5 y1  5 y3  2 y2  0
100 y2  200 y3  100 y4  5 y2  5 y4  2 y3  0
100 y3  200 y4  1000.283  5 y3  50.283  2 y4  0

13
Método de Diferencias Finitas
Planteando y resolviendo el sistema tridiagonal:

 202 95 0 0   y1    10.5   y1  0.1238


 105  202 95 0   y   0   y  0.1527 
  2      2   
 0 105  202 95   y3   0   y3  0.1879 
        
 0 0 105  202  y4   26.885  y4  0.2308

14
Problemas de computadora
Utilice diferencias finitas para aproximar las soluciones a los PVF
n = 9,19 y 39

Soluciones Exactas

Soluciones Exactas
Soluciones
Métodos en diferencias finitas
Ejercicios
Métodos en diferencias finitas
Ejercicios
Métodos en diferencias finitas
Ejercicios
Métodos en diferencias finitas
Ejercicios
Métodos en diferencias finitas
Ejercicios

También podría gustarte