Easy recurrence relation after finite difference discretization: what is the solution?

109 Views Asked by At

I need a check on the solution of a linear recurrence that arise after a finite difference discretization of the problem $$\begin{cases} -\mu u'' + b u' = -b \\ u(0)=u(1)=0 \end{cases} $$ with $b$ and $\mu$ constants. The discretization is easy and it's not relevant here, the fact is that I end up with this linear difference equation: $$(\text{Pe}-1)u_{i+1} - 2 u_i -(\text{Pe}+1)u_{i-1} = \text{Pe} h$$

where $\text{Pe}= \frac{bh}{2\mu}$ is constant.

I know that the solution should have the form $$u_i = \rho^i$$ so plugging into the equation I obtain $$(\text{Pe}-1)\rho^2 -2 \rho - (\text{Pe}+1) - \text{Pe} h=0$$

Solving the quadratic equation I find: $$\rho_{1,2} = \frac{-1 \pm \sqrt{\text{Pe}^2 (h+1)+\text{Pe}h}}{\text{Pe}-1}$$

Now, the solution should be of the form $$u_i = A_1 \rho_1^i + A_2 \rho_2^i$$, with $A_1,A_2$ to be determined by the boundary conditions.

So far, is everything correct? I need to be sure that this is oka, in order to find $A_1,A_2$

1

There are 1 best solutions below

4
On

You made a mistake. First you have to get the general solution $u^c_i$ to the homogeneous equation $$(\text{Pe}-1)u_{i+1} - 2 u_i -(\text{Pe}+1)u_{i-1} = 0 $$ whose solution has the form $$ u_i^c=c_1\rho_1^i+c_2\rho_2^i. $$ Here $\rho_1,\rho_2$ are roots of $$(\text{Pe}-1)\rho^2 -2 \rho - (\text{Pe}+1)=0.$$ Then get a particular solution $u^p_i=-\frac{\text{Pe}h}4$ to $$(\text{Pe}-1)u_{i+1} - 2 u_i -(\text{Pe}+1)u_{i-1} = \text{Pe} h. $$ Thus you will have the solution $$ u_i=u^c_i+u^p_i. $$