Solving Freedom System using Runge Kutta and Adams Bashford method
Show older comments

Hi I am looking to solve the above system using both Runge Kutta 4th order and Adams Bashford 4th order. The initial conditions are as follows;
x1(0)=-2
x2(0)=5
dx1/dt(0)=1
dx2/dt(0)=-3
m1=2
m2=5
k1=2
k2=4
k3=6
c1=0.06
c2=0.04
c3=0.02
Any help would be highly appreciated about where to start with the code thanks in advance.
2 Comments
Hi @Lucy Martin
Good to know that you have enthusiasm about starting to write the code yourself. It will be a good learining experience.
First of all, can you provide the formulas in Runge–Kutta and Adams–Bashford 4th-order methods? I do not memorize them and it is absolutely a positive way to contribute something on your part too.
There are generally 3 parts in the numerical method:
- the dynamical system (the governing equations derived from some fundamental laws and practical assumptions)
- user-defined parameters (initial values, constants and customized variables that you can change)
- the numerical solver (selection of step size, and the algorithm used to perform numerical integration of ODEs)
Item #1 is shown on the image (though you need to rearrange the ODEs for the numerical integration purposes). Item #2 is provided. For Item #3, you need to provide the step size which affects the desired accuracy of the numerical solution. The formulas for the numerical solvers must be listed out.
These are the basic preparations before writing the code.
Lucy Martin
on 31 Mar 2022
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
