Ludium
Sign In
Differential Equations
The Geometric View of ODEs
01Direction Fields and the Geometric View of ODEs02Integral Curves and the Isocline Method03Perpendicular Isoclines: The Circles of y' = -x/y04Isocline Corridors and a Trap for Solutions05Existence and Uniqueness: One Curve Through a Point06Where Existence and Uniqueness FailProblem set0/10Problem set 20/10MIT problem set0/3Practice∞
Numerical Methods
01Euler's Method and Its Three Equations02Euler's Method by Hand: Building the Table03Convexity and the Sign of Euler's Error04First Order Error: Halve the Step, Halve the Error05Improved Euler (RK2): Averaging Two Slopes06Runge-Kutta 4 and the Price of Accuracy07Singular Points: Where Every Method FailsProblem set0/10Problem set 20/10MIT problem set0/1Practice∞
First-Order Linear Equations
01First Order Linear: Standard Form and the Sign of p02The Conduction-Diffusion Model: Newton's Law of Cooling03The Integrating Factor and the Four-Step Method04Integrating Factors: Two Mistakes and a Trick Question05Constant Coefficients: Steady State and TransientProblem set0/10Problem set 20/10MIT problem set0/1Practice∞

Improved Euler (RK2): Averaging Two Slopes

Why does averaging the slope where you stand with the slope at the end of the strut drop the error from $Ch$ to $C_2h^2$?


Loading…

←Previous First Order Error: Halve the Step, Halve the ErrorNext Runge-Kutta 4 and the Price of Accuracy →

Your summary note

    1. 1

      Polling the direction field twice

      Describe taking the Euler slope An=f(xn,yn)A_n = f(x_n, y_n)An​=f(xn​,yn​) where you stand and the slope BnB_nBn​ at the endpoint of the Euler strut, then stepping with their average (An+Bn)/2(A_n + B_n)/2(An​+Bn​)/2.

    2. 2

      The equations of the method

      Write xn+1=xn+hx_{n+1} = x_n + hxn+1​=xn​+h, the temporary value y~n+1=yn+hAn\tilde y_{n+1} = y_n + h A_ny~​n+1​=yn​+hAn​ with Bn=f(xn+1,y~n+1)B_n = f(x_{n+1}, \tilde y_{n+1})Bn​=f(xn+1​,y~​n+1​), and the final yn+1=yn+hAn+Bn2y_{n+1} = y_n + h\frac{A_n + B_n}{2}yn+1​=yn​+h2An​+Bn​​, marking y~n+1\tilde y_{n+1}y~​n+1​ as temporary.

    3. 3

      The four names

      Record that Heun, Improved Euler, Modified Euler, and RK2 all name the same method, and that RK stands for Runge–Kutta.

    4. 4

      Second order accuracy error≈C2h2\text{error} \approx C_2 h^2error≈C2​h2

      State that the method is second order with error scaling like C2h2C_2 h^2C2​h2, and note that halving hhh quarters the error.

    Attempt 1 of 2