Heun's method: Difference between revisions

Content deleted Content added
No edit summary
Reverting edit(s) by 193.49.248.18 (talk) to rev. 1184167418 by Remsense: Vandalism (RW 16.1)
 
(11 intermediate revisions by 11 users not shown)
Line 1:
{{Short description|Procedure for solving ODEs}}
In [[mathematics]] and [[computational science]], '''Heun's method''' may refer to the '''improved'''<ref>{{Citation | last1=Süli | first1=Endre | last2=Mayers | first2=David | title=An Introduction to Numerical Analysis | publisher=[[Cambridge University Press]] | isbn=0-521-00794-1 | year=2003}}.</ref> or '''modified Euler's method''' (that is, the '''explicit trapezoidal rule'''<ref>
{{Citation | last1=Ascher | first1=Uri M. | last2=Petzold | first2=Linda R.|author2-link=Linda Petzold | title=Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations | publisher=[[Society for Industrial and Applied Mathematics]] | ___location=Philadelphia | isbn=978-0-89871-412-8 | year=1998}}.</ref>), or a similar two-stage [[Runge–Kutta method]]. It is named after [[Karl Heun]] and is a [[numerical analysis|numerical]] procedure for solving [[ordinary differential equation]]s (ODEs) with a given [[Initial value problem|initial value]]. Both variants can be seen as extensions of the [[Euler method]] into two-stage second-order Runge–Kutta methods.
Line 15 ⟶ 16:
 
Where the solution curve is concave up, its tangent line will underestimate the vertical coordinate of the next point and vice versa for a concave down solution. The ideal prediction line would hit the curve at its next predicted point. In reality, there is no way to know whether the solution is concave-up or concave-down, and hence if the next predicted point will overestimate or underestimate its vertical value. The concavity of the curve cannot be guaranteed to remain consistent either and the prediction may overestimate and underestimate at different points in the ___domain of the solution.
Heun's Method addresses this problem by considering the interval spanned by the tangent line segment as a whole. Taking a concave-up example, the left tangent prediction line underestimates the slope of the curve for the entire width of the interval from the current point to the next predicted point. If the tangent line at the right end point is considered (which can be estimated using Euler's Method), it has the opposite problem.<ref>{{cite web
<ref>{{cite web
|title=Numerical Methods for Solving Differential Equations
|publisher=San Joaquin Delta College
Line 36:
 
==Derivation==
:<math>\text{Slope}_{\text{left}} = f(z_ix_i, y_i)</math>
:<math>\text{Slope}_{\text{right}} = f(z_ix_i + h, y_i + h f(z_ix_i, y_i))</math>
:<math>\text{Slope}_{\text{ideal}} = (\frac{1/}{2)} (\text{Slope}_{\text{left}} + \text{Slope}_{\text{right}})</math>
 
Using the principle that the slope of a line equates to the rise/run, the coordinates at the end of the interval can be found using the following formula:
Line 52:
 
The accuracy of the Euler method improves only linearly with the step size is decreased, whereas the Heun Method improves accuracy quadratically
.<ref>{{cite web|url=http://livetoad.org/Courses/Documents/214a/Notes/euler-heun_method.pdf|title=The Euler-Heun Method|last=|first=|date=|website=|publisher=LiveToad.org|url-status=dead|archive-url=https://web.archive.org/web/20181014204120/http://livetoad.org/Courses/Documents/214a/Notes/euler-heun_method.pdf|archive-date=2018-10-14|access-date=}}</ref> The scheme can be compared with the [[Explicit and implicit methods|implicit]] [[trapezoidal method]], but with <math>f(t_{i+1},y_{i+1})</math> replaced by <math>f(t_{i+1},\tilde{y}_{i+1})</math> in order to make it explicit. <math>\tilde{y}_{i+1}</math> is the result of one step of [[Euler's method]] on the same initial value problem. So, Heun's method is a [[predictor-corrector method]] with forward [[Euler's method]] as predictor and [[trapezoidal method]] as corrector.
.<ref>{{cite web
|title=The Euler-Heun Method
|publisher=LiveToad.org
|url=http://livetoad.org/Courses/Documents/214a/Notes/euler-heun_method.pdf
}}</ref> The scheme can be compared with the [[Explicit and implicit methods|implicit]] [[trapezoidal method]], but with <math>f(t_{i+1},y_{i+1})</math> replaced by <math>f(t_{i+1},\tilde{y}_{i+1})</math> in order to make it explicit. <math>\tilde{y}_{i+1}</math> is the result of one step of [[Euler's method]] on the same initial value problem. So, Heun's method is a [[predictor-corrector method]] with forward [[Euler's method]] as predictor and [[trapezoidal method]] as corrector.
 
==Runge–Kutta method==
Line 71 ⟶ 67:
|}
 
The other method referred to as Heun's method (also known as Ralston's method) has the Butcher tabletableau:<ref>
{{Citation | last1=Leader | first1=Jeffery J.| title=Numerical Analysis and Scientific Computation | publisher=[[Addison-Wesley]] | ___location=Boston | isbn=0-201-73499-0 | year=2004}}.</ref>