Você está na página 1de 10

ECUACI ONES DI FERENCI ALES PARCI ALES HI PERBOLI CAS

En esta ecuacin estudiaremos la solucin numrica para la ecuacin de onda, que es un ejemplo de
una ecuacin diferencial parcial hiperblica. La ecuacin de onda est dada por la ecuacin
diferencial.

2 2
2
2 2
( , ) ( , ) 0,
u u
x t x t
t x
c c
=
c c
0 , x l < < , t > (12.16)
Sujeta a las condiciones
(0, ) ( , ) 0, u t u l t = = para t>0,
( , 0) ( ), u x f x = y ( , 0) ( ),
u
x g x
x
c
=
c
para 0 , x l s s
Donde es una constante. Para establecer el mtodo de diferencias finitas, se selecciona un entero
0 m> y el tamao de paso de tiempo 0 k > . Con / h l m = los puntos de red ( , )
i j
x t son
,
i
x ih = y ,
j
t jk =
Para cada 0,1,..., i m = y 0,1,... j = .En cualquier punto de red interior ( , )
i j
x t la ecuacin de onda
se transforma en

2 2
2
2 2
( , ) ( , ) 0
i j i j
u u
x t x t
t x
c c
=
c c
(12.17)
El mtodo de diferencias se obtiene usando el cociente de diferencias centradas en las segundas
derivadas parciales dadas por

2 2 4
1 1
2 2 4
( , ) 2 ( , ) ( , )
( , ) . ( , ),
12
i j i j i j
i j i j
u x t u x t u x t
u k u
x t x u
t k t
+
+
c c
=
c c

Donde

1 1
( , )
j j j
u t t
+
e y

2 2 4
1 1
2 2 4
( , ) 2 ( , ) ( , )
( , ) . ( , )
12
i j i j i j
i j i j
u x t u x t u x t
u h u
x t t
x h t
c
+
+
c c
=
c c


Donde
1 1
( , )
i i i
x x
+
e . Al sustituir estas expresiones en la ecuacin (12.17), obtenemos
1 1 1 1 2
2 2
( , ) 2 ( , ) ( , ) ( , ) 2 ( , ) ( , )
i j i j i j i j i j i j
u x t u x t u x t u x t u x t u x t
k h
+ +
+ +

4 4
2 2 2
4 4
1
( , ) ( , )
12
i j i j
u u
k x u h t
t x

