Solving a discrete equation

498 Views Asked by At

Consider the following equation:

$$-\epsilon u''(x) + \beta u'(x) = 1, \qquad x \in (0, 1) \qquad u(0) = 0, \quad u(1) = 1$$

where $\beta > 0$ and $0 < \epsilon \ll \beta$. I constructed a finite difference scheme and obtained

$$-\frac{2\epsilon + \beta h}{2h^2} u_{i-1} + \frac{2\epsilon}{h^2} u_i - \frac{2\epsilon - \beta h}{2h^2} u_{i+1} = 1$$ or, equivalently, $$-\frac{h^2}{\epsilon} - (1+Pe)u_{i-1} + 2u_i - (1-Pe) u_{i+1} = 0, \; i = 1, ..., N-1$$ $$u_0 = 0, \; u_N = 1$$ where $u_i = u(x_i), \; x_i = ih,\; h = \frac{1}{N}, \; Pe = \frac{\beta h}{2 \epsilon}.$

How can I solve this discrete equation? Associating the characteristic equation? I didn't understand this method. Can someone explain me?

1

There are 1 best solutions below

5
On

You have a linear system of $N-1$ equations in the $N-1$ variables $u_1,\dots u_{n-1}$. I do not consider $u_0$ and $u_N$ as variables, since you know their values. It's a system of a special form, a tridiagonal system, for which there is an algorithm to find the solution. The first equation is $$ 2\,u_1-(1-P\,e)u_2=\frac{h^2}{\epsilon}, $$ and the last one $$ -(1+P\,e)u_{N-2}+2\,u_{N-1}=(1-P\,e)+\frac{h^2}{\epsilon}. $$ The solution can be found also with the technique of Diference equations. A solution of the homogeneous equation will be of the form $A\,r^i$ for some $r$. Pluging this in the equation we find $$ r=1,\quad r=\frac{1+P\,e}{1-P\,e}. $$ Since constants are solutions of the homegeneous equation, a particular solution can be found of the form $C\,i$. The general solution will be $$ u_i=A+B\Bigl(\frac{1+P\,e}{1-P\,e}\Bigr)^i+C\,i. $$