Example 1. Using the Euler method, find the values of the solution of the equation $y^{\prime}=y+x^{2}$, satisfying the condition $y(0)=1$, at the first five points of the interval $[0 ; 0.5]$ for $h=0.1$.
Solution. According to formula (14.2), we find the points $x_{0}=0 ; x_{1}=0.1$; $x_{2}=0.2 ; \quad x_{3}=0.3 ; \quad x_{4}=0.4 ; \quad x_{5}=0.5$. The values of the sought function $y=y(x)$, satisfying the conditions of the given Cauchy problem, are found in accordance with formula (14.3). The results of the calculations are reflected in Table 14.1.

Remark. The exact solution of the equation $y^{\prime}=y+x^{2}$, satisfying the condition $y(0)=1$, is expressed by the formula $y=3 e^{x}-x^{2}-2 x-2$. Consequently, $y(0.4)=3 e^{0.4}-(0.4)^{2}-2 \cdot(0.4)-2=1.5154$.

Table 14.1

| $\mathrm{k}$ | $x_{k}$ | $x_{k}^{2}$ | $y_{k}$ | $f\left(x_{k}, y_{k}\right)=$  $=y_{k}+x_{k}^{2}$ | $h f\left(x_{k}, y_{k}\right)=$  $=0.1\left(y_{k}+x_{k}^{2}\right)$ | $y_{k+1}=y_{k}+$  $+h f\left(x_{k}, y_{k}\right)$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 0 | 0 | 0 | 1 | 1 | 0.1 | 1.1 |
| 1 | 0.1 | 0.01 | 1.1 | 1.11 | 0.111 | 1.211 |
| 2 | 0.2 | 0.04 | 1.211 | 1.251 | 0.1251 | 1.3361 |
| 3 | 0.3 | 0.09 | 1.3361 | 1.4261 | 0.1426 | 1.4787 |
| 4 | 0.4 | 0.16 | 1.4787 | 1.6387 | 0.1639 | 1.6426 |