image thumbnail

Modified Euler Method

version 1.0.1 (1.27 KB) by Manotosh Mandal
Matlab codes for Modified Euler Method for numerical differentiation


Updated 27 Aug 2019

View License

Euler's method is used as the foundation for Heun's method. Euler's method uses the line tangent to the function at the beginning of the interval as an estimate of the slope of the function over the interval, assuming that if the step size is small, the error will be small. However, even when extremely small step sizes are used, over a large number of steps the error starts to accumulate and the estimate diverges from the actual functional value.


Enter initial value of x i.e. x0: 0

Enter initial value of y i.e. y0: 0.5

Enter the final value of x: 2

Enter the step length h: 0.2

x y
0.000 0.500
0.200 0.630
0.400 0.833
0.600 1.124
0.800 1.523
1.000 2.054
1.200 2.746
1.400 3.634
1.600 4.762
1.800 6.181
2.000 7.957 >>

Cite As

Manotosh Mandal (2022). Modified Euler Method (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!