9

Initial Value Problems for Ordinary Differential Equations

9.0 INTRODUCTION

Many problems in science and engineering can be reduced to the problem of solving differential equations satisfying certain conditions. For example, spring-mass systems, resistor- capacitor-inductance circuits, bending of beams, chemical reactions, pendulums, simple harmonic motions, the motion of a rotating mass and so on. Using analytical methods we can solve only standard types of differential equations. But the differential equations appearing in practical problems of engineering and science are not of the standard types and are complex. So, it is rather impossible to find closed form solutions. Such equations are solved by numerical methods where the solution is given as a table of values of the function at various values of the independent variable. This is called point wise solution. Such methods are called pointwise methods or single step methods because they use Eqn1 at Eqn2 to find Eqn3 at Eqn4. In contrast we have methods like Milne’s and Adam’s which use Eqn5 to find Eqn6. So they are called multistep methods.

We shall consider some of the methods commonly used to solve differential equations.

9.1 TAYLOR’S SERIES METHOD

Consider the first order differential equation Eqn7 with initial condition Eqn8.

We can expand Eqn9 as a power series in Eqn10 in the neighbourhood of Eqn11 by Taylor’s series.

Eqn12

Put Eqn13 Eqn14

Eqn15

Eqn16

If Eqn17, then

Eqn18

Now y can be expanded as Taylor’s series about Eqn19 and we have

Eqn20

Continuing this way, we find

Eqn21

where Eqn22Eqn23

The solution y (x) is given as a sequence Eqn24

  1. If we calculate the value of Eqn25 by omitting Eqn26 and higher powers of h, the truncation error will be Eqn27 where k is a constant and the corresponding Taylor’s series is said to be of second order.

    If h is small and terms after n terms are neglected the error is Eqn28 where Eqn29 if Eqn30

  2. It is a single step method. If f(x, y) is complicated function, higher derivatives cannot be found and so the method can not be used. This is the draw back of the method.

WORKED EXAMPLES

Example 1

Solve Eqn31 Eqn32 by Taylor’s series method. Find the values of y at x = 0.1 and x = 0.2.

Solution

Given Eqn33 Eqn34

Eqn35 Eqn36

Taylor’s series is Eqn37(1)

We have Eqn38

Differentiating we get, Eqn39

Eqn40

At (x0, y0) = (0,1), Eqn42

Eqn43

Eqn44

Substituting r = 0 in (1), we get Eqn45

Eqn46

Eqn47

Now Eqn48

Put Eqn49 in (1), we get Eqn50

At (x1, y1) = (0.1, 1.1103), Eqn52

Eqn53

Eqn54

Eqn55

Eqn56

Eqn57

Eqn58

Eqn59 the solution is Eqn60

Eqn61

Example 2

Using Taylor’s series method find y at x = 0, if Eqn77.

Solution

Given Eqn78

Eqn79

Taylor’s series is Eqn80 Eqn81(1)

and y ′″ = x2y+ 2xy+ 2(xy+ y.1)

At Eqn82 y0 = 0 - 1 = -1

Eqn59a y ″0 = 0 + 0 = 0

y ′″0 = 0 + 0 + 0 + 2.1 = 2

Putting Eqn86 in (1), we get

Eqn87

Eqn59 Eqn88

Eqn89

Eqn59 Eqn91

Example 3

Using Taylor’s series method find y(1.1) and y(1.2) correct to four places given Eqn92 and Eqn93

Solution

Given Eqn94

Eqn59 Eqn95 Eqn95a

Required Eqn96 Eqn97

Taylor’s series is Eqn98 Eqn99(1)

we have Eqn100

Eqn59a Eqn101

and Eqn102

Eqn103

At Eqn104 Eqn105

Eqn106

Eqn107Eqn108

Putting Eqn109 in (1), we get

Eqn110

Eqn59 Eqn111

Eqn112

Eqn113

Now Eqn114

Putting Eqn115,we get

Eqn116

At Eqn117

Eqn118

Eqn119

Eqn120

Eqn121

Eqn122

Eqn123

Eqn124

Eqn125

Eqn126

Eqn127

Eqn128

Thus Eqn129

Since this equation Eqn130 is a simple variable separable equation we can solve and find the exact solution. We shall compare the computed value with the exact value.

Eqn131

where Eqn132

So, solution is Eqn133

When Eqn134 = 1.1068

When Eqn135 = 1.2278

C09U001

Example 4

Using Taylor’s series method find y at x = 1.1 and 1.2 by solving Eqn142, given Eqn143

Solution

Given Eqn144

Eqn145

Required y at Eqn146

Taylor’s series is

Eqn147 Eqn148(1)

we have Eqn149

Eqn150

and Eqn151Eqn152

At Eqn153

Eqn154

Eqn155

Eqn156

Eqn157 Eqn158

Putting Eqn159 in (1), we get,

Eqn160

Eqn161

Eqn162 Eqn163

Eqn164

Now Eqn165

Putting Eqn166 in (1), we get,

Eqn167

At Eqn168

Eqn169

Eqn170

Eqn171

Eqn172

Eqn173

Eqn174

Hence Eqn175

Example 5

Use Taylor series method to find Eqn229 given that Eqn230 correct to 4 decimal accuracy.

Solution

Given equation is Eqn231 and y(0) = 0

Eqn1443

Required Eqn234h = 0.1

Taylor’s series is Eqn236 Eqn237(1)

We have Eqn238

Eqn239

and Eqn240

Putting Eqn241 in (1), we get,

Eqn242

At Eqn243

Eqn244

Eqn245

Eqn246

Eqn247

Eqn248

Eqn249

Eqn250

Now Eqn251

Putting Eqn252 in (1), we get Eqn253

At Eqn254

Eqn255

Eqn256

Eqn257

Eqn258

Eqn259

Eqn260

y (0.2) = 0.8108

Eqn261

