I am trying to solve following set of equations:A(i,i-2)*u(i-2) + A(i,i-1)*u(i-1) + (A(i,i)+(i) )*u(i) + A(i,i+1)*u(i+1) + A(i,i+2)*u(i+2)= B(i) + (i)where i=1:1000000If values of  varies(several orders) greatly then what would be the best strategy to solve this equation numerically. Should I expect oscillations in the result?What could be the possible remedy?*Is it okay if I add 10000*u(i) on both sides of equations while solving iteratively?*EDIT:Structure of Coeffcient Matrix will roughly look like this (if i=1:9, while I am trying to do it for i=1:10^6): $$\begin{bmatrix} A11 + 1&  A12&  A13&  0&    0&    0&    0&    0&    0& \\  A21&  A22 + 2&  A23&  A24&  0&    0&    0&    0&    0& \\  A31&  A32&  A33 + 3&  A34&  A35&  0&    0&    0&    0& \\  0&    A42&  A43&  A44 + 4&  A45&  A46&  0&    0&    0& \\  0&    0&    A53&  A54&  A55 + 5&  A56&  A57&  0&    0& \\  0&    0&    0&    A64&  A65&  A66 + 6&  A67&  A68&  0&\\  0&    0&    0&    0&    A75&  A76&  A77 + 7&  A78&  A79& \\  0&    0&    0&    0&    0&  A86&  A87&  A88 + 8&  A89& \\  0&    0&    0&    0&    0&    0&  A97&  A98&  A99 + 9& \\  \end{bmatrix}$$ Here A(i,i)=A(i,i-2)+A(i,i-1)+A(i,i+1)+A(i,i+2)  **(i,i)>0  (i,i) >> A(i,i-2)+A(i,i-1)+A(i,i+1)+A(i,i+2)**Also there is a huge variation in values of .**Order of every entry in matrix is ~10^-2, except diagonal entries and  which vary from order of 1 to 10^6.
Solving a linear system whose matrix has imbalanced diagonal entries
linear algebra;computational physics