Mathematica: Adams Bashforth-Moulton method and its errors

In summary, the conversation is about using the Adams method in Mathematica to numerically solve a system of differential equations. The Adams method is implemented through a predictor-corrector algorithm, which can be added to NDSolve by using "Method -> AdamsBM". The code for this method can be found in the provided link. The user is interested in calculating the error of the method and comparing it to other numerical methods. They suggest using a simple differential equation with an exact analytical solution to test the accuracy of the Adams method, and then moving on to more difficult equations.
  • #1
Kortirion
8
0
Greetings PF. I am new to the subject of numerical methods and I'm interested in using the Adams method in Mathematica, this one with a predictor-corrector algorithm, to numerically solve a system of differential equations (first-order system).

As I'm pretty green I was reading this page http://reference.wolfram.com/mathematica/tutorial/NDSolvePlugIns.cdf and its section on the Adams method. I don't have the skill to make a more efficient algorithm than the one prescribed in there, so I just copy-pasted all the necessary code into my Mathematica notebook. With this I could use it within NDSolve by adding "Method -> AdamsBM".

It works, rolls ok with my system and when I take the difference in solutions of the "regular" unspecified method of NDSolve with this AdamsBM method, there's some difference depending on the working precision I tell AdamsBM to work in. So they really are different and this "working precision" plays some role.

What I'm really interested in at this point is the error of this numerical AdamsBM method. So in short - how do I calculate this error? How do I know that this AdamsBM is better than the other for example? I've read around a bit on the internet but couldn't find anything that fits my level of understanding regarding this subject.

Actually I have some other questions as well, but they are tied in with this question about the error of the method at hand. I think it's a good starting point.

Any advice or help is most appreciated, whether it's about the Adams method in general or any of its specifics. Thanks in advance!
 
Physics news on Phys.org
  • #2
Can you give me the code. The link that you gave me broken
 
  • #3
What if you selected a DE that was simple enough that there is an exact analytical solution available? Then run the Adams and the NDSolve and compare the results with the exact solution? Then choose another DE with an exact solution, but that is more difficult for the numerical methods. Repeat as needed.
 

Related to Mathematica: Adams Bashforth-Moulton method and its errors

1. What is the Adams Bashforth-Moulton method?

The Adams Bashforth-Moulton method is an algorithm used for solving ordinary differential equations (ODEs). It is a predictor-corrector method that combines the Adams Bashforth method, which is a predictor, with the Adams Moulton method, which is a corrector. It is commonly used for solving stiff ODEs, as it is more accurate and efficient than other methods.

2. How does the Adams Bashforth-Moulton method work?

The Adams Bashforth-Moulton method uses a combination of explicit and implicit formulas to approximate the solution of an ODE. The explicit Adams Bashforth method predicts the next value of the solution, while the implicit Adams Moulton method corrects this prediction by taking into account the previous values. This process is repeated until the desired accuracy is achieved.

3. What are the advantages of using the Adams Bashforth-Moulton method?

The Adams Bashforth-Moulton method has several advantages over other ODE solvers. It is a higher-order method, meaning it can achieve a higher level of accuracy with fewer computational steps. It is also more efficient than other methods, making it a popular choice for solving stiff ODEs. Additionally, it can handle a wide range of ODEs, including those with variable coefficients.

4. What are the sources of errors in the Adams Bashforth-Moulton method?

There are several sources of errors in the Adams Bashforth-Moulton method. The main source is the truncation error, which is caused by the use of finite difference approximations. This error can be reduced by using a higher-order method or by decreasing the step size. Another source of error is the round-off error, which is caused by the limitations of computer arithmetic. This error can be reduced by using a computer with higher precision or by implementing error control techniques.

5. How can I assess the accuracy of the Adams Bashforth-Moulton method?

The accuracy of the Adams Bashforth-Moulton method can be assessed by comparing the results with the exact solution of the ODE, if known. This can be done by calculating the error at each time step or by plotting the numerical solution and the exact solution on the same graph. Additionally, the accuracy can also be evaluated by varying the step size and observing how it affects the error. A smaller step size usually results in a more accurate solution.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
7K
  • Other Physics Topics
Replies
2
Views
448
  • Programming and Computer Science
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Replies
5
Views
3K
Replies
16
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top