9.2 EULER’S METHOD AND MODIFIED EULER’S METHOD

Euler’s method is one of the simplest and oldest methods of finding numerical solution of differential equation. It is a step-by-step method because the values of y are computed by short steps ahead for equal intervals of the independent variable. This crude method is rarely used in practice but it explains the principle of methods based on Taylor’s series.

Consider the differential equation

Eqn262

C09U001

Let Eqn263 be equidistant values of x where

Eqn264so that Eqn265

In Euler’s method we approximate a curve in a small interval by a straight line.

Let Eqn266 be the curve representing the actual solution.

Equation of the tangent at Eqn267 is

Eqn268

Eqn269

Eqn270

Since the curve in the interval Eqn271 is approximated by this straight line, the value of y at Eqn272 is approximately

Eqn273

Eqn274

Similarly the curve in the interval Eqn275 is approximated by the line through Eqn276 and having slope Eqn277

Eqn278

Proceeding in this way we get the general formula

Eqn279

This is called Euler’s algorithm:

Note:

  1. Since Eqn280 and Eqn281, the above formula can be simply written as Eqn282
  2. The draw back of this method is that it is either too slow (in case h is small) or too inaccurate (in case h is not small).
  3. The computed y’s will deviate more and more from the true y’s as we proceed further along X-axis, due to cumulative rounding errors.

These drawbacks have led to a modification of Euler’s method aiming at more accurate results.

We start with the tangent Eqn283 at Eqn284.

Let the ordinate at Eqn285 intersect the tangent Eqn286 at Q, where Eqn287

We find the slope at Q.

ie Eqn288

We draw the line through Q with this as slope and let this line be Eqn289.

We then draw the line L through Eqn290 parallel to Eqn291.

C09U001

This line L is taken as an approximation to the curve in the interval Eqn292.

Equation of L is Eqn293

When Eqn294

ie. Eqn295

Proceeding this way, in general we have

Eqn296

where Eqn297

Note:

(1) The above formula is one version of the modified formula. It gives a better approximation. In this method we took average of points.

(2) Another version of Euler modified formula is given in terms of the average of the slopes at the end points of an interval.

That is Eqn298

Eqn299

This formula is also referred as improved Euler formula by some authors.

(3) The improved and modified Euler’s methods give a better approximation to Eqn300 than Euler’s formula.

(4) Local error in improved and modified methods are Eqn301

WORKED EXAMPLES

Example 1

Using Euler’s method find y for x = 0.1 given Eqn315

Solution

Given equation is Eqn315b

Eqn315a

We shall divide Eqn316 into Eqn317 parts with Eqn318a

Eqn318

Euler’s algorithm is Eqn319

Eqn320

When Eqn321

Eqn322

When n = 1, y2 = y1 + hf (x1,y1), x1 = x0 + h = 0.05

= 1.05 + (0.05) Eqn323

= 1.05 + (0.05) Eqn324

= 1.05 + 0.05 Eqn325

Eqn326

Example 2

Apply modified Euler’s method to find y(0.2) and y(0.4) given y = x2 + y2, y(0) = 1 by taking h = 0.2.

Solution

Given equation is y′ = x2 + y2 , y(0) = 1

f (x, y) = x2 + y2, and x0 = 0, y0 = 1, h = 0.2

Modified Euler’s formula is

Eqn328

Putting n = 0, we get, Eqn329

Eqn330

But f (0,1) = 0 + 1 = 1

Eqn331

Eqn332

y(0.2) = 1.244

Now x1 = 0.2, y1 = 1.244

Putting n = 1, we get,

Eqn333

Eqn334

Eqn335

Eqn336

Eqn337

Eqn1444

Thus Eqn337a

Example 3

Solve Eqn338 by Euler’s modified method and find the values of y(0.2), y(0.4) and y(0.6) by taking h = 0.2.

Solution

Given Eqn339

Eqn340a

Eqn340

Modified Euler formula is

Eqn341

Putting n = 0, we get

Eqn342

But Eqn343

Eqn344

Eqn345

Eqn346

Eqn347

Eqn348a

Now Eqn348

Putting Eqn349 we get

Eqn350

Eqn351

Eqn352

Eqn353

Eqn354

Eqn355

Eqn356a

Now Eqn356

Putting Eqn357 we get

Eqn358

Eqn359

Eqn360

Eqn361

Eqn362a

Thus Eqn362

Example 4

Using modified Euler’s method solve given that Eqn363 find y(0.2).

Solution

Given equation is Eqn364

Eqn365 Take Eqn366

We shall find y(0.2) in two steps.

Modified Euler’s formula is

Eqn367

Putting Eqn368we get,

Eqn369

Eqn370

Eqn371

Eqn372

Eqn373

Now Eqn375 ie.Eqn376

Putting Eqn377 we get,

Eqn378

Eqn379

Eqn380

Eqn381

Eqn382

Eqn383

Exercises 9.1

  1. Use Taylor’s series method solution to solve Eqn426 Find y(0.1), y(0.2), y(0.3), y(0.4) 2.
  2. Use Taylor’s series method to find y at x = 0.1, 0.2 given Eqn427
  3. Use Taylor’s series method to find y at x = 0.1 if Eqn428
  4. Use Taylor’s series method to solve Eqn429 with y(0) = 2 and find y(0.1), y(0.2), y(0.3).
  5. By Taylor’s method find the solution with 3 terms for the initial value problem Eqn430 and obtain y(1.1), y(1.2).
  6. Using Taylor’s series method find y(0.1) and y(0.2) given Eqn431 y(0) = 1.
  7. Use Euler’s method to find y(0.2), y(0.4) from Eqn432 y(0) = 1 with h = 0.2.
  8. Given new3 taking h = 0.02 and y(0) = 1, find y when x = 0.1.
  9. Using Euler’s modified method find y(0.2), y(0.4), y(0.6) given Eqn435 y(0) = 1.
  10. Using Euler’s modified method compute y(0.1) with h = 0.1 from Eqn436
  11. Consider the initial value problem Eqn437 using the modified Euler’s method, find y(0.2).
  12. Using modified Euler’s method solve, given that y ′ = 1 − y, y(0) = 0 find y(0.1), y(0.2) and y(0.3).
  13. By modified Euler’s method find y(1.2), given Eqn438 y(1) = 0, h = 0.2.
  14. Solve Eqn439 given y(1) = 0, and find y(1.1) and y(1.2) by Taylor’s series method.
  15. Using Modified Euler’s method find y(0.1) and y(0.2) given Eqn440

