Numerical approximation is a method used to find an approximate solution when an exact analytical solution is difficult or impossible to obtain. Euler’s Method is one simple technique of numerical approximation, particularly for solving ODEs.Euler’s Method works by using a point on the function, along with the slope given by the derivative, to "step" towards the desired point by a defined interval length (the step size \(h\)). This repeated stepping gives an approximation of the function.Here's how it’s done:
- Start with the initial condition \(y_0\).
- Calculate the next point \(y_1\) using the formula:\[ y_{n+1} = y_n + h \cdot f(x_n, y_n) \]where \( f(x, y) = -y \).
- Continue this process iteratively to calculate further points.
The choice of step size \(h\) affects accuracy. A smaller \(h\) leads to a solution that is closer to the exact one, as demonstrated by approximating at \(x = 0.5\) with \(h = 0.25\) and \(h = 0.1\). For our problem, the numerical approximation with \(h = 0.1\) (), turns out to be closer to the actual solution than using \(h = 0.25\). However, smaller step sizes mean more calculations, which must be balanced against computational efficiency.