 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
y ' = y - x, y(0) = 2
|
|
|
|
(this is the example we graphed before).
|
|
|
We'll
use Dx = 0.1 The choice of Dx is usually dictated by the
|
|
problem
or the situation. The smaller Dx is the more accurate the
|
|
approximated
solution will be, but of course you need to do more
|
|
|
work
to cover an interval of a given length.
|
|
|
For
the first step, we can use that x=0 and y=2,
therefore
|
|
|
y ' = 2.
Euler's method then tells us that:
|
|
|
y(x + Dx) = y(x) + f(x,y) Dx
|
|
|
y(0.1) = 1 + (2 - 0)
0.1 = 1.2
|
|