Answers 9.1

  1. 0.9052, 0.8213, 0.7492, 0.6897
  2. 0.9003
  3. y(1.1) = 1.225; y(1.2) = 1.512
  4. 1.2, 1.48
  5. 1.218, 1.467, 1.737
  6. y(0.2) = 0.828, taking h = 0.2
  7. y(1.2) = −0.2735
  8. y(0.1) = 1.1105, y(0.2) = 1.2503
  9. 0.3487, 0.8113
  10. 2.1103, 2.2430, 2.4011
  11. 1.0665, 1.1672
  12. 1.0928
  13. y(0.1) = 1.0955
  14. 0.095, 0.18098, 0.25878
  15. y(1.1) = 0.1104, y(12) = 0.2424
9.3 RUNGE-KUTTA METHOD (R-K METHOD)

Runge-Kutta methods are more accurate than the earlier methods we have seen. Two German mathematicians, Runge and Kutta developed algorithms to solve a differential equation efficiently. The advantage of this method is that it requires only values of the function at some specified points. These methods agree with Taylor series expansion upto the terms of hr, where r is the order of the Runge-Kutta method and it differs from method to method.

In these methods two or more estimates of Δy, the increment in y, are computed and a linear combination of these estimates are used to determine Δy and hence the next value of y, is y(x + h) = y(x) + Δy. Since the derivations are complicated we shall state here only the algorithms to solve Eqn441

1. First-order Runge-Kutta method

Euler’s method is y(x + h) = y(x) + hf(x, y)

Eqn442

In general, Eqn443

2. Second-order Runge-Kutta method

Eqn444

Eqn445

Note that Δy is the mean of k1 and k2. Some times Δy is taken as k2, in which case second order Runge-Kutta method is modified Euler method.

3. Third-order Runge-Kutta method

Eqn446

Then Eqn447

Note that Δy is the weighted mean of k1, k2, k3

4. Fourth-order Runge-Kutta method

The fourth order Runge-Kutta method is most widely used and is popular and so it is referred to as the Runge-Kutta method. In problems we use fourth-order method unless otherwise specified.

Fourth-order algorithm is

Eqn448

and Eqn449

Eqn450

Note that Δy is the weighted mean of k1, k2, k3, k4.

WORKED EXAMPLES

Example 1

Using Runge-Kutta method of Fourth order solve Eqn451 with y(0) = 1 at x = 0.2, 0.4.

Solution

Given Eqn452

Then Eqn453

Required the values of y when x = 0.2 and x = 0.4

The fourth-order Runge-Kutta method is

Eqn454

Eqn1435

Put n = 0 to find y1

Then, k1= hf(x0,y0) Eqn455 Eqn456

Eqn457 = 0.2f [0.1, 1 + 0.1]

= 0.2f [0.1, 1.1]

Eqn458

Eqn459

Eqn460

Eqn461

Eqn462

Now Eqn463

Put n = 1 to find y2

Then

Eqn464

Similarly

Eqn465

Eqn465a

Eqn466

Eqn467

Thus y(0.2) = 1.196, y(0.4) = 1.3752

Example 2

Apply Runge-Kutta method to find approximate value of y for x = 0.2 in steps of 0.1 if Eqn468 given that y = 1 when x = 0.

Solution

Given Eqn469

C09U003

Then Eqn470

Required y(0.2). Since we have to compute with h = 0.1, first we find y(0.1) and then y(0.2).

Fourth order Runge-Kutta formula is

Eqn471

Put n = 0 to find y1

Then Eqn472

Eqn473

Eqn474

Eqn475

Eqn476

Eqn477

Now Eqn478

Put n = 1 to find y2

Then Eqn479

Eqn480

Eqn481

Eqn482

Eqn483

Eqn484

Thus y(0.1) = 1.1165 and y(0.2) = 1.2736

Example 3

Using Runge-Kutta method of order 4, find y(0.2) for the equation Eqn500 Take Eqn501

Solution

Given equation is Eqn502

Then Eqn503

Required y(0.2)

Fourth order Runge-Kutta formula is

Eqn504

Eqn505

Eqn506

Eqn507

Eqn508

Eqn508a

Put Eqn509 to find Eqn510

Eqn511

Eqn512Eqn513

Eqn514

Eqn515Eqn516

Eqn517

Eqn518Eqn519

Eqn520

Eqn521

Eqn522

Example 4

Apply Runge-Kutta method to Eqn523 and find y(0.2) with Eqn524.

Solution

Given Eqn525

Then, Eqn526

Fourth order Runge-Kutta formula is

Eqn527

Eqn528

Eqn529

Eqn530

Eqn531

Put Eqn532 to find Eqn533

Then Eqn534Eqn535

Eqn536Eqn537

Eqn538

Eqn539

Eqn540Eqn541

Eqn542

Eqn543

Eqn544Eqn545

Eqn546

Eqn547

Eqn548

Eqn549

Eqn550

Now Eqn551

Put n = 1 to find y2

Then Eqn552Eqn553

Eqn554

Eqn555Eqn556

Eqn557

Eqn558

Eqn559Eqn560

Eqn561Eqn562

Eqn563

Eqn564Eqn565

Eqn566

Eqn567

Eqn568a

Eqn568

Eqn569

Eqn570

Eqn571

