I am trying to understand how stiff differential equations are solved.
For instance the equation,
$$\frac{\partial y}{\partial t} = \alpha\frac{\partial ^2 y}{\partial z^2}$$
can be solved using an ode solver by discretizing z-direction at i th node
$$\frac{dy_i}{dt} = \alpha\frac{y_{i+1}-2y_i + y_{i-1}}{\Delta z^2}$$
This ode is often solved using ode15s. From what I understand, stiff solver uses numerical differentiation formals like backward differentiation formula(BDF) to approximate the derivative. Considering a two-step BDF formula,
$$\dot y(t_n)= \frac{\frac{3}{2}\cdot y_n + (-2)\cdot y_{n-1} + \frac{1}{2}y_{n-2}}{\Delta t }$$.
I am not sure how to proceed from here. Instead of using the solver, I am trying to implement the above BDF to understand how the solver works.
I would like to ask for suggestions on how to proceed from here.
EDIT: Equating (2) and (3) equation $$ \frac{\frac{3}{2}\cdot y^n_i + (-2)\cdot y^{n-1}_i + \frac{1}{2}y^{n-2}_i}{\Delta t }= \alpha\frac{y^n_{i+1}-2y^n_i + y^n_{i-1}}{\Delta z^2}$$ Here, n represents time and i respresents space.