0
$\begingroup$

Consider this differential equation,

$dy/dx = x + \sin(y)$

with initial condition $y = 0.5$ when $x = 1.2$:

  1. Write down the recurrence relation for Euler's numerical method applied above.
  2. With step size h = 0.1, calculate the approximations to y(1.3) and y(1.4).
  1. This is my answer:

    $$Y_i+1 = Y_i + 0.1(X_i + \sin(Y_i))$$

  2. I have problem solving this one...

    From my txtbk reference, I sub $i = 1$ into the eqn thus giving me

    $Y_1 = Y_0 + 0.1(1.2 + \sin(0.5)) = 0.1679$

    Then, $i = 2$

    $Y_2 = Y_1 + 0.1(1.3 + \sin(0.6)$

Im sure my method in part 2 is wrong and I don't really understand how to solve it via my txtbk.

  • 0
    The method y(i+1)=y(i)+hf(x(i),y(i)),where dy/dx=f(x,y), you applied, seems to be correct at first sight, provided the calculations are correct of course! However using Taylor series expansion, one can show that the error term e(i)= 1+h(del f /del y) at (x(i),y(i)) (here del stands for partial derivative), whose absolute value must be <1 for successive errors to damp out. So please check whether that condition is satisfied, else take into consideration the error terms in each iteration.2012-05-19
  • 1
    Do you really intend the "project-euler" tag? Project Euler $\ne$ Euler's method!2012-05-19

1 Answers 1