Second Order Linear ODE Solver: How it works
| Description How it works Examples: Motion under gravity RLC circuit analysis |
This tool uses the Data Table feature to plot 250 values of the function over the specified range. The 4th order Runge-Kutta method is used to calculate the first 3 values of the solution. These calculations are performed in columns AC to AM. Following this, the Adams-Bashforth/Adams-Moulton method is used to get the rest of the solution. The computations are performed in columns W through AB. Why not Runge Kutta method all the way ?In my first few attempts at developing this spreadsheet, I tried using the 4th order RK method to evaluate the complete solution. The end result was a disaster - though the solution is obtained, the calculations are very slow. This is due to the high number of function evaluations required for the RK method. A better approach is to use a multistep or continuing method, where the values from several previously computed steps is used to obtain the next value. The The Adams-Bashforth method requires slightly more than one-forth the number of function evaluations required for the 4th order RK method, drastically improving the speed of computation. However, the method is not a self starting method and hence the RK method is required to get the starting values. Note that since we are using high order accuracy methods (both 4th order RK and Adams-Bashforth/Adams Moulton methods have errors of order O(h5).), we only need 250 points over the interval, much less than the 1000 points used in the Function Calculus tool. Do bear in mind that numerical methods have limitations and these must be kept in mind while using them or while interpreting the results obtained from them. Read this wiki page on numerical methods for an overview. |