# Forward Euler Method Given Two Step Sizes

I am attempting to compute an approximation of the solution with the forward Euler method in $$[0,1]$$ with step lengths $$h_{1}= 0.2$$, $$h_{2}= 0.1$$ given the initial value problem below

$$\frac{dy}{dz}=\frac{1}{1+z}-y(z)\quad y(0)=1$$

I am not sure what to do when I am given two step sizes instead of one. I know how to compute it if it was given with a step size. Am I supposed to find out the approximation for two different step sizes? Or is there anything I am missing?

The problem asks for solving the differential equation twice. Once for the step size of $$h=.1$$ and once for the step size of $$h= .2$$ and compare the results. As you know different step sizes give you different results with the smaller step size smaller error is made .

• Ah ok I understood completely another thing! – gimusi Oct 21 '18 at 15:09
• Thanks a lot for the explanation – enes Oct 21 '18 at 17:29
• Thanks for your attention and understanding – Mohammad Riazi-Kermani Oct 21 '18 at 18:19

We can apply the Euler’s method as usual using $$h_1$$ for the first solution that is

$$y_{i+1}=y_i+h_1F(z_i,y_i)$$

and $$h_2$$ for the second one that is

$$y_{i+1}=y_i+h_2F(z_i,y_i)$$

in order to compare the results since smaller isbthe step more accurate is the solution.