The Euler method is easy to implement but does not give an accurate result. Small step size is required to solve this. Here in this case the starting point of each interval is used to find the slope of the solution curve.
This solution will be correct if the function is linear. So an improvement is done by taking the arithmetic average of the slopes and . This scheme is called modified Euler’s Method. It works by approximating a value of and then improves it by making use of the average slope.
DERIVATION
In the improved Euler method, it starts from the initial value , it is required to find an initial estimate of by using the formula,
But this formula is less accurate than the improved Euler’s method so it is used as a predictor for an approximate value of .
Now the value of is obtained by,
The value of is corrected so the above formula is considered as the corrector formula.
Now, to distinguish the two different values of obtained from the predictor and the corrector formula are respectively denoted by
Thus we have,
Euler’s predictor-corrector method as the predictor formula,
And the corrector formula,
After finding the corrected estimate of we can proceed to evaluate the corrected values of , in the same process.
The generalized predictor and corrector formula as,
We start the initial value at and
And the approximation is:
In this way we get
The iterative process is repeated until the difference between two successive values of is within the prescribed limit of accuracy.
Generalizing we have modified Euler’s method as,
GRAPHICAL REPRESENTATION
Input:
A function f(x, y)
OUTPUT:
The value after calculation
PROCESS:
Step 1: [taking the input]
Read x[0], y[0] [the initial values of x and y]
Read h [the step difference]
Read x[n] [the final value of x]
Step 2: [defining the function f(x, y)]
Return xy + y
Step 3: [Modified Euler’s Method]
Set r[0] ← y[0]
Set i ← 1
While x[i - 1] < xn repeat
Set w ← 100.0
Set x[i] ← x[i - 1]+h
Set e[i] ← f(x[i - 1],y[i - 1])
Set c ← 0
While w > 0.0001 repeat
Set e1 ← f(x[i], r[c])
Set e2 ← (e[i] + e1)/2
Set r[c + 1] ← y[i - 1]+e2×h
Set w ← r[c] - r[c+1]
Set w ← absolute value of w
Set c ← c+1
[End of ‘while’ loop]
Set y[i] ← r[c]
[End of ‘while’ loop]
for j = 0 to i - 1 repeat
Print x[j], y[j]
[End of ‘for’ loop]
[End of ‘modified Euler’s Method]
ADVANTAGES
1. It is a simple and direct method.
2. It can be used for nonlinear IVPs.
DISADVANTAGES
1. It is less accurate.
2. It is a numerically unstable method.
3. Approximation error is proportional to h, the step size. If the value of h is small, then the accuracy is more.
APPLICATION
1. It is used in the dynamic analysis of structures.
Contributed by