"); 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(); }  
Example 3:
Using Taylor series method, find y(0.1) for y' = x - y2 ,  y(0) = 1 correct upto four decimal places.

Solution:
Given y' = f(x,y) = x - y2

Þ y''   = 1 - 2yy',     y''' = -2yy'' - 2y'2,     yiv  = -2yy''' - 6y'y'',    yv  =  -2yyiv -8y'y''' -6y''2

Since at x = 0, y = 1;

y' = -1,     y'' = 3,     y''' = -8,     yiv  = 34    and    yv  = -186

The forth order Taylor's formula is

y(x) = y(x0) + (x-x0) y'(x0, y0) + (x-x0)2 y''(x0, y0)/2! + (x-x0)3 y'''(x0, y0)/3! + 
                                                                        (x-x0)4 yiv(x0, y0)/4! + h5yv(x0, y0)/5! +. . .

       = 1 - x + 3 x2/2! - 8 x3/3! + 34 x4/4! - 186 x5/5!                         (since x0 = 0)

       = 1 - x + 3 x2/2 - 4 x3/3 + 17 x4/12 - 31 x5/20
 

Now
y(0.1) = 1 - (0.1) + 3 (0.1)2/2 - 4 (0.1)3/3 + 17 (0.1)4/12 - 31 (0.1)5/20
          = 0.9 + 3 (0.1)2/2 - 4 (0.1)3/3 + 17 (0.1)4/12 - 31 (0.1)5/20
          = 0.915  - 4 (0.1)3/3 + 17 (0.1)4/12 - 31 (0.1)5/20
          = 0.9137 + 17 (0.1)4/12 - 31 (0.1)5/20
          = 0.9138 - 31 (0.1)5/20
          = 0.9138

Since the value of the last term does not add upto first four decimal places, the Taylor series formula of order four is sufficient to find y(0.1) accurate upto four decimal places. 

The range of values of x for which the above series truncated after the term containing x4, to compute y accurate upto four decimal places, can computed using

31 x5 / 20 £ 0.00005 
Þ  x £ 0.126