Solution (source code)

= Solution

Write the derivative equation as $f'(x)=\Phi(x,f(x))$ with initial approximation $y_0$. The <forward Euler method> uses the slope at the start of the step:
$$
\boxed{y_{i+1}=y_i+h\Phi(x_i,y_i),\qquad0\leq i<n.}
$$
If the derivative is a known function of $x$ alone, this is $y_{i+1}=y_i+hf'(x_i)$.