"); 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(); }
Euler's Method :

Though in principle it is possible to use Taylor's method of any order for the given initial value problem to get good approximations, it has few draw backs like

  • The scheme assumes the existence of all higher order derivatives for the given function f(x,y) which is not a requirement for the existence of the solution for any first order initial value problem.
  • Even the existence of these higher derivatives is guaranteed it may not be easy to compute them for any given f(x,y).
  • Because of the usage of higher order derivatives in the formula it is not convenient to write computer programs , that is the method is more suited for hand calculations. 
To overcome these difficulties, Euler developed a scheme by approximating y' in the given ivp.  The scheme is as follows:

The derivative term in the first order ivp 

y' = f(x, y) , y(x0) = y0
is approximated  by making use of Taylor series approximation of the dependent variable y(x) at the point xi+1.  That is
y(xi+1) = y(xi+ Dx) = y(xi) + Dxy'(xi) + (Dx2 / 2)y''(xi) + . . .
            = y(xi) + Dxf(xi, yi) + (Dx2 / 2)y''(xi) + . . . 
(... y'(xi) = f(xi, yi))
if the infinite series is truncated from the term Dx2 onwards, then
y(xi+1) = y(xi) + Dx y'(xi) (or)
yi+1 = yi + Dx fi    for all i
That is,
for i = 0,      y1 = y0 + Dx f0
     i = 1,      y2 = y1 + Dx f1
     !
     i = n-1,   yn = yn-1 + Dx fn-1

Since y0 and hence f0 are known (from initial condition) in the equation corresponding to i = 0, all the terms on the r.h.s are known.  So y1 that is, y at x1 is calculated easily from this equation. Similarly once y1 is known, r.h.s of the equation corresponding to  i = 1 is also known so y2 can be computed. As we proceed in the same way until i = n-1, yn can be obtained.  This is an explicit method because in any equation there is only one unknown which can be separated to the left side of the equation.

Local truncation error : 

The error in the approximation, that is  the difference between the exact solution at xi+1 and the numerical solution yi+1 is called the local truncation error (assumed that yi+1 is calculated with exact arithmetic with out any round off error). 

Ti+1 = y(xi+1) - yi+1
        = y(xi+1) - yi - Dxfi
       = h2/2 y'(x) (by Taylor series & remainder theorem)

where xi < x < xi+1. Hence the order of the local truncation error for Euler scheme is
O(Dx2) as Dx ® 0

Geometrical Interpretation :

Geometrically Euler's formula is nothing but approximating the slope of the solution curve with the function value f(xi,yi) at the starting point of the each subinterval (xi, xi+1) for all i.
 

Worked out Examples
Example 1 Find y(0.5) if y is the solution of IVP   y' = -2x-y,   y(0) = -1 using Euler's method with step length 0.1. Also find the error in the approximation. Solution
Example 2 Use Euler's method to solve for y[0.1] from y' = x + y + xy, y(0) = 1  with  h = 0.01 also estimate how small h would need to obtain four decimal accuracy. Solution
Example 3 Solve the differential equation y' = x/y, y(0)=1 by Euler's method to get y(1). Use the step lengths h = 0.1 and 0.2 and compare the results with the analytical solution (y2 = 1 + x2) Solution
Example 4 Using Euler's method find the approximate solution of y' = (y - x)/(y + x), y(0) = 1.0 at x = 0.1 by taking h = 0.02 Solution
Example 5 Find y(0.8) with h = 0.1 from y' = y - 2x/y, y(0) = 1 using Euler's method 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