9.4 RUNGE-KUTTA METHOD FOR THE SOLUTION OF SIMULTANEOUS EQUATIONS AND SECOND ORDER EQUATIONS

We have seen Runge-Kutta method for solving first order differential equations. We shall now describe the solution of second order differential equations by Runge-Kutta method. A second order differential equation can be reduced to a system of simultaneous first order equations. These first order equations can be solved by Runge-Kutta method.

9.4.1 Runge-Kutta Method for Simultaneous Equations

Consider the system of equations

Eqn572

Eqn573

where Eqn574 is independent variable and Eqn575 are dependent variables.

Starting at Eqn576 the increments Eqn577 and Eqn578 in y and z for the increment h in x are computed by means of the formulae.

Eqn579

Then Eqn580

Thus we get Eqn581 where Eqn582

To find Eqn583 we repeat the above algorithm replacing Eqn584by Eqn585

ie. we start with Eqn586

WORKED EXAMPLES

Example 1

Solve the system of differential equations Eqn587 for Eqn588, using fourth order Runge-Kutta method with the values Eqn589

Solution

Given system of equations is

Eqn590

and Eqn591 and h = 0.3

Here Eqn592

Required the values of y and z when Eqn595

Eqn596

Eqn598 Eqn599

Eqn600 Eqn601a

Eqn602 Eqn603

Eqn604

Eqn605

Now the increments,

Eqn606 and Eqn607

Eqn608

Example 2

Using Runge-Kutta method of fourth order, find the approximate values of x and y at Eqn610 for the following system, Eqn611

Solution

Given system of equations are

Eqn612

and Eqn613

Here t is the independent variable and x, y are dependent variables

Here Eqn616 Eqn617

Required the values of x and y when Eqn618

Eqn619

Eqn621

Eqn623

Eqn625

Now the increments,

Eqn627 Eqn628

Eqn629

9.4.2 Runge-Kutta Method for Second Order Equations

Consider the second order differential equation Eqn630 given Eqn631 Eqn632

Put Eqn633 Hence Eqn634

So, the second order differential equation is reduced to two simultaneous first order equations

Eqn635 and Eqn636

Eqn637 and Eqn638

Here Eqn639 x is independent variable, y and z are dependent variables.

These equations can be solved by using the algorithm in 9.4.1.

WORKED EXAMPLES

Example 3

Given y+ xy ¢ + y = 0, y(0) = 1, y ¢(0) = 0 find the value of y (0.1) by R-K method of fourth order.

Solution

Given equation is Eqn640

Put Eqn641 Eqn642

∴ the equation is reduced to a system of first order simultaneous equations.

Eqn644 and Eqn645

Here Eqn646 and Eqn647

To find y (0.1)

Eqn648

By Runge-Kutta method,

Eqn649

Eqn651

Eqn654

Eqn656

Eqn659

Eqn662

Now

Eqn667

Eqn670

Eqn671

Example 4

Consider the second order initial value problem Eqn672 with y(0)  =  -0.4 and Eqn673. Using fourth order Runge-Kutta method, find y(0.2).

Solution

Given equation is Eqn674 y(0) = −0.4 and y′(0) = -0.6

Eqn676 Assume t = x, x is independent variable, y and z are dependent variables

Put y ′ = z, then Eqn678

∴ the equation is Eqn680

That is the equation is reduced to a system of first order simultaneous equations.

Eqn681 and Eqn682

Here Eqn683

To find y(0.2)

Eqn684

By Runge-Kutta method,

Eqn685

Eqn687

Eqn689

Eqn692

Eqn695

Eqn699

Eqn703

Now

Eqn707

Eqn708

Eqn709

Eqn710

Eqn711

Example 5

Given Eqn712 Evaluate y (0.1) using Runge-Kutta method.

Solution

Given Eqn713

Eqn714

Put y

That is the given equation is reduced to a system of first order simultaneous equations

Eqn715

Here Eqn716 and Eqn717

To find y(0.1)

we have Eqn1438 and h = 0.1

By Runge-Kutta method,

Eqn718

Eqn719

Eqn720

Eqn723

Eqn725

Eqn729

Eqn732

Eqn736

Eqn739

Eqn740

Exercises 9.2

  1. Solve, using fouwwrth order Runge-Kutta method Eqn741. Evaluate the value of y when x = 1.1 [Take h = 0.5].
  2. Using Runge-Kutta method of fourth order, solve for y at x = 1.2, 1.4 from Eqn742 with y(1) = 0.
  3. Find y(0.8) given that Eqn743 by using Runge-Kutta method of fourth order. Take h = 0.1.
  4. Find y(0.3) given that Eqn744 by taking h = 0.1, using Runge-Kutta method.
  5. Apply Runge-Kutta method of order 4 to find y(0.2) given that Eqn745 Eqn1439taking h = 0.1.
  6. Compute y(0.1) and y(0.2) by Runge-Kutta method of 4th order for the differential equation Eqn746
  7. Given Eqn747 find y for x = 0.1, 0.2, 0.3 by R-K Method.
  8. Given the equation Eqn748 by R.K method find y at x = 0.1, 0.4.
  9. Given Eqn749 find y(1.1) and y(1.2) using R-K method.
  10. Use the Runga-Kutta method to determine the approximate value of y at x = 0.1 if y satisfies the differential equation Eqn750 with y(0) =1,Eqn751
  11. Using Runge-Kutta method solve Eqn752 and find y(0.2), y′(0.2) [Take h = 0.2].
  12. Solve using Rung-Kutta method Eqn754 and find y(0.1).
  13. Find y(0.1) by Runge-Kutta method Eqn755
  14. Given that Eqn756 Compute y(0.2), y(0.4), y(0.6) by Runge-Kutta method of fourth order.
  15. Solve the system of differential equations Eqn757 for Eqn758, using 4th order Runge-Kutta method with initial values Eqn759
  16. Solve the system Eqn760 for Eqn761 Correct to 4 decimal places, given Eqn762

