A first-order ODE is given as,
[tex]dy/dx = f(x,y)[/tex]
this is the definition. So when one states, [tex]f(x_i,y_i)[/tex], this simply means, evaluate the first-order derivative at [tex]x_i[/tex] and [tex]y_i[/tex].
This is how the method breaks down:
[tex]The general form of the RK4 algorithm is given as,<br />
\begin{equation}\begin{split} <br />
k_{1}&=f(x_{i},y_{i})\\<br />
k_{2}&=f(x_{i}+\dfrac{1}{2}h, y_{i}+\dfrac{1}{2}k_{1}h)\\<br />
k_{3}&=f(x_{i}+\dfrac{1}{2}h,y_{i}+\dfrac{1}{2}k_{2}h)\\<br />
k_{4}&=f(x_{i}+h,y_{i}+k_{3}h)\\<br />
y_{i+1}&=y_{i}+\dfrac{1}{6}\cdot(k_{1}+2k_{2}+2k_{3}+k_{4})\cdot h<br />
\label{eq:}<br />
\end{split}\end{equation}[/tex]
[tex]Simplified as eight equations,<br />
\begin{equation}\begin{split} <br />
k_1&=f(x_i,y_i)\\<br />
z_1&=y_i+\dfrac{1}{2}k_{1}h\\<br />
k_2&=f(x_{i}+\dfrac{1}{2}h, z_1)\\<br />
z_2&=y_i+\dfrac{1}{2}k_{2}h\\<br />
k_3&=f(x_{i}+\dfrac{1}{2}h, z_2)\\<br />
z_3&=y_i+k_{3}h\\<br />
k_4&=f(x_{i}+h, z_3)\\<br />
y_{i+1}&=y_i+\left(\dfrac{h\cdot(k_1+2(k_2+k_3)+ k_4)}{6}\right)<br />
\label{eq:}<br />
\end{split}\end{equation}[/tex]
Say for example you are given, [tex]y'=(-y)ln(y),\;\;y(0)=0.5.[/tex]
Hence,
[tex]f(x_0,y_0)=(-0.5)\cdot ln(0.5)[/tex]
In this example, it only varied in terms of y. However, you could be faced with an ODE such as [tex]y'=4e^{0.8x}-0.5y[/tex], in which case you need to take care how you substitute in the 'x' value. For the [tex]x_i+\dfrac{1}{2}h[/tex] bits, you need to evaluate it at [tex]x_{i+1}=x_i+\dfrac{1}{2}h[/tex].
For example, if [tex]x_0=0[/tex] and h=0.5, then [tex]x_1=0+\dfrac{1}{2}(0.5)=0.25[/tex].
Hope this helps...