Forward Euler Method Given Two Step Sizes

340 Views Asked by At

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?

2

There are 2 best solutions below

3
On BEST ANSWER

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 .

0
On

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.