Eulers method for a first order IVP y fx y yx0 y0 is the f
Solution
f(x,y) = siny
x0 = -0.5, y0 = 2
f(x0, y0) = sin(2) = 0.9093
x1 = x0 + h = -0.5 + 0.3 = -0.2
y1 = y0 + hf(x0,y0)
Also y\' = siny
=> dy /siny = dx
=> cscydy = dx
=> -ln|cscy+coty| = x+C
At x0 = -0.5, y0 = 2
=> -ln|csc2 + cot2| = -0.5+C
=> -ln|1.0997-0.4576| = -0.5+C
=> 0.9430 = C
Hence -ln|cscy+coty| = x+0.9430
x1 = -0.5+0.3 = -0.2
y1 = 2+(0.3)(0.9093) = 2.27279
Exact solution at (x1,y1)
-ln|cscy +coty| = -0.2+0.9430 =0 .743
=> cscy+coty = e-0.743 = 0.4757
=> y = 2.2536
Error = |2.2536-2.27279| = 0.01919
f(x1,y1) = sin(2,27279) = 0.7635
x2 = -0.2+0.3 = 0.1
y2 = 2.27279 + (0.3)(0.7635) = 2.50184
Exact solution at x2 = 0.1
-ln|cscy+coty| = 0.1 + 0.9430 = 1.043
=> cscy+coty = e-1.043 = 0.3524
=> y = 2.464
Error =|2.464-2.50184| = 0.03784
f(x2,y2) = sin(2.50184) = 0.5970
x3 = 0.1 + 0.3 = 0.4
y3 = 2.50184 + (0.3)(0.5970) = 2.68094
Exact solution at x3 = 0.4
-ln|cscy+coty| = 0.4+0.9430 = 1.343
=> cscy+coty = e-1.343 = 0.2611
=> y = 2.6308
Error = |2.6308-2.68094| = 0.05014
f(x3,y3) = sin(2.68094) = 0.4445
x4 = 0.4+0.3 = 0.7
y4 = 2.68094 + (0.3)(0.4445) = 2.81429
Exact solution at x4 = 0.7
-ln|cscy+coty| = 0.7+0.9430 = 1.643
=> cscy+coty = e-1.643 = 0.1934
=> y = 2.7596
Error = |2.7596-2.81429| = 0.05469
The table of values is iven by :
| n= | 0 | 1 | 2 | 3 | 4 | 
| xn | -0.5 | -0.2 | 0.1 | 0.4 | 0.7 | 
| yn | 2 | 2.27279 | 2.50184 | 2.68094 | 2.81429 | 
| en | 0.01919 | 0.03784 | 0.05014 | 0.05469 | 