Answers 9.2

  1. 0.9958, (2) 0.1402, 0.2705
  2. 1.8763; 2.0142 (4) y(0.1) = 0.9006, y(0.2) = 0.8046, y(0.3) = 0.7144
  3. 2.5005 (6) 1.1169, 1.2774
  4. 1.0911, 1.1677, 1.2352 (8) 1.1832, 1.3416
  5. 2.2213, 2.4914 (10) y(0.1) = 1.0053
  6. y(0.2) = 0.9801,Eqn763 = –0.178 (12) y(0.1) = 2.9399
  7. y(0.1) = 0.2542 (14) 2.4432; 2.9903; 3.6805
  8. Eqn764 (16) Eqn765
9.5 MILNE’S PREDICTOR–CORRECTOR METHOD

Consider the differential equation Eqn766 with y(x0) = y0.

Divide the range of x into a number of subintervals of equal width h.

If xi and xi + 1 are consecutive points then xi + 1 = xi + h.

By Euler’s formula we get

yi + 1 = yi + hf (xi, yi), i = 1, 2, 3, ...(1)

By one form of Euler’s modified formula, we get

Eqn767(2)

The value Eqn768 is first estimated by (1) and this value is substituted in the R.H.S of (2).

Then we get a better approximation of Eqn769 from (2). This value is again substituted in (2) to find a still better value of Eqn770.

This process is repeated until we get two consecutive approximations of Eqn771 are almost same. This method of refining an initially rough estimate by means of a more accurate formula is called a predictor-corrector method.

The formula (1) is called the predictor formula and formula (2) is called the corrector formula.

Consider Eqn772 with y(x0) = y0.

We know Newton’s forward formula is

Eqn773

where Eqn774

Replace y by yEqn775 = Eqn776, then

Eqn777(1)

Integrating w.r.to x in the interval [x0, x0 + 4h], we get

Eqn778

Eqn779

[Eqn780when x = x0, u = 0, x = x0 + 4h; u = 4]

Eqn781

Eqn782

Eqn783

[neglecting higher order differences]

Eqn784

Eqn785

Since Eqn786 are any 5 consecutive values of x, the above equation can be written generally as

Eqn787(2)

This is called Milne’s Predictor formula.

Note that this formula can be used to predict the value of y4 when the values of Eqn788 are known.

To obtain a corrector formula, integrating (1) w.r.to x in the interval Eqn789, we get

Eqn790

Eqn793

Eqn794

Eqn795

Eqn796

[neglecting higher powers]

Eqn797

Since Eqn798 are consecutive values of x the above relation can be written generally as

Eqn799(3)

This is known as Milne’s Corrector formula.

Note:

  • In problems if the first 4 values of y are not given we have to determine them by using Taylor’s series or Euler’s or Runge-Kutta method. Usually, these values will be given.
  • To apply Milne’s Predictor-Corrector method, we need four starting values of y. Hence this method is a multi-step method.

WORKED EXAMPLES

Example 1

Solve Eqn800 y(0) = 1, y(0.1) = 1.06, y(0.2) = 1.12, y(0.3) = 1.21. Compute y (0.4), using Milne’s Predictor Corrector formula.

Solution

Given equation is Eqn801

Here f(x,y) = Eqn1441

Also given x0 = 0, x1 = 0.1, x2 = 0.2, x3 = 0.3,

and y0 = 1, y1 = 1.06, y2 = 1.12, y3 = 1.21

Required y(0.4) = y4 at x4 = 0.4

Milne’s Predictor formula is

Eqn802(1)

Putting n = 3, we get

Eqn803(2)

we have Eqn804

Eqn805

Eqn806

Eqn807

Eqn808

Eqn809

Eqn810

Substituting in (2), we get

Eqn811

This is the Predictor value.

The accuracy of the value may be increased using corrector formula.

Milne’s corrector formula is

Eqn812(3)

Put n = 3 in (3), then

Eqn813(4)

Since Eqn814 is not known, we find y4.

Now Eqn815

Eqn816

Substituting in (4) we get

Eqn817

Eqn818

Eqn819 the corrector valueEqn820

Example 2

Given Eqn821 compute y (4.4) using Milne’s method.

Solution

Given equation is Eqn822

Eqn1442

Eqn823

Also given x0 = 4, x1 = 4.1, x2 = 4.2, x3 = 4.3,

and y0 = 1, y1 = 1.0049, y2 = 1.0097, y3 = 1.0143

Required y (4.4) = y4 at x4 = 4.4

Milen’s Predictor formula is

Eqn824(1)

Putting n = 3 in (1) we get, Eqn825

we have Eqn826

Eqn827

Eqn828

and Eqn829

Substituting in (2), we get

Eqn830

Eqn831

This is the predictor value of y4.

An improved value of y4 may be obtained by the corrector formula.

Eqn832(3)

Putting n = 3 in (3) we get, Eqn833(4)

But Eqn834is not known, so we find y4.

Now Eqn835

Eqn836Eqn837

Eqn838 the corrector value is Eqn839

Example 3

Given y’ = xy + y2, y(0) = 1, find y(0.1) by Taylor’s method, y(0.2) by Euler’s method, y(0.3) by Runge-Kutta method and y(0.4) by Milne’s method.

Solution

Given equation is Eqn855

Here f(x,y) = xy + y2

Also given Eqn856

Eqn857y1 = y(0.1) is required by Taylor’s series method.

By Taylor’s formula,

Eqn858(1)

we have Eqn859

Eqn860

At (x0, y0) = (0, 1),

Eqn861

Eqn862

Eqn863

Next to find y2 = y(0.2), we use Euler’s method

C09U004

By Euler’s formla,

Eqn864

Eqn865

Next to find Eqn866 We use Runge-Kutta method

we have Eqn867

By R-K formula, Eqn868

