# Confusion about Finite Differences Method Notation

I would need a confirmation that I am understanding one of the steps in the lecture notes about numerical methods right. We have an ODE with $$y\in C^1(t)$$:
\begin{align} y'(t) &= f(t, y(t))\\ y(t_0) &= y_0 \end{align} and we choose the integration interval $$I = [t_0, T]$$, which will be divided with the step length $$h = (T-t_0)/N_h$$, with $$N_h$$ being the number of the steps. $$u_j$$ is the approximation of the exact solution at $$t_j$$, the exact solution is denoted by $$y_j := y(t_j)$$. Also let $$f_j$$ be defined as $$f_j = f(t_j, u_j)$$ and $$u_0 = y_0$$. Then the text goes on as: 'When using a simple one step method we can use finite difference method: \begin{align} y'(t_n) \approx \frac{y(t_{n+1})-y(t_n)}{h} \end{align} and with using $$y'(t_n) = f_n$$ we get the Euler's forward method: $$u_{n+1} = u_n + hf_n$$.' The problem I am having stems from the fact that we choose the notation $$y_n$$ for the exact solutions and I am confused as far as how I can set $$y(t_n) = f_n$$ since $$f_n$$ is a function of the approximated solutions. It is clear to me, that when I put the values of $$u_n$$ into the finite difference method, I get the desired form of the Euler's formula, but is it how it is meant (and the finite difference method is just a general formula with a little unfortunate notation)?

• Welcome to Stack Exchange! This is a good question and on-topic here, but just fyi there are almost 200 different SE sites and including Computational Science SE which may also be of interest to you.
– uhoh
Jul 3, 2022 at 17:44
• @uhoh Thank you I will look into it.
"with using $$y'(t_n)=f_n$$" : This is an unfortunate short notation. In the ODE $$y'(t_n)=f(t_n,y(t_n))$$ the left side gets approximated by the difference quotient and the right side gets replaced by the approximation $$f_n=f(t_n,u_n)$$ of the function value at the known approximations of the solution values.
That there are two approximations involved can also be seen in the error analysis. The difference quotient has the leading error $$\frac{y(t_{n+1})-y(t_n)}{h_n}=y'(t_n)+\frac{h_n}2y''(t_n)+...=f(t_ny(t_n))+\frac{h_n}2[f_t+f_yf](t_n,y(t_n))$$ If $$e_n=u_n-y(t_n)$$, then $$\frac{e_{n+1}-e_n}{h_n}=f(t_n,u_n)-f(t_n,y(t_n))-\frac{h_n}2y''(t_n)+... =f_y(t_n,u_n)e_n-\frac{h_n}2y''(t_n)+...$$ The first term, the propagation of the previous errors, corresponds to the difference in evaluation points, the error on the right side. The second term, the local error contribution, stems from the approximation of the derivative, the error on the left side in the approximation of the original ODE.