# 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′=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

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\left(t,y\right)$, with initial guess $y\left({t}_{0}\right)={y}_{0}$
Using the following approximation:
${y}_{k+1}={y}_{k}+hf\left({t}_{k+1},{y}_{k+1}\right)$, 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\left({x}_{n}\right)}{{g}^{\prime }\left({x}_{n}\right)}$
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.
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Nancy Phillips
Your aim is to solve the following equation for ${y}_{k+1}$:
$g\left({y}_{k+1}\right):={y}_{k+1}-{y}_{k}-hf\left({t}_{k+1},{y}_{k+1}\right)=0,$
where $f$ is a known function and ${y}_{k},{t}_{k+1}$ and $h$ are known values. This gives you the $g$ for a Newton-Raphson method. As an initial guess, I'd suggest that you use a 1-step forward Euler method to explicitly calculate
${\stackrel{^}{y}}_{k+1}:={y}_{k}+hf\left({t}_{k+1},{y}_{k}\right),$
and use ${\stackrel{^}{y}}_{k+1}$ as your initial guess for ${y}_{k+1}$.