solving ODE using numerical methods

program to solve ODE using different numerical methods
314 Downloads
Aktualisiert 16. Okt 2019

Lizenz anzeigen

A most general form of an ordinary differential equation (ode) is given by f( x, y, y', . . ., y(m) ) = 0
where x is the independent variable and y is a function of x. y', y'' . . . y(m) are respectively, first, second and mth derivatives of y with respect to x. ref: https://mat.iitm.ac.in/home/sryedida/public_html/caimna/ode/intro.html
example :
program to solve 1st Order differential Equation using different numerical methods
comparing the results with ODE45 and to find max error for a user defined step size " h "
enter the function in form of @(x,y): @(x,y)cos(x)-log(y)
enter initial "x" value : 1
enter final "x" value : 3
enter initial "y" value : 1
enter "h" value : 0.1
maximum error ode45 vs Euler= 0.030403 with step size h= 0.1
maximum error ode45 vs RK-4= 1.3012e-06 with step size h= 0.1
maximum error ode45 vs Heuns(Rk-2)= 0.00095811 with step size h= 0.1
maximum error ode45 vs Midpoint= 0.0009912 with step size h= 0.1
maximum error ode45 vs Backward Eulers= 0.044459 with step size h= 0.1

Zitieren als

N Narayan rao (2024). solving ODE using numerical methods (https://www.mathworks.com/matlabcentral/fileexchange/60517-solving-ode-using-numerical-methods), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2013a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

Version Veröffentlicht Versionshinweise
1.0.0.1

nil

1.0.0.0

fig
none