"); hg.document.close(); } function ptip(){ hg=window.open('','','toolbar=no,width=400,height=100,top=0,left=0'); hg.document.open(); hg.document.writeln(""); hg.document.writeln("Positive definite "); hg.document.close(); } function sclose(){ hg.window.close(); }
Modified Euler's Method :

The Euler forward scheme may be very easy to implement but it can't give accurate solutions.    A  very small step size is required for any meaningful result.  In this scheme, since, the starting point of each sub-interval is used to find the slope of the solution curve,  the solution would be correct only if the function is linear. So an improvement over this is to take the arithmetic average of the slopes at xi  and xi+1(that is, at the end points of each sub-interval). The scheme so obtained is called modified Euler's method. It works first by approximating a value to yi+1 and then improving it by making use of average slope.
 

yi+1 = yi+ h/2 (y'i + y'i+1)
= yi + h/2(f(xi, yi) + f(xi+1, yi+1))

 If Euler's method is used to find the first approximation of yi+1 then 

yi+1 = yi + 0.5h(fi  + f(xi+1, yi + hfi))

Truncation error:

yi+1 = yi + h y' + h2yi'' /2  + h3yi''' /3! + h4yiiv /4! + . . .
fi+1 = y'i+1  y'i + h y'' + h2yi'''' /2  + h3yiiv /3! + h4yiv /4! + . . .

By substituting these expansions in the Modified Euler formula gives

yi + h y' + h2yi'' /2  + h3yi''' /3! + h4yiiv /4! + . . . = yi+ h/2 (y'i + y'i + h y''
                                                                                    h2yi'''' /2  + h3yiiv /3! + h4yiv /4! + . . . )

So the truncation error is: - h3yi''' /12 - h4yiiv /24 + . . .  that is, Modified Euler's method is of order two. 
 

Worked out problems
Example 1 Find   y(1.0)   accurate  upto  four decimal places using Modified Euler's method by solving the IVP  y' = -2xy2,  y(0) = 1 with step length 0.2. Solution
Example 2 Find  y  in  [0,3] by solving the initial value problem y' = (x - y)/2,  y(0) = 1.  Compare solutions for h = 1/2, 1/4 and 1/8. Solution
Example 3 Find y(0.1) for y' = x - y2,  y(0) = 1 correct upto four decimal places. Solution
Example 4 Find y at x = 1.1 and 1.2 by solving y' = x2 + y2 ,  y(1) = 2.3 Solution

 
 
Problems to workout



Solution of Transcendental Equations | Solution of Linear System of Algebraic Equations | Interpolation & Curve Fitting
Numerical Differentiation & Integration | Numerical Solution of Ordinary Differential Equations
Numerical Solution of Partial Differential Equations