C09U005

where

Eqn869

Now

Eqn870

Eqn871

Eqn872

Eqn873

Eqn874

Eqn875

Now we know 4 values

C09U006

We have to find y4 by Milne’s method.

Milne’s Predictor formula is

Eqn876(1)

Putting n = 3 in (1), we get, Eqn877

we have Eqn878

Eqn879

Eqn880

Eqn881

Eqn882

This is the predictor value of y4.

To find the corrector value we use Milne’s corrector formula.

Eqn883(2)

Putting n = 3 in (2), we get, Eqn884

But Eqn885 is not known and so we find Eqn886

Now Eqn887

Eqn888

Since the Predictor and corrector values of y4 are not close to each other, we improve the values of y4 repeating the corrector process taking y4 = 1.7944 as predictor value.

∴ Corrector value is Eqn889

But Eqn890

Eqn891

∴ the corrector value is Eqn892

∴ the value for two decimal places is Eqn893

Example 4

Given Eqn894 y(0.4) = 2.452, y(0.6) = 3.023. Compute y(0.8) by Milne’s predictor-corrector method taking h = 0.2.

Solution

Given equation is Eqn895

Here f(x,y) = x3 + y and h = 0.2

Also given

Eqn896

y4 is required by Milne’s method.

Milne’s Predictor formula is Eqn897(1)

Putting n = 3 in (1), we get Eqn898

we have Eqn899

Eqn900

Eqn901

This is the Predictor value.

We shall now find the corrector value.

Milne’s Corrector formula is

Eqn902(2)

Putting n = 3, we get Eqn903

But Eqn904 is not known and so we find y′4.

Now Eqn905

Eqn906

Since the Predictor and corrector values differ much, we repeat the process taking y4 = 3.7954 as the Predictor value.

Corrector value is Eqn907

But Eqn908

Eqn909

Eqn910

Again Eqn911

where Eqn912

Eqn913

Eqn914

Example 5

Use Taylor series method to solve Eqn940 at Eqn941 continue the solution of the problem at Eqn942 using Milne’s method.

Solution

Given equation is Eqn943

Here Eqn944

We have to find the values of y at Eqn945

In the usual notation the corresponding y’s are denoted by Eqn946

Taylor series algorithm is

Eqn947(1)

where Eqn948 is the rth derivative of y at Eqn949

Eqn950(2)

Eqn951(3)

At (x0,y0) = (0,1) Eqn952

Eqn953

Eqn954Eqn955

Eqn956

Putting Eqn957 we get Eqn958

Eqn959

Eqn960

Put Eqn961 in (1), we get Eqn962(4)

At Eqn963 Eqn964

Eqn965

Eqn966

Substituting in (4), we get, Eqn967

Eqn968

Thus we have 4 values Eqn969

Eqn970

Now, using Milne’s Predictor corrector formula we have to find Eqn971

Milne’s Predictor formula is Eqn972(5)

Putting Eqn973 in (5), we get Eqn974

We have Eqn975 and Eqn976 is not known. We shall find it.

Now Eqn977

Eqn978

Eqn979

Eqn980

This is the Predictor value.

We shall now find the corrector value of y3.

Milne’s Corrector formula is Eqn981(6)

Putting Eqn982 in (6), we get Eqn983

Now Eqn984 is not known and we find Eqn985

Now Eqn986

Eqn987

Hence Eqn988

9.6 ADAM’S PREDICTOR AND CORRECTOR METHOD

We have seen Milne’s method is derived by using Newton’s forward difference formula. But Adam’s method is derived using Newton’s backward difference formula.

We shall state the formulae without proof.

To solve Eqn989 with Eqn990 the predictor formula is

Eqn991

Corrector formula is

Eqn992

Note: To apply the predictor formula, we need four starting values of y which will be usually given, otherwise y can be calculated by any of the methods we have seen. Fourth order Runge-Kutta method is the most suitable one. It is found that Adam’s method is more stable.

It is also known as Adam-Bashforth method.

WORKED EXAMPLES

Example 1

Evaulate y (1.4) given Eqn993 Eqn994 Eqn994a by Adam’s-Bash forth formula.

Solution

Given equation is Eqn995

Here Eqn1449

given Eqn997

and Eqn998

Required Eqn999 at Eqn1000

Adam’s Predictor formula is

Eqn1001

Putting Eqn1002 we get

Eqn1003(1)

we have Eqn1004

Eqn1005

Eqn1006

Eqn1007

Eqn1008

Eqn1009

Eqn1010

Substituting in (1), the predictor value is

Eqn1012

Thus the Predictor value is Eqn1013

We improve this by using Adam’s corrector formula

Eqn1014

Putting Eqn1015 we get

Eqn1016

Here Eqn1017 is not known and we shall find it

Now Eqn1018Eqn1019

Eqn1020

Now substituting in the corrector formula (2) we get

Eqn1021

Eqn1022Eqn1023

Eqn1024 the corrector value is Eqn1025

Example 2

Given Eqn1026 eval uate y(1.4) by Adam-Bashforth method.

Solution

Given equation is Eqn1027

Here Eqn1028

Also given Eqn1029

and Eqn1030

Required Eqn1031

Adam’s Predictor formula is

Eqn1032

PuttingEqn1033 we get

Eqn1034(1)

we have Eqn1035

Eqn1036

Eqn1037

Eqn1039

Eqn1040

Substituting in (1), we get the Predictor value

Eqn1041

= 1.979 + 0.004167[142.3909]

Eqn1043

Eqn1044 the Predictor value is Eqn1045

We improve this by the Adam’s corrector formula

Eqn1046(2)

Putting Eqn1047 we get Eqn1048

Here Eqn1049 is not known so we shall find it

Eqn1050

∴ the corrector value is

Eqn1052

Eqn1053

Eqn1054

Eqn1055 the corrector value is Eqn1056

Example 3

