We're currently solving the heat equation as a part of the PDE sequence in class.
We've been given the formula:$$T(i, n+1) = T(i,n)+\alpha \left [\frac{T(i+1,n)-2 T(i, n)+T(i-1,n)}{\Delta x^2} \right ] \quad \Delta t$$ I've got boundary conditions handled. They aren't the problem.
The problem here is, if one notices, $\alpha$, $\Delta x^2$, and $\Delta t$ are all permanent constants throughout the number of iterations. Thus, they can be pre-evaluated. There's just that one problem where, if the value of $\frac {\alpha \Delta t}{\Delta x^2}$ becomes larger than 0.5, I start running into problems with the equation itself. One can see that when that term = 0.5: $$\begin{matrix} 100 & 0 & 0 & 0 & 0\\ 100 & 50 & 0 & 0 & 0\\ 100 & 50 & 25 & 0 & 0\\ 100 & 67.5 & 25 & 12.5 & 0 \end{matrix}$$
Here, every row represents a new time instance, and every column is a new discrete x-position element along the 'thin rod' that I am considering.
The moment the $\frac {\alpha \Delta t}{\Delta x^2}$ goes below 0.5, however, we are 'good', meaning that this problem ceases to occur, but the propagation of temperature through the 'thin rod' is still really slow, even with a really high temperature at one end, which is held constant.
Is the equation provided wrong? Or am I misunderstanding something? Is there some error in sign somewhere?
Edit: This is indeed a class assignment, but given the nature of the situation, I am inclined to think that it is either my understanding that is fundamentally flawed (beyond the code, just the concept) or I've simply been given the wrong equation.
Edit 2: Error in evaluating the matrix. Corrected that.