I'm solving a system of stiff ODEs, at first I wanted to implement BDF, but it seem to be a quite complicated method, so I decided to start with Backward Euler method. Basically it says that you can solve an ODE:

${y}^{\prime}=f(t,y)$, with initial guess $y({t}_{0})={y}_{0}$

Using the following approximation:

${y}_{k+1}={y}_{k}+hf({t}_{k+1},{y}_{k+1})$, where $h$ is a step size on parameter $t$

Wikipedia article says that you can solve this equation using Newton-Raphson method, which is basically a following iteration:

${x}_{n+1}={x}_{n}-\frac{g({x}_{n})}{{g}^{\prime}({x}_{n})}$

So, the question is how to correctly mix them together? What initial guess ${x}_{0}$ and function $g$ should be?

Also $f$ is quite complex in my case and I'm not sure if it possible to find another derivative of it analytically. I want to write an implementation of it by myself, so pblackefined Mathematica functions wouldn't work.

${y}^{\prime}=f(t,y)$, with initial guess $y({t}_{0})={y}_{0}$

Using the following approximation:

${y}_{k+1}={y}_{k}+hf({t}_{k+1},{y}_{k+1})$, where $h$ is a step size on parameter $t$

Wikipedia article says that you can solve this equation using Newton-Raphson method, which is basically a following iteration:

${x}_{n+1}={x}_{n}-\frac{g({x}_{n})}{{g}^{\prime}({x}_{n})}$

So, the question is how to correctly mix them together? What initial guess ${x}_{0}$ and function $g$ should be?

Also $f$ is quite complex in my case and I'm not sure if it possible to find another derivative of it analytically. I want to write an implementation of it by myself, so pblackefined Mathematica functions wouldn't work.