{"id":1750,"date":"2025-08-17T09:37:00","date_gmt":"2025-08-17T09:37:00","guid":{"rendered":"https:\/\/www.mathros.net.ua\/en\/?p=1750"},"modified":"2025-11-06T11:23:26","modified_gmt":"2025-11-06T11:23:26","slug":"milnes-method","status":"publish","type":"post","link":"https:\/\/www.mathros.net.ua\/en\/milnes-method.html","title":{"rendered":"Milne&#8217;s Method: A Simple Explanation and Step-by-Step Example"},"content":{"rendered":"<p>Milne&#8217;s method is a powerful technique for anyone aiming to confidently solve differential equations. If you are familiar with numerical methods, you already know that they help us find approximate solutions when analytical methods become too complex or even impossible. However, Milne&#8217;s method stands out due to its unique logic and efficiency. In this article, we\u2019ll dive into how Milne&#8217;s method works, explore why its <em>&#8220;predict-correct&#8221;<\/em> approach leads to great accuracy, and show you how to apply it with minimal effort. Not only will you gain a solid understanding of the theory behind it, but you&#8217;ll also see how this method is used in practice to solve specific problems.<\/p>\n<h2>What is Milne&#8217;s Method and Why is It So Popular?<\/h2>\n<p>Milne&#8217;s method is a convenient and quite accurate way to approximate solutions to the Cauchy problem for ordinary differential equations. It is part of the multistep methods, which means that each step uses several previous calculations to refine the result. Does it sound complicated? It\u2019s actually quite the opposite! Students and researchers frequently use this method because it\u2019s simple to implement.<\/p>\n<p>So, what makes Milne&#8217;s method stand out? The key is its <em>&#8220;predict-correct&#8221;<\/em> scheme. First, we make a prediction of the function&#8217;s value at a new point using the known values from previous steps. Then, we check the accuracy of the prediction and adjust it if needed. This two-step strategy enables Milne&#8217;s method to achieve better accuracy than simpler methods.<\/p>\n<h2>How to Apply Milne&#8217;s Method to a Cauchy Problem: Where to Start?<\/h2>\n<p>Let&#8217;s consider a standard Cauchy problem:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-10025194 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method1.jpg\" alt=\"Cauchy problem for an ordinary differential equation\" width=\"190\" height=\"15\" \/><\/p>\n<p>Here\u2019s what we need to do: First, we choose the integration step <em>h=[b-a]\/n<\/em>, and then we create a grid of points:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-10025195 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method2.jpg\" alt=\"Formula for calculating nodes and function values in Milne\u2019s method\" width=\"288\" height=\"15\" \/><\/p>\n<p>But there&#8217;s one important catch: to compute <em>y<sub>i+1<\/sub><\/em> using Milne\u2019s method, we need the values from the previous four steps. Where do we get these values from? Initially, we use one of the single-step methods\u2014such as <a title=\"How Euler\u2019s method works\" href=\"https:\/\/www.mathros.net.ua\/en\/eulers-method.html\">Euler&#8217;s<\/a> or <a title=\"Why is the Runge-Kutta method so effective\" href=\"https:\/\/www.mathros.net.ua\/en\/runge-kutta-method.html\">Runge-Kutta&#8217;s methods<\/a>. These methods help us calculate the first four values: <em>y<sub>0<\/sub><\/em>, <em>y<sub>1<\/sub><\/em>, <em>y<sub>2<\/sub><\/em>, <em>y<sub>3<\/sub><\/em>, and then Milne&#8217;s method takes over.<\/p>\n<h2>Step-by-Step Milne&#8217;s Algorithm: Predict \u2192 Correct<\/h2>\n<p>Once we have the first four points, we can proceed to calculate the next values (starting from <em>i=4<\/em>). The process is simple: first, predict, then correct. In the prediction step, we estimate the new point based on the previous derivatives <em>y&#8217;<sub>i-2<\/sub><\/em>, <em>y&#8217;<sub>i-1<\/sub><\/em>, <em>y&#8217;<sub>i<\/sub><\/em>. We get the predicted value:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-10025197 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method3.jpg\" alt=\"Milne\u2019s method prediction formula\" width=\"325\" height=\"28\" \/><\/p>\n<p>Next, we substitute <em>\u1ef9<sub>i+1<\/sub><\/em> into the equation to find <em>\u1ef9&#8217;<sub>i+1<\/sub>=f(x<sub>i+1<\/sub>, \u1ef9<sub>i+1<\/sub>)<\/em>. After that, we make the correction, which <em>&#8220;smooths&#8221;<\/em> the prediction between the neighboring nodes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025208 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method9.jpg\" alt=\"Milne\u2019s method correction formula\" width=\"295\" height=\"28\" \/><\/p>\n<p>Do we need to repeat the correction? Sometimes yes, but typically one round of <em>&#8220;predict <\/em><em>\u2192 correct&#8221;<\/em> is sufficient. We continue using the same pattern, calculating each step, and gradually build the solution for the entire interval.<\/p>\n<h3>Why These Formulas?<\/h3>\n<p>The idea is straightforward: we approximate the derivative <em>y&#8217;=f(x,y)<\/em> using <a title=\"Newton polynomial\" href=\"https:\/\/en.wikipedia.org\/wiki\/Newton_polynomial\" target=\"_blank\" rel=\"nofollow noopener\">Newton\u2019s interpolation polynomial<\/a> on a uniform grid, and then integrate this polynomial over the corresponding interval. For the prediction step, we use a third-order polynomial at the nodes <em>x<sub>i-3<\/sub><\/em>, <em>x<sub>i-2<\/sub><\/em>, <em>x<sub>i-1<\/sub><\/em>, <em>x<sub>i<\/sub><\/em>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025201 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method5.jpg\" alt=\"Third-order Newton interpolation polynomial formula\" width=\"803\" height=\"31\" \/><\/p>\n<p>Next, we approximate the integral of the derivative by integrating <em>P<sub>3<\/sub>(x)<\/em>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025203 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method6.jpg\" alt=\"Milne\u2019s method formula for computing the next value through the integral of the third-order interpolation polynomial\" width=\"144\" height=\"47\" \/><\/p>\n<p>Integrating the polynomial terms over the interval <em>[x<sub>i-3<\/sub>, x<sub>i+1<\/sub>]<\/em> gives the prediction formula:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025205 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method7.jpg\" alt=\"Milne\u2019s method prediction formula\" width=\"228\" height=\"28\" \/><\/p>\n<p>For correction, we use a second-order polynomial at the nodes <em>x<sub>i-1<\/sub><\/em>, <em>x<sub>i<\/sub><\/em>, <em>x<sub>i+1<\/sub><\/em>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025206 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method8.jpg\" alt=\"Second-order Newton interpolation polynomial formula\" width=\"420\" height=\"28\" \/><\/p>\n<p>After integrating <em>P<sub>2<\/sub>(x)<\/em> over the interval <em>[x<sub>i-1<\/sub>, x<sub>i+1<\/sub>]<\/em>, we get the corrector:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025210 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method10.jpg\" alt=\"Milne\u2019s method correction formula for computing yi+1 by integrating the polynomial and using the previous derivative values\" width=\"316\" height=\"47\" \/><\/p>\n<p>Here, in practice, the unknown <em>y&#8217;<sub>i+1<\/sub><\/em> is replaced with the approximate value <em>\u1ef9&#8217;<sub>i+1<\/sub>=f(x<sub>i+1<\/sub>, \u1ef9<sub>i+1<\/sub>)<\/em>. Thus, the formulas naturally emerge from interpolating y&#8217; on the grid and then integrating over the required segment.<\/p>\n<h2>The Advantage of Milne&#8217;s Method: More Data Equals a More Accurate Result<\/h2>\n<p>Unlike single-step methods, Milne&#8217;s method uses data from four previous points. This allows for a more accurate prediction of the next value, as it incorporates more data from the history of calculations. Additionally, the correction step helps control the error and adjust it when necessary by aligning the result with neighboring nodes. As a result, you obtain more stable values with better accuracy without significantly increasing computational effort. So, more data at the input leads to more reliable results at the output.<\/p>\n<h2>Applying Milne&#8217;s Method in Practice: A Step-by-Step Example<\/h2>\n<p>Now that we\u2019ve covered the theory, let&#8217;s see Milne&#8217;s method in action. Reading through the formulas is one thing, but actually working through a concrete example gives you a much clearer understanding of how convenient and effective this method is.<\/p>\n<h6>Example 1: We Have the Differential Equation y&#8217;=y-x with the Initial Condition y(0)=1.5. We Need to Find the Approximate solution to This Equation on the Interval [0, 1] and Compare the Results with the Exact Solution, Which is y(x)=0.5\u22c5e<sup>x<\/sup>+x+1<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025214 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method11.jpg\" alt=\"Plot of the exact solution to the differential equation and the approximated values calculated using Milne's method\" width=\"625\" height=\"350\" \/><\/p>\n<p>First, let\u2019s divide the interval <em>[0, 1]<\/em> into <em>8<\/em> equal parts, so the integration step is <em>h=0.125<\/em>. The nodes will be as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025215 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method12.jpg\" alt=\"Sequence of grid nodes for Milne's method: x0=0, x1=0.125, x2=0.25, x3=0.375, x4=0.5, x5=0.625, x6=0.75, x7=0.875, x8=1\" width=\"551\" height=\"15\" \/><\/p>\n<p>Since Milne\u2019s method is multistep, we need the first four values: <em>y<sub>0<\/sub><\/em>, <em>y<sub>1<\/sub><\/em>, <em>y<sub>2<\/sub><\/em>, <em>y<sub>3<\/sub><\/em>.<\/p>\n<p>To save time, we use an <a title=\"Runge-Kutta method calculator\" href=\"https:\/\/www.mathros.net.ua\/en\/runge-kutta-method-calculator.html\">online Runge-Kutta fourth-order method calculator<\/a> to quickly and accurately get these initial points. We input the equation <em>y&#8217;=y-x<\/em>, the initial condition <em>y(0)=1.5<\/em>, the exact solution, the interval <em>[0, 1]<\/em> and the number of parts <em>n=8<\/em>. The result gives us:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-10025242 aligncenter\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method16-1.jpg\" alt=\"Online Runge-Kutta fourth-order method calculator for computing the first four values y0, y1, y2, y3\" width=\"649\" height=\"1325\" \/><\/p>\n<p>These values are now our starting points for Milne&#8217;s method.<\/p>\n<p>Next, using the prediction and correction formulas, we proceed step by step to calculate the next values:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025220 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method14.jpg\" alt=\"Step-by-step calculations using Milne's method to find the values of y4-y8\" width=\"562\" height=\"415\" \/><\/p>\n<p>Now, let&#8217;s compare the results with the exact values:<\/p>\n<table class=\"simple-table\">\n<thead>\n<tr>\n<th><em>x<\/em><\/th>\n<th>Approximate <em>y<\/em><\/th>\n<th>Exact <em>y<\/em><\/th>\n<th>Error<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0.5<\/td>\n<td>2.32437<\/td>\n<td>2.32436<\/td>\n<td>0.00001<\/td>\n<\/tr>\n<tr>\n<td>0.625<\/td>\n<td>2.55913<\/td>\n<td>2.55912<\/td>\n<td>0.00001<\/td>\n<\/tr>\n<tr>\n<td>0.75<\/td>\n<td>2.8085<\/td>\n<td>2.8085<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>0.875<\/td>\n<td>3.07444<\/td>\n<td>3.07444<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>3.35914<\/td>\n<td>3.35914<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As we can see, the results are nearly perfect. The errors are either minimal or completely absent after just <em>8<\/em> steps.<\/p>\n<p>Milne&#8217;s method is not just another formula from a textbook. It\u2019s a powerful tool that delivers highly accurate results with minimal effort, especially when combined with methods like Runge-Kutta to set the initial values. Theory and practice work together beautifully here.<\/p>\n<h2>Want to Learn More? Other Interesting Numerical Methods for Solving Differential Equations<\/h2>\n<p>Milne&#8217;s method is undoubtedly one of the most effective ways to numerically solve differential equations. However, it\u2019s not the only one. There are many other methods in numerical analysis that are just as useful and effective. If you\u2019re interested and want to expand your knowledge, consider these methods:<\/p>\n<ol>\n<li><a title=\"Adams' method\" href=\"https:\/\/www.mathros.net.ua\/en\/adams-method.html\">Adams&#8217; Method<\/a>\u00a0&#8211; Another multistep approach that uses several previous data points to improve accuracy, allowing for more reliable predictions and reduced errors.<\/li>\n<li><a title=\"Modified Euler\u2019s method\" href=\"https:\/\/www.mathros.net.ua\/en\/modified-eulers-method.html\">Modified Euler\u2019s Method<\/a>\u00a0&#8211; An improved version of the classic Euler method. It averages the derivative between points for better accuracy without significantly increasing computational costs.<\/li>\n<li><a title=\"Runge-Kutta-Merson method\" href=\"https:\/\/www.mathros.net.ua\/en\/runge-kutta-merson-method.html\">Runge-Kutta-Merson Method<\/a>\u00a0&#8211; One of the most accurate methods, automatically controlling precision by adjusting the integration step. This makes it particularly useful for problems where minimizing error accumulation is essential.<\/li>\n<\/ol>\n<p>Each of these methods has its strengths and applications. By exploring them, you&#8217;ll be able to choose the right tool for any problem you encounter. In numerical analysis, there is no single <em>&#8220;perfect&#8221;<\/em> method\u2014only the one that best fits your particular needs.<\/p>\n<h2>Bring Mathematics to Code: Create Your Own Solution<\/h2>\n<p>Mastering Milne&#8217;s method allows you to solve complex problems not just on paper, but in your own programs. Imagine how much more efficient it would be to automate calculations, so you don\u2019t have to perform dozens of manual steps. Let your computer do the heavy lifting!<\/p>\n<p>You can use any programming language you&#8217;re comfortable with\u2014<a title=\"What is Python\" href=\"https:\/\/www.mathros.net.ua\/en\/what-is-python.html\"><em>Python<\/em><\/a>, <em>Java<\/em>, <em>C++<\/em>, or even <em>JavaScript<\/em>. The key is that the process should be clear and fun for you. Below is a flowchart illustrating Milne&#8217;s method algorithm step by step. It will help you quickly understand the logic behind the calculations and transfer it into code. Use it as a guide, adapt it to your needs, and create a program that will be your personal tool for precise and fast calculations.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10025266 size-full\" src=\"https:\/\/www.mathros.net.ua\/en\/wp-content\/uploads\/2025\/08\/milnes-method18.jpg\" alt=\"Flowchart of Milne\u2019s method algorithm for solving differential equations\" width=\"600\" height=\"1208\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Milne&#8217;s method is a powerful technique for anyone aiming to confidently solve differential equations. If you are familiar with numerical<\/p>\n","protected":false},"author":1,"featured_media":1756,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"template-centered.php","format":"standard","meta":{"footnotes":""},"categories":[207],"tags":[349,211,348,350,134],"class_list":["post-1750","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-solving-ordinary-differential-equations","tag-cauchy-problem","tag-differential-equations","tag-milnes-method","tag-multistep-methods","tag-numerical-methods"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/1750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/comments?post=1750"}],"version-history":[{"count":4,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/1750\/revisions"}],"predecessor-version":[{"id":1757,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/posts\/1750\/revisions\/1757"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/media\/1756"}],"wp:attachment":[{"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/media?parent=1750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/categories?post=1750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mathros.net.ua\/en\/wp-json\/wp\/v2\/tags?post=1750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}