Second Order differential equation
For the differential equation depending on space $$ \begin{equation} \frac{d^2 T}{dx^2} = f(x)\quad\text{in}\quad 0< x <1 \end{equation} $$ subject to the boundary condition $$ \begin{equation} T(0) = \alpha\quad\text{and}\quad T(1) = \beta. \end{equation} $$ It can be solved by: $$ \begin{equation} \frac{w_{k-1}-2w_{k}+w_{k+1}}{h^2} = f(x_k) \end{equation} $$ with $$ w_1 = \alpha\quad{and}\quad w_N = \beta. $$