Step 1

We start at the initial value `(0,4)` and calculate the value of the derivative at this point. We have:

`dy/dx=sin(x+y)-e^x`

`=sin(0+4)-e^0`

`=-1.75680249531`

We substitute our starting point and the derivative we just found to obtain the next point along.

`y(x+h)~~y(x)+hf(x,y)`

`y(0.1)~~4+0.1(-1.75680249531)`

`~~3.82431975047`

Step 2

Now we need to calculate the value of the derivative at this new point `(0.1,3.82431975047)`. We have:

`dy/dx=sin(x+y)-e^x`

`=sin(0.1+3.82431975047)` `-e^0.1`

`=-1.8103864498`

Once again, we substitute our current point and the derivative we just found to obtain the next point along.

`y(x+h)~~y(x)+hf(x,y)`

`y(0.2)~~3.82431975047+` `0.1(-1.8103864498)`

`~~3.64328110549`

We proceed for the required number of steps and obtain these values:

`x` `y` `dy/dx`
0 4 -1.7568024953
0.1 3.8243197505 -1.8103864498
0.2 3.6432811055 -1.8669109257
0.3 3.4565900129 -1.926815173
0.4 3.2639084956 -1.9907132334
0.5 3.0648371723 -2.0594421065
0.6 2.8588929616 -2.1341215746
0.7 2.6454808042 -2.2162311734
0.8 2.4238576868 -2.3077132045
0.9 2.1930863664 -2.4111158431
1 1.9519747821  

Here's the graph of this solution.

Euler Method solution of DE - final graph