Issue on page /numerical_methods/6-initial-value-problem-singlestep.html

I believe that the answer to the exercise for forward Euler is incorrect. The problem definition: dy/dt = y^2, y(t0) = 1, 0<t<1, deltat = 0.5.

The derivative dy/dt is defined as y^2. This is not used in the presented solution.

The answer I obtained:

y0 = 1 y1 = y0 + deltat * y'0 = y0 + deltat * y0^2 = 1 + 0.5 * 1^2 = 1.5

y2 = y1 + deltat * y'1 = y1 + deltat * y1^2 = 1.5 + 0.5 * 1.5^2 = 2.625

This is different from the solution presented in the exercise, which gives:

y1 = 1

y2 = 1.125

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information