JUST THE MATHS SLIDES NUMBER 17.8 NUMERICAL MATHEMATICS 8 - - PDF document

just the maths slides number 17 8 numerical mathematics 8
SMART_READER_LITE
LIVE PREVIEW

JUST THE MATHS SLIDES NUMBER 17.8 NUMERICAL MATHEMATICS 8 - - PDF document

JUST THE MATHS SLIDES NUMBER 17.8 NUMERICAL MATHEMATICS 8 (Numerical solution) of (ordinary differential equations (C)) by A.J.Hobson 17.8.1 Runges method UNIT 17.8 NUMERICAL MATHEMATICS 8 NUMERICAL SOLUTION OF ORDINARY


slide-1
SLIDE 1

“JUST THE MATHS” SLIDES NUMBER 17.8 NUMERICAL MATHEMATICS 8 (Numerical solution)

  • f

(ordinary differential equations (C)) by A.J.Hobson

17.8.1 Runge’s method

slide-2
SLIDE 2

UNIT 17.8 NUMERICAL MATHEMATICS 8 NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS (C) 17.8.1 Runge’s Method We solve the differential equation, dy

dx = f(x, y), subject

to the condition that y = y0 when x = x0. Consider the graph of the solution passing through the two points, A(x0, y0) and B(x0 + h, y0 + k).

✲ ✻

x y O A C B M N B0 k

h 2 h 2

We can say that

x0+h

x0

dy dxdx =

x0+h

x0

f(x, y)dx. That is, yB − yA =

x0+h

x0

f(x, y)dx.

1

slide-3
SLIDE 3

Reminder: f(x, y) is the gradient at points on the solution curve.

✲ ✻

x y O A C B M N B0 k

h 2 h 2

Suppose we knew the values of f(x, y) at A,B and C, where C is the intersection with the curve of the perpen- dicular bisector of MN. Then, by Simpson’s Rule for approximate integration,

x0+h

x0

f(x, y)dx = h/2 3 [f(A) + f(B) + 4f(C)] . (i) The value of f(A) This is already given, namely, f(x0, y0).

2

slide-4
SLIDE 4

(ii) The Value of f(B)

A B0

✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏ ✏ ✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟ ✟

B1 B2 B

✟✟✟✟✟ ✟

If the tangent at A meets B0B in B1, then the gradient at A is given by B1B0 AB0 = f(x0, y0). Therefore, B1B0 = AB0f(x0, y0) = hf(x0, y0). Calling this value k1 as an initial approximation to k, k1 = hf(x0, y0).

3

slide-5
SLIDE 5

A B0

✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏ ✏ ✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟ ✟

B1 B2 B

✟✟✟✟✟ ✟

As a rough approximation to the gradient of the solution curve passing through B, we now take the gradient of the solution curve passing through B1. Its value is f(x0 + h, y0 + k1). For a better approximation, assume that a straight line

  • f gradient f(x0 + h, y0 + k1), drawn at A, meets B0B in

B2 a point nearer to B than B1. Letting B0B2 = k2, k2 = hf(x0 + h, y0 + k1). The co-ordinates of B2 are (x0 + h, y0 + k2). The gradient of the solution curve through B2 is taken as a closer approximation than before to the gradient of the solution curve through B.

4

slide-6
SLIDE 6

The gradient of the solution curve through B2 is f(x0 + h, y0 + k2). (iii) The Value of f(C)

A C C1 k1 B0

✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏ ✏ B1

B

Let C1 be the intersection of the ordinate through C and the tangent at A. Then C1 is the point

  x0 + h

2, y0 + k1 2

   .

The gradient at C1 of the solution curve through C1 is f

  x0 + h

2, y0 + k1 2

   .

We take this to be an approximation to the gradient at C for the arc, AB.

5

slide-7
SLIDE 7

We saw earlier that yB − yA =

x0+h

x0

f(x, y)dx. Therefore, yB − yA = h 6[f(A) + f(B) + 4f(C)]. That is, y = y0+h 6

  f(x0, y0) + f(x0 + h, y0 + k2) + 4f   x0 + h

2, y0 + k1 2

      .

PRACTICAL LAYOUT If dy dx = f(x, y) and y = y0 when x = x0, then the value of y when x = x0 + h is determined by the following sequence of calculations:

  • 1. k1 = hf(x0, y0).
  • 2. k2 = hf(x0 + h, y0 + k1).
  • 3. k3 = hf(x0 + h, y0 + k2).
  • 4. k4 = hf
  • x0 + h

2, y0 + k1 2

  • .
  • 5. k = 1

6(k1 + k3 + 4k4).

  • 6. y ≃ y0 + k.

6

slide-8
SLIDE 8

EXAMPLE Solve the differential equation dy dx = 5 − 3y at x = 0.1 given that y = 1 when x = 0 Solution We use x0 = 0, y0 = 1 and h = 0.1.

  • 1. k1 = 0.1(5 − 3) = 0.2
  • 2. k2 = 0.1(5 − 3[1.2]) = 0.14
  • 3. k3 = 0.1(5 − 3[1.14]) = 0.158
  • 4. k4 = 0.1(5 − 3[1.1]) = 0.17
  • 5. k = 1

6(0.2 + 0.158 + 4[0.17]) = 0.173

  • 6. y ≃ 1.173 at x = 0.1

Note: It can be shown that the error in the result is

  • f the order h5; that is, the error is equivalent to some

constant multiplied by h5.

7