Suppose that we use Euler's method to approximate the solution to the differential equation
$\frac{dy}{dx} = \frac{x^2}{y}$; $y(0.5) = 9$.
Let $f(x, y) = x^2/y$.
We let $x_0 = 0.5$ and $y_0 = 9$ and pick a step size $h = 0.2$. Euler's method is the the following algorithm. From $x_n$ and $y_n$, our approximations to the
solution of the differential equation at the nth stage, we find the next stage by computing
$x_{n+1} = x_n + h$, $y_{n+1} = y_n + hf(x_n, y_n)$.
Complete the following table. Your answers should be accurate to at least seven decimal places.
\begin{tabular}{|c|c|c|}
\hline
n & $x_n$ & $y_n$ \\
\hline
0 & 0.5 & 9 \\
1 & 0.7 & \\\
2 & 0.9 & \\\
3 & 1.1 & \\\
4 & 1.3 & \\\
5 & 1.5 & \\\
\hline
\end{tabular}
The exact solution can also be found using separation of variables. It is
y(x) =
Thus the actual value of the function at the point $x = 1.5$
y(1.5) =