( c c
=
(
c c


Si ignoramos el trmino de error

4 4
2 2 2
, 4 4
1
( , ) ( , )
12
i j i j i j
u u
k x u h t
t u
t
( c c
=
(
c c


Obtenemos la solucin de diferencias

, 1 , , 1, , 1, 2
2 2
2 2
0
i j i j i j i j i j i j
w w w w w w
k h
+ +
+ +
=
Si / , k h = podemos escribir la ecuacin de diferencias como

2 2 2
, 1 , , 1 1, , 1,
2 2 0
i j i j i j i j i j i j
w w w w w w
+ +
+ + =
Y resolver para
, 1
,
i j
w
+
o sea, la aproximacin ms avanzada del paso del tiempo, para obtener

2 2
, 1 , 1, 1, , 1
2(1 ) ( ) 0
i j i j i j i j i j
w w w w w
+ +
= + + = (12.18)
Esta ecuacin es aplicable para toda 1, 2,..., 1 i m = y 1, 2,... j = las condiciones de frontera nos
dan

0, ,
0,
j m j
w w = = para cada 1, 2, 3,... j = (12.19)
Y la condicin inicial implica que

,0
( ),
i i
w f x = para cada 1, 2,..., 1 i m = (12.20)
Al escribir este conjunto de ecuaciones en forma matricial, obtenemos

2 2
1, 1 1, 1, 1
2 2 2
2, 1 2, 2, 1
2
1, 1 1, 1, 1
2 2
2(1 ) 0 0
2(1 )
0 0
0 0 2(1 )
j j j
j j j
m j m j m j
w w w
w w w
w w w


+
+
+
(
( ( (
(

( ( (
(
( ( (
(
=
( ( (
(
( ( (
(
( ( (

(


(12.21)
Las ecuaciones (12.18) y (12.19) implica que el (j+1)-esimo paso de tiempo requiere valores de los
j-esimos y (j-1)-esimo pasos. (Vase la fig. 12.10) Esto produce un pequeo problema inicial,
porque los valores de j=0 estan dados por la ecuacin (12.20), pero los valores de j=1, que se
necesitan en la ecuacin (12.18) para calcular
,2
,
i
w deben obtenerse de la condicin de velocidad
inicial
( , 0) ( ), 0 .
u
x g x x l
t
c
= s s
c

FIGURA 12.10

Un procedimiento consiste en reemplazar
u
t
c
c
por una aproximacin de diferencias progresivas,

2
1
2
( , ) ( , 0)
( , 0) . ( , ),
2
i i
i i i
u x t u x u k u
x x
t k t

c c
=
c c
(12.22)
Para cierta
i
en (0,t
1
). Al resolver para
1
( , )
i
u x t obtenemos

2 2
1 2
( , ) ( , 0) ( 0) . ( , )
2
i i i i i
u k u
u x t u x k x x
t t

c c
= + +
c c


2 2
2
( , 0) ( ) . ( , ).
2
i i i i
k u
u x kg x x
t

c
= + +
c

En consecuencia,

,1 ,0
( ),
i i i
w w kg x = + para cada
1,..., 1. i m = (12.23)
Sin embargo, esta da una aproximacin con un error de solo 0(k). Podemos obtener una mejor
aproximacin a ( , 0).
i
u x Considera la ecuacin

2 2 3 3
1 2 3
( , ) ( , 0) ( , 0) . ( , 0) . ( , ),
2 6
i i i i i i
u k u k u
u x t u x k x x x
t t t

c c c
= + + +
c c c

Para cierta
i
en (0,t
1
), que proviene de desarrollar
1
( , )
i
u x t con el segundo polinomio de
Maclaurin en t. Si " f existe, entonces

2 2 2
2 2 2
2 2 2
( , 0) ( , 0) ( ) ''( )
i i i i
u u d f
x x x f x
t x dx
c c
= = + =
c c

y

2 2 3 3
1 3
( , ) ( , 0) ( ) ''( ) . ( , ),
2 6
i i i i i i
k k u
u x t u x kg x f x x
t

c
= + + +
c

Lo que produce una aproximacin con error 0(k
3
):
2 2
1 0
( ) ''( ).
2
i i i i
k
w w kg x f x

= + +
Si
| |
4
0,1 f C e pero no disponemos de ''( ),
i
f x podemos usar la ecuacin en diferencias de (4.9)
para escribir
2
(4) 1 1
2
( ) 2 ( ) ( )
''( ) ( ),
12
i i i
i i
f x f x f x h
f x f
h

+
+
=
Para alguna
i
en
1 1
( , ).
i i
x x
+
Esto implica que
| |
2 2
3 2 2
1 1 1 2
( , ) ( , 0) ( ) ( ) 2 ( ) ( ) 0( ).
2
i i i i i i
k
u x t u x kg x f x f x f x k h k
h
+

= + + + + +
Si ( )
k
h


= , entonces
| |
2
3 2 2
1 1 1
( , ) ( , 0) ( ) ( ) 2 ( ) ( ) 0( )
2
i i i i i i
u x t u x kg x f x f x f x k h k

+
= + + + + +


2 2
2 3 2 2
1 1
(1 ) ( ) ( ) ( ) ( ) 0( ).
2 2
i i i i
f x f x f x kg x k h k

+
= + + + + +
Asi, podemos usar la ecuacin en diferencias
2
2
,1 1
(1 ) ( ) ( ) ( ),
2
i i i i
w f x f x kg x


= + + (12.24)
Para calcular
,1
,
i
w para cada 1, 2,..., 1. i m =
El algoritmo 12.4 usa la ecuacin (12.24) para aproximar
,1
,
i
w aunque la ecuacin (12.23) tambin
sirve. Se supone que existe una cota superior para el valor de t que se usa en la tcnica de paro, y
que
T
k
N
= , donde tambin N esta dado.
METODO DE DIFERENCIAS FINITAS
Para aproximar la solucin de la ecuacin de onda
2 2
2
2 2
( , ) ( , ) 0,
u u
x t x t
t x
c c
=
c c
0 1, x < < 0 , l T < <
Sujeta a las condiciones de frontera
(0, ) ( , ) 0, 0 , u t u l t t T = = < <
Y a las condiciones iniciales
( , 0) ( ), 0 , u x f x x l = s s
( , 0) ( ), 0 :
u
x g x x l
t
c
= s s
c

ENTRADA
( ) ( ) ; max ; tan ( ); ( 2, 2) extremo l tiempo imo T cons te enteros m N > >
SALIDA
,
( ( , ))
i j i j
aproximaciones w a u x t para toda 0,..., i m = y 0,..., . j N =
Paso 1 Tome h l / m; =
/ ; k T N =
/ ; k h =

Paso 2 para 1,..., , j N = tome
0,
,
0;
0.
j
m j
w
w
=
=

Paso 3 tome
0,0
,0
(0);
( ).
m
w f
w f l
=
=

Paso 4 para
.0
1,..., 1
( );
i
i m
tomew f ih
=
=
(Inicialmente para t=0 y t=k.)
| |
2
2
,1
(1 ) ( ) (( 1) ) (( 1) ) ( ).
2
i
w f ih f i h f i h kg ih

= + + + + +
Paso 5 para 1,..., 1 j N = (Realice una multiplicacin de matrices.)
para 1,..., 1 i m =
tome
2 2
, 1 , 1, 1, ,
2(1 ) ( )
i j i j i j i j i j V
w w w w w
+ +
= + + +
Paso 6 para 0,..., j N =
tome ; t jk =
para 0,..., i m =
tome ; x ih =
SALIDA
,
( , , ).
i j
x t w
Paso 7 PARAR. (Procedimiento terminado.)
EJEMPLO 1 Consiste el problema hiperblico
2 2
2 2
( , ) 4 ( , ) 0,
u u
x t x t
t x
c c
=
c c
0 1, x < < 0 , t <
con las condiciones de frontera
(0, ) (1, ) 0, u t u t = = para 0 , t <
y con las condiciones iniciales
( , 0) sin( ), u x x t = 0 1, x s s y ( , 0) 0,
u
x
t
c
=
c
0 1. x s s
Se puede verificar fcilmente que la solucin a este problema es
( , ) sin cos2 . u x t x t t t =
En este ejemplo se emplea el algoritmo de diferente finitas 12.4 con m=10, T=1 y N=20, lo cual
significa que 0.1 h = , 0.05 k = y 1 = . La tabla 12.6 contiene los resultados de la aproximacin
, i N
w para 0,1,...,10. i = Los valores que se dan en la tabla son correctos en las cifras decimales
dadas.
Tabla 12.6
i
x
,20 i
w
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
0.0000000000
0.3090169944
0.5877852523
0.8090169944
0.9510565163
1.0000000000
0.9510565163
0.8090169944
0.5877852523
0.3090169944
0.0000000000

Los resultados del ejemplo fueron muy exactos, ms de lo que el error de truncamiento de
2 2
0( ) k h + nos hara suponer. La explicacin de ello se encuentra en el hecho de que la solucin
verdadera de la ecuacin es infinitamente diferenciable. Cuando es asi, al utilizar la serie de Taylor
obtenemos
1 1
2
( , ) 2 ( , ) ( , )
i j i j i j
u x t u x t u x t
h
+
+

2 2 4 4 6
2 4 6
( , ) 2 ( , ) ( , )
4! 6!
i j i j i j
u h u h u
x t x t x t
x x t
( c c c
= + + +
(
c c c


Y
1 1
2
( , ) 2 ( , ) ( , )
i j i j i j
u x t u x t u x t
k
+
+

2 2 4 4 6
2 4 6
( , ) 2 ( , ) ( , ) .
4! 6!
i j i j i j
u k u h u
x t x t x t
t t t
( c c c
= + + +
(
c c c


Puesto que ( , ) u x t satisface la ecuacin diferencial parcial,
1 1 1 1 2
2 2
( , ) 2 ( , ) ( , ) ( , ) 2 ( , ) ( , )
i j i j i j i j i j i j
u x t u x t u x t u x t u x t u x t
k h
+ +
+ +

4 4 6 6
2 2 2 4 2 4
4 4 6 6
1 1
2 ( , ) ( , ) ( ( , ) ( , )) ... .
4! 6!
i j i j i j i j
u u u u
k x t h x t k x t h x t
t x t x
( | | c c c c
= + +
( |
c c c c
\ .

(12.25)
Sin embargo, al derivar la ecuacin de onda,

4 2 2 2 2
2 2 2 2
4 2 2 2 2
( , ) ( , ) ( , )
i j i j i j
u u u
k x t k x t k x t
t t x x t
( ( c c c c c
= =
( (
c c c c c



2 2 4
2 2 2 4 2
2 2 4
( , ) ( , ),
i j i j
u u
k x t k x t
x x x
( c c c
= =
(
c c c



Y vemos que, como
2 2
2
2
( ) 1
k
h


= = , tenemos

4 4 2 4
2 2 2 2 2 2
4 4 4
1
( , ) ( , ) ( , ) 0
4! 4!
i j i j i j
u u u
k x t h x t k h x t
t x x
( c c c
( = =
(

c c c



Continuando de esta forma, todos los trminos del lado derecho de(12.25) son 0, lo cual supone un
error de truncamiento local 0. Los nicos errores del ejemplo 1 son los debidos a la aproximacin
de
,1 i
w y al redondeo.
Al igual que en el caso del mtodo de diferencias progresivas para la ecuacin del calor, el mtodo
de las diferencias finitas explicitas para la ecuacin de onda tambin presenta problemas de
estabilidad. De hecho, para que el mtodo sea estable es necesario que / 1. k h = s El mtodo
explicito que se da en el algoritmo 12.4 con 1 s , es de
2 2
0( ) h k + converge si f y g son
suficientemente diferenciables.






PROGRAMACION EN MATLAB


1.- METODO EXPLICITO






2.- METODO IMPLICITO

Você também pode gostar