solving ODE using numerical methods

program to solve ODE using different numerical methods
312 téléchargements
Mise à jour 16 oct. 2019

Afficher la licence

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

Citation pour cette source

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. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2013a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

Version Publié le Notes de version
1.0.0.1

nil

1.0.0.0

fig
none