II. FINITE DIFFERENCE METHOD 1 Difference formulae
II. FINITE DIFFERENCE METHOD 1 Difference formulae
II. FINITE DIFFERENCE METHOD 1 Difference formulae
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
y<br />
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7<br />
y’’(x)+(3*x−2)*y’(x)+(x^2+1)*y(x)=cos(x/2), y(−6*pi)=0, y(6*pi)=0<br />
−20 −10 0 10 20<br />
Figure 5: The difference method applied to the the convection-diffusion problem<br />
¡y ′′ (x)+(3x¡2)y ′ (x)+(x 2 +1)y(x) = cos(x/2) with Dirichlet conditions y(¡6π) =<br />
0 , y(6π) = 0.<br />
¸ ǫz 2 1 + (p 2z1 ¡ p 2z2) 2 + . . . + ( p 2zn−2 ¡ p 2zn−1) 2 + ǫz 2 n−1 ,<br />
which is > 0 for any nonzero z 2 R n−1 . Hence we have the following result.<br />
Thm. <strong>II</strong>.3.1 (Existence and uniqueness of solution of the discretized problem)<br />
The discretized version of the convection-diffusion problem above described<br />
admits a unique solution if h = (b ¡ a)/n is chosen sufficiently small<br />
with respect to the convection term p(x), as in (10).<br />
Ex.<strong>II</strong>.3B (Alternative discretizations are possible) The restriction (10) can<br />
be eliminated by discretizing in another way the term p(x)y ′ . More precisely,<br />
we set<br />
¡ ¯yi+1 ¡ 2¯yi + ¯yi−1<br />
h 2<br />
¡ ¯yi+1 ¡ 2¯yi + ¯yi−1<br />
h 2<br />
+ p(xi) ¯yi+1 ¡ ¯yi<br />
h<br />
+ p(xi) ¯yi ¡ ¯yi−1<br />
h<br />
x<br />
14<br />
+ q(xi)¯yi = f(xi), if p(xi) · 0<br />
+ q(xi)¯yi = f(xi), if p(xi) > 0