Find y(0.1), y(0.2), y(0.3) from Eqn1104 by using Runge-Kutta method of order 4 using step value h = 0.1 and then find y(0.4) by Adam’s method with y(0) = 1.

Solution

The given equation is Eqn1105

Here f(x,y) = xy2 and h = 0.1

Also given x0= 0, y0= 1

We shall find y(0.1), y(0.2), y(0.3) by 4th order Runge-Kutta method.

By Runge–Kutta method

Eqn1108

Eqn1109

Eqn1111

Starting with y0, we shall find y1

Put n = 0, Eqn1114 and Eqn1115

Eqn1116

Eqn1117

Eqn1118

Eqn1119

Eqn1119a

Eqn1120 to find y2 ie. to find y2 when x2 = 0.2.

Eqn1121

Eqn1122

Eqn1123

Eqn1124

Eqn1125

Put n = 2 to find y3

Eqn1126

Eqn1127

Eqn1128

Eqn1130

Eqn1131

Eqn1132

We shall now find y4 = y(0.4) by Adam’s Predictor-Corector formula

Adam’s Predictor formula is

Eqn1133

Putting Eqn1134 we get

Eqn1135(1)

Now Eqn1136

Eqn1137

Eqn1138

Eqn1140

Eqn1142

Eqn1143

Eqn1144

Adam’s Corrector formula is

Eqn1145

Putting n = 3, we get

Eqn1146(2)

But Eqn1147

Substituting in (2), we get the corrector value

Eqn1148

Eqn1149

Eqn1150 the corrector value of Eqn1149a

Example 4

Consider Eqn1151

  1. Using the modified Euler method find y(0.2).
  2. Using R-K fourth order method find y(0.4) and y(0.6).
  3. Using Adamww-Bashforth Predictor-Corrector method find y(0.8).

Solution

Given equation is Eqn1152

Here f(x, y) = Eqn1155

Also given Eqn1153

  • (i) By modified Euler method, we shall find y(0.2)

Modified Euler formula is

Eqn1156

Putting n = 0, we get Eqn1157

Eqn1158

Eqn1159

Eqn1160

Eqn1162

Eqn1164

When Eqn1165

  • (ii) Now we shall find y(0.4) and y(0.6) by 4th order R-K method

Eqn1166

where Eqn1167, Eqn1169

Eqn1170, Eqn1171

Eqn1171a

Since y1 is known we shall find y2

Eqn1172 Put n = 1, Then y2 = Eqn1173

Eqn1174

Eqn1175Eqn1176

Eqn1177

Eqn1178

Eqn1179Eqn1180

Eqn1181

Eqn1182

Eqn1183Eqn1184

Eqn1185Eqn1186

Eqn1187

Eqn1189

Eqn1190

Eqn1191

Now Eqn1192

Eqn1193 Eqn1194

Eqn1195 Eqn1196

Now Eqn1197

Eqn1198

Eqn1199

Eqn1200

Eqn1201

Eqn1202

Eqn1203

Eqn1204

Eqn1205

ie. when x3 = 0.6, y3 = 1.6470

  • (iii) Given Eqn1206

Eqn1207

We have to find y4 when x4 = 0.8, by Adam’s Predictor-Corrector method.

Adam’s Predictor formula is

Eqn1208

Putting n = 3, we get

Eqn1209(1)

Since Eqn1210

Eqn1211

Eqn1212

Eqn1213

Eqn1214

Substituting in (1), we get the Predictor value is

Eqn1215

Eqn1216

Adam’s Corrector formula is

Eqn1217

Putting n = 3, we get

Eqn1218(2)

Since Eqn1219 is not known, we shall find it.

Now Eqn1220

Substituting in (2), we get the Corrector value

Eqn1221

Thus the corrector value is Eqn1222

Exercises 9.3

  1. Solve numerically the differential equation Eqn1223 taking the starting values y(0.2) = 2.0933, y(0.4) = 2.1755, y(0.6) = 2.2493. Find the values of y(0.8), using Milne’s Predictor-corrector method.
  2. Solve Eqn1224 compute y(0.4) and y(0.5) by Milne’s method.
  3. Apply Milne’s method to solve Eqn1225 and find y(1).
  4. 2, y(0.5) = 2.636, y(1) = 3.595 and y(1.5) = 4.968.
  5. Using Milne’s method find y(0.4) given Eqn1227
  6. Use Taylor’s series to find the starting values.
  7. Compute the first 3 steps of the initial value problemEqn1228 by Taylor’s series method and next step by Milne’s method with step length h = 0.1.
  8. Given Eqn1229 find y(0.1), y(0.2), y(0.3) by Taylor’s method and find y(0.4) by Milne’s predictor corrector method.
  9. Determine the value of y(0.4) using Milne’s method given Eqn1230 y(0) = 1; use Taylor series to get the values of y(0.1), y(0.2) and y(0.3).
  10. Given Eqn1231 y(0) = 1, y(0.1) = 1.01, y(0.2) = 1.022, y(0.3) = 1.023. Using Adam’s method find y(0.4).
  11. Using Adam-Bashforth method find y(4.4) given 5xy′ + y2 = 2, y(4) = 1, y(4.1) = 1.0049, y(4.2) = 1.0097 and y(4.3) = 1.0143.
  12. Find y at x = 0.4 if Eqn1232 with y(0) = 2, y(0.1) = 2.01, y(0.2) = 2.04, y(0.3) = 2.09 by Adam-Bashforth method.

Answers 9.3

(1) yp(0.8) = 2.3162, yc(0.8) = 2.3164 (2) yp(0.4) = 1.3415, yc(0.4) = 1.3416,

yp(0.5) = 1.4141, yc(0.5) = 1.4142

(3) yc(1) = 1.6505, (4) yp(2) = 6.8710, yc(2) = 6.8732

(5) yp(0.4) = 2.5885, (6) x1 = 0.1, x2 = 0.2, x3 = 0.3, y1 = 0.954, y2 = 0.915,

