0
$\begingroup$

I am wondering if it is possible to derive Eulers method without doing it graphically.

I am trying to give a detailed derivation of Eulers method, and how the formula is found

$$y_i=y_{i-1}+hf(x_{i-1},y_{i-1})$$

If anyone could derive this formula and show how its found would be great, or even a link to a website/textbook. Thanks!

$\endgroup$
1
$\begingroup$

Here's one simple way to discover Euler's method for solving the differential equation $y'(x) = f(x,y(x))$. You know that $$y(x_i) \approx y(x_{i-1}) + y'(x_{i-1})\Delta x = y(x_{i-1}) + f(x_{i-1}, y(x_{i-1})) \Delta x.$$ That comes directly from the definition of the derivative. Unfortunately, $y(x_{i-1})$ is unknown, but at least we have the approximation $y_{i-1}$ that we already computed at the last iteration. This suggests approximating $y(x_i)$ by the number $y_i$ given by $$ y_i = y_{i-1} + f(x_{i-1}, y_{i-1}) \Delta x. $$

$\endgroup$
0
$\begingroup$

Euler's Step Method attempts to find the solution of an ODE numerically.

You are given an initial value, of $y$, and you want to use the gradient of the function to calculate subsequent values.

I will assume that $f(x_{i-1},y_{i-1})$ is the gradient function. Thus, plugging $x$ and $y$ values into this equation will provide the gradient at a particular point.

Recall that the gradient is the change in the $y$-value divided by a change in $x$. Thus, multiplying your step-size of $h$ by the gradient will estimate the change in the $y$-value. You then add this to the $y$-value at the point to get the new $y$-value of $y_{i}$.

As the step-size gets smaller, one obtains a better approximation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.