# Find $y{\left(\frac{1}{2} \right)}$ for $y^{\prime } = e^{- t^{2}}$, when $y{\left(0 \right)} = 1$, $h = \frac{1}{10}$ using the improved Euler's method

The calculator will find $y{\left(\frac{1}{2} \right)}$ for $y^{\prime } = e^{- t^{2}}$, when $y{\left(0 \right)} = 1$, $h = \frac{1}{10}$ using the improved Euler (Heun's) method, with steps shown.

Related calculators: Euler's Method Calculator, Modified Euler's Method Calculator

Or $y^{\prime } = f{\left(x,y \right)}$.
Or $x_{0}$.
$y_0=y(t_0)$ or $y_0=y(x_0)$.
Or $x_{1}$.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Find $y{\left(\frac{1}{2} \right)}$ for $y^{\prime } = e^{- t^{2}}$, when $y{\left(0 \right)} = 1$, $h = \frac{1}{10}$ using the improved Euler's method.

### Solution

The improved Euler's method states that $y_{n+1} = y_{n} + \frac{h}{2} \left(f{\left(t_{n},y_{n} \right)} + f{\left(t_{n+1},\tilde{y}_{n+1} \right)}\right)$, where $\tilde{y}_{n+1} = y_{n} + h\cdot f{\left(t_{n},y_{n} \right)}$ and $t_{n+1} = t_{n} + h$.

We have that $h = \frac{1}{10}$, $t_{0} = 0$, $y_{0} = 1$, and $f{\left(t,y \right)} = e^{- t^{2}}$.

### Step 1

$t_{1} = t_{0} + h = 0 + \frac{1}{10} = \frac{1}{10}$

$\tilde{y}_{1} = \tilde{y}{\left(t_{1} \right)} = \tilde{y}{\left(\frac{1}{10} \right)} = y_{0} + h\cdot f{\left(t_{0},y_{0} \right)} = 1 + h\cdot f{\left(0,1 \right)} = 1 + \frac{1}{10} \cdot 1 = 1.1$

$y_{1} = y{\left(t_{1} \right)} = y{\left(\frac{1}{10} \right)} = y_{0} + \frac{h}{2} \left(f{\left(t_{0},y_{0} \right)} + f{\left(t_{1},\tilde{y}_{1} \right)}\right) = 1 + \frac{h}{2} \left(f{\left(0,1 \right)} + f{\left(\frac{1}{10},1.1 \right)}\right) = 1 + \frac{\frac{1}{10}}{2} \left(1 + 0.990049833749168\right) = 1.09950249168746$

### Step 2

$t_{2} = t_{1} + h = \frac{1}{10} + \frac{1}{10} = \frac{1}{5}$

$\tilde{y}_{2} = \tilde{y}{\left(t_{2} \right)} = \tilde{y}{\left(\frac{1}{5} \right)} = y_{1} + h\cdot f{\left(t_{1},y_{1} \right)} = 1.09950249168746 + h\cdot f{\left(\frac{1}{10},1.09950249168746 \right)} = 1.09950249168746 + \frac{1}{10} \cdot 0.990049833749168 = 1.19850747506238$

$y_{2} = y{\left(t_{2} \right)} = y{\left(\frac{1}{5} \right)} = y_{1} + \frac{h}{2} \left(f{\left(t_{1},y_{1} \right)} + f{\left(t_{2},\tilde{y}_{2} \right)}\right) = 1.09950249168746 + \frac{h}{2} \left(f{\left(\frac{1}{10},1.09950249168746 \right)} + f{\left(\frac{1}{5},1.19850747506238 \right)}\right) = 1.09950249168746 + \frac{\frac{1}{10}}{2} \left(0.990049833749168 + 0.960789439152323\right) = 1.19704445533253$

### Step 3

$t_{3} = t_{2} + h = \frac{1}{5} + \frac{1}{10} = \frac{3}{10}$

$\tilde{y}_{3} = \tilde{y}{\left(t_{3} \right)} = \tilde{y}{\left(\frac{3}{10} \right)} = y_{2} + h\cdot f{\left(t_{2},y_{2} \right)} = 1.19704445533253 + h\cdot f{\left(\frac{1}{5},1.19704445533253 \right)} = 1.19704445533253 + \frac{1}{10} \cdot 0.960789439152323 = 1.29312339924777$

$y_{3} = y{\left(t_{3} \right)} = y{\left(\frac{3}{10} \right)} = y_{2} + \frac{h}{2} \left(f{\left(t_{2},y_{2} \right)} + f{\left(t_{3},\tilde{y}_{3} \right)}\right) = 1.19704445533253 + \frac{h}{2} \left(f{\left(\frac{1}{5},1.19704445533253 \right)} + f{\left(\frac{3}{10},1.29312339924777 \right)}\right) = 1.19704445533253 + \frac{\frac{1}{10}}{2} \left(0.960789439152323 + 0.913931185271228\right) = 1.29078048655371$

### Step 4

$t_{4} = t_{3} + h = \frac{3}{10} + \frac{1}{10} = \frac{2}{5}$

$\tilde{y}_{4} = \tilde{y}{\left(t_{4} \right)} = \tilde{y}{\left(\frac{2}{5} \right)} = y_{3} + h\cdot f{\left(t_{3},y_{3} \right)} = 1.29078048655371 + h\cdot f{\left(\frac{3}{10},1.29078048655371 \right)} = 1.29078048655371 + \frac{1}{10} \cdot 0.913931185271228 = 1.38217360508083$

$y_{4} = y{\left(t_{4} \right)} = y{\left(\frac{2}{5} \right)} = y_{3} + \frac{h}{2} \left(f{\left(t_{3},y_{3} \right)} + f{\left(t_{4},\tilde{y}_{4} \right)}\right) = 1.29078048655371 + \frac{h}{2} \left(f{\left(\frac{3}{10},1.29078048655371 \right)} + f{\left(\frac{2}{5},1.38217360508083 \right)}\right) = 1.29078048655371 + \frac{\frac{1}{10}}{2} \left(0.913931185271228 + 0.852143788966211\right) = 1.37908423526558$

### Step 5

$t_{5} = t_{4} + h = \frac{2}{5} + \frac{1}{10} = \frac{1}{2}$

$\tilde{y}_{5} = \tilde{y}{\left(t_{5} \right)} = \tilde{y}{\left(\frac{1}{2} \right)} = y_{4} + h\cdot f{\left(t_{4},y_{4} \right)} = 1.37908423526558 + h\cdot f{\left(\frac{2}{5},1.37908423526558 \right)} = 1.37908423526558 + \frac{1}{10} \cdot 0.852143788966211 = 1.4642986141622$

$y_{5} = y{\left(t_{5} \right)} = y{\left(\frac{1}{2} \right)} = y_{4} + \frac{h}{2} \left(f{\left(t_{4},y_{4} \right)} + f{\left(t_{5},\tilde{y}_{5} \right)}\right) = 1.37908423526558 + \frac{h}{2} \left(f{\left(\frac{2}{5},1.37908423526558 \right)} + f{\left(\frac{1}{2},1.4642986141622 \right)}\right) = 1.37908423526558 + \frac{\frac{1}{10}}{2} \left(0.852143788966211 + 0.778800783071405\right) = 1.46063146386746$

$y{\left(\frac{1}{2} \right)}\approx 1.46063146386746$A