image thumbnail

Numerical methods vs analytical methods for Differential equations

version 1.0.0.0 (2.12 KB) by Praveen Ranganath
This code compares the analytical solution with the numerical solutions of a simple first order ODE

1.3K Downloads

Updated 01 Aug 2013

View License

Euler's method, Modified Euler's method and RK4 methods have been used to obtain approximate solutions of the differential equation dy/dx = x *sqrt(y), with y(2)=4 as the Initial condition. The solutions obtained have been compared against the analytical solution in the first plot. In the second, the errors have been compared. Finally, the time for each algorithm is displayed on the command window.

Cite As

Praveen Ranganath (2021). Numerical methods vs analytical methods for Differential equations (https://www.mathworks.com/matlabcentral/fileexchange/42908-numerical-methods-vs-analytical-methods-for-differential-equations), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
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!