yc(0.4) = 2.5885 y3 = 0.883, y4,c = 0.856, y4,c = 0.857

(7) 1.0047, 1.01813, 1.03975, (8) y(0.1) = 1.1167, y(0.2) = 1.2767,

y(0.4) = 1.0709 y(0.3) = 1.5023, y(0.4) = 1.8370

(9) yp = 1.0408, yc = 1.0410, (10) yp = 1.0186, yc = 1.0187

yp = 2.1616, yc = 2.1615

9.7 PICARD’S METHOD

9.7.1 Picard’s Method of Successive Approximations

We have seen Taylor’s series method gives the solution of an ordinary differential equation as a series. Picard method is also a method which gives the solution as a series.

Consider the first order differential equation.

Eqn1234

We have Eqn1235

Integrating from Eqn1236 to x, the corresponding y values are y0 and y.

Eqn1237(1)

This equation is complicated because the unknown function y appears inside the integral as well as outside.

This type of equation is called an integral equation and it is solved by successive approximation or iteration.

The first approximation of y is obtained by putting y0 for y in the integrand.

Eqn1238

Now the second approximation is obtained by putting Eqn1239 in the integrand of (1)

Eqn1240

The process is repeated and we get the nth approximation Eqn1241.

This method is known as picard’s method.

Note:

  • The sequence of approximations Eqn1242 converges to the solution Eqn1243 of Eqn1244 if the function Eqn1245 is bounded in the neighbourhood of Eqn1246 and satisfies
  • Lip schitz condition
  • i.e. Eqn1247, where k is a constant.
  • In practice this method is not convenient if the integrand is complicated.

WORKED EXAMPLES

Example 1

Given Eqn1248 Find the value of y when Eqn1249 by picard’s method. Check the result with the exact value.

Solution

Given equation is Eqn1250

Here Eqn1252

By Picard’s method,

Eqn1253(1)

First approximation is Eqn1254

Eqn1254a

Eqn1254b

Second approximation is

Eqn1432

Third approximation is

Eqn1256

Fourth approximation is

Eqn1257

Eqn1257

Eqn1257a

The fifth approximation is

Eqn1258

When x = 0.1, Eqn1259

Eqn1260

When x = 0.2,

Eqn1261

When Eqn1262

When Eqn1262a

The actual solution of the first order linear equation Eqn1263 is Eqn1264

When Eqn1265

When Eqn1266

Comparing with the actual value, we find that the computed value of Picard’s method is correct upto last decimal.

Example 2

Use picards method to approximate the value of y when Eqn1278 given that Eqn1279 when Eqn1280 and Eqn1281

Solution

Given equation is Eqn1282

Here Eqn1285

Picards formula is

Eqn1286

The first approximation is

Eqn1287

The Second approximation is

Eqn1288

Eqn1288a

The third approximation involves squares of Eqn1289 which is a big expression.

So we stop with Eqn1290,

When x = 0.1 Eqn1292

When Eqn1293

Example 3

Use Picard’s method to find the value of y when Eqn1267 given Eqn1268

Solution

Given Eqn1269 and Eqn1270 when Eqn1271

Here Eqn1272

Picards formula is Eqn1273

The first approximation is Eqn1274

The second approximation is

Eqn1433

Eqn1434

This integral cannot be evaluated in closed form. Hence we cannot proceed. So, we take y(1) as the approximate solution.

When Eqn1276

∴ when Eqn1277

Exercises 9.4

  • Using picards method solve Eqn1294 with Eqn1295 upto third approximation. Hence evaluate y when Eqn1296
  • Find the solution of Eqn1297 which passes through the point (0, 1). Find y correct to three decimal places when Eqn1298 and Eqn1299
  • Find the solution with Eqn1300 by picards methods.
  • Eqn1301

Answers 9.4

  • Eqn1302 (2) Eqn1303
  • Eqn1303a
SHORT ANSWER QUESTIONS
  1. State Taylor series algorithm for the first order differential equation.
  2. Write the merits and demerits of the Taylor’s method of Solution.
  3. Write down the Euler algorithm to solve the differential equation Eqn1308
  4. Given y′ = x + y, y(0) = 1 find y(0.1) by Euler’s method.
  5. State modified Euler algorithm to solve y′ = f(x, y), y(x0) = y0.
  6. State the modified Euler’s formula to solve y′ = f(x, y), y(x0) = y0 at x = x0 + h.
  7. Write the Runge-Kutta algorithm of 4th order to solve Eqn1308 with y(x0) = y0.
  8. State the special advantage of Runge-Kutta method over Taylor series method.
  9. State the difference between single step and multistep methods in solving ordinary differential equations numerically?
  10. What is a predictor-corrector method of solving a differential equation Eqn1328
  11. State Milne’s Predictor corrector formula.
  12. How many pairs of prior values are required to predict the next value in Milne’s method?
  13. State Milne’s Predictor-corrector formula to solve Eqn1337 Eqn1337a Eqn1337b Eqn1337c Eqn1337d at Eqn1338
  14. State the Taylor series formula to find Eqn1341 for solving Eqn1342
  15. Write down the modified Euler’s formula for ordinary differential equation.
  16. By Taylor series method find Eqn1346 given that Eqn1347 and Eqn1348
  17. Find the Taylor series expansion upto x3 term satisfying Eqn1359
  18. Using modified Euler’s method, evaluate Eqn1370 if Eqn1371
  19. Write the Adam’s predictor-corrector formula.
  20. Using Euler’s modified method, find y at Eqn1387 ifEqn1388
  21. Using Euler’s method find y at Eqn1398 if Eqn1399
  22. Using Taylor’s series method find Eqn1406 given that Eqn1407, Eqn1408
  23. Find Eqn1420 for the equation Eqn1421 given that Eqn1422 by using Euler’s method.
C09U002
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.195.34