piccards

Upload: hmxa91

Post on 24-Feb-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Piccards'

    1/7

    JUST THE MATHS

    UNIT NUMBER

    17.7

    NUMERICAL MATHEMATICS 7

    (Numerical solution)of

    (ordinary differential equations (B))

    by

    A.J.Hobson

    17.7.1 Picards method17.7.2 Exercises17.7.3 Answers to exercises

  • 7/25/2019 Piccards'

    2/7

    UNIT 17.7 - NUMERICAL MATHEMATICS 7

    NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL

    EQUATIONS (B)

    17.7.1 PICARDS METHOD

    This method of solving a differential equation approximately is one of successive approxi-mation; that is, it is an iterative method in which the numerical results become more andmore accurate, the more times it is used.

    An approximate value of y (taken, at first, to be a constant) is substituted into the righthand side of the differential equation

    dy

    dx =f(x, y).

    The equation is then integrated with respect to x giving y in terms ofx as a second approx-imation, into which given numerical values are substituted and the result rounded off to anassigned number of decimal places or significant figures.

    The iterative process is continued until two consecutive numerical solutions are the samewhen rounded off to the required number of decimal places.

    A hint on notationImagine, for example, that we wished to solve the differential equation

    dy

    dx= 3x2,

    given that y= y0= 7 when x= x0= 2.

    This ofcourse can be solved exactly to give

    y = x3 +C,

    which requires that7 = 23 +C.

    Hence,y 7 =x3 23;

    or, in more general termsy y0=x

    3 x3

    0.

    1

  • 7/25/2019 Piccards'

    3/7

    Thus, y

    y0

    dy=

    x

    x0

    3x2dx.

    In other words,

    x

    x0

    dy

    dxdx=

    x

    x0

    3x2dx.

    The rule, in future, therefore, will be to integrate both sides of the given differential equationwith respect to x, from x0 to x.

    EXAMPLES

    1. Given thatdy

    dx=x+y2,

    and that y = 0 when x = 0, determine the value of y when x = 0.3, correct to fourplaces of decimals.

    Solution

    To begin the solution, we proceed as follows:

    x

    x0

    dy

    dxdx=

    x

    x0

    (x+y2)dx,

    where x0= 0.

    Hence,

    y y0=

    x

    x0

    (x+y2)dx,

    where y0= 0.

    That is,

    y=

    x

    0

    (x+y2)dx.

    (a) First IterationWe do not know y in terms of x yet, so we replace y by the constant value y0 in thefunction to be integrated.

    The result of the first iteration is thus given, at x= 0.3, by

    y1=

    x

    0

    xdx= x2

    2 0.0450

    2

  • 7/25/2019 Piccards'

    4/7

    (b) Second IterationNow we use

    dy

    dx=x+y2

    1=x+

    x4

    4

    .

    Therefore, x

    0

    dy

    dxdx=

    x

    0

    x+

    x4

    4

    dx,

    which gives

    y 0 = x2

    2 +

    x5

    20.

    The result of the second iteration is thus given by

    y2= x2

    2 +

    x5

    20 0.0451

    at x= 0.3.

    (c) Third IterationNow we use

    dy

    dx=x+y2

    2

    =x+x4

    4 +

    x7

    20+

    x10

    400.

    Therefore,

    x0

    dy

    dx dx= x0

    x+

    x4

    4 +

    x7

    20+

    x10

    400

    dx,

    which gives

    y 0 = x2

    2 +

    x5

    20+

    x8

    160+

    x11

    4400.

    The result of the third iteration is thus given by

    y3= x2

    2 +

    x5

    20+

    x8

    160+

    x11

    4400 0.0451 at x= 0.3

    Hence, y= 0.0451, correct to four decimal places, at x= 0.3.

    2. Ifdy

    dx= 2

    y

    x

    and y = 2 when x = 1, perform three iterations of Picards method to estimate a valuefory whenx = 1.2. Work to four places of decimals throughout and state how accurateis the result of the third iteration.

    3

  • 7/25/2019 Piccards'

    5/7

    Solution

    (a) First Iteration

    x

    x0

    dydx

    dx=

    x

    x0

    2 y

    x

    dx,

    where x0= 1.

    That is,

    y y0=

    x

    x0

    2

    y

    x

    dx,

    where y0= 2.

    Hence,

    y 2 =

    x

    1

    2

    y

    x

    dx.

    Replacing y byy0= 2 in the function being integrated, we have

    y 2 =

    x

    1

    2

    2

    x

    dx.

    Therefore,y= 2 + [2x 2 ln x]x

    1

    = 2 + 2x 2 ln x 2 + 2 ln 1 = 2(x ln x).

    The result of the first iteration is thus given by

    y1= 2(x ln x) 2.0354,when x= 1.2.

    (b) Second IterationIn this case we use

    dy

    dx= 2

    y1

    x = 2

    2(x ln x)

    x =

    2 ln x

    x .

    Hence, x

    1

    dy

    dxdx=

    x

    1

    2lnx

    x dx.

    That is,

    y 2 =(ln x)2

    x

    1= (ln x)2.

    The result of the second iteration is thus given by

    y2= 2 + (ln x)2 2.0332,

    4

  • 7/25/2019 Piccards'

    6/7

    when x= 1.2.

    (c) Third IterationFinally, we use

    dydx

    = 2 y2

    x = 2 2

    x

    (ln x)2

    x .

    Hence, x

    1

    dy

    dxdx=

    x

    1

    2

    2

    x

    (lnx)2

    x

    dx.

    That is,

    y 2 =

    2x 2 ln x

    (ln x)3

    3

    x

    1

    = 2x 2 ln x (ln x)3

    3 2.

    The result of the third iteration is thus given by

    y3= 2x 2 ln x (ln x)3

    3 2.0293,

    when x= 1.2.

    The results of the last two iterations are identical when rounded off to two places ofdecimals, namely 2.03. Hence, the accuracy of the third iteration is two decimal place

    accuracy.

    17.7.2 EXERCISES

    1. Use Picards method to solve the differential equation

    dy

    dx=y +ex

    at x= 1, correct to two significant figures, given that y = 0 when x= 0.

    2. Use Picards method to solve the differential equationdy

    dx=x2 +

    y

    2

    at x= 0.5, correct to two decimal places, given that y= 1 when x= 0.

    5

  • 7/25/2019 Piccards'

    7/7

    3. Given the differential equationdy

    dx= 1 xy,

    where y(0) = 0, use Picards method to obtain y as a series of powers ofx which willgive two decimal place accuracy in the interval 0 x 1.

    What is the solution when x= 1 ?

    17.7.3 ANSWERS TO EXERCISES

    1.

    y(1) 2.7

    2.

    y(0.5) 1.33

    3.

    y = x x3

    3 +

    x5

    15

    x7

    105+

    x9

    945 ......

    y(1) 0.72

    6