Ma6452 Notes 1 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 238

www.rejinpaul.

com
www.rejinpaul.com

www.padeepz.net
STATISTICS AND NUMERICAL METHODS

UNIT- I

Population:

A population consists of collection of individual units, which may be person’s or experimental


outcomes, whose characteristics are to be studied.

Sample:

A sample is proportion of the population that is studied to learn about the characteristics of the
population.

Random sample:

A random sample is one in which each item of a population has an equal chance of being

et
selected.

.n
Sampling:

pz
The process of drawing a sample from a population is called sampling.

Sample size:
ee
The number of items selected in a sample is called the sample size and it is denoted by ‘n’. If
n 30, the sample is called large sample and if n 30, it is called small sample
ad

Sampling distribution:
.p

Consider all possible samples of size’ n’ drawn from a given population at random. We calculate
mean values of these samples.
w

If we group these different means according to their frequencies, the frequency distribution so
w

formed is called sampling distribution.


w

The statistic is itself a random variate. Its probability distribution is often called sampling
distribution.

All possible samples of given size are taken from the population and for each sample, the statistic
is calculated. The values of the statistic form its sampling distribution.

Standard error:

The standard deviation of the sampling distribution is called the standard error.

Notation:

Pop. mean = ; Pop. S.D = ; P - Pop. proportion

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
sample mean = x; sample S.D = s; P' = sample Proportion

Note
Statistic S.E (Standard Error)

x
n
Difference of sample 1 1
p1' p2 ' pq
proportions n1 n2
2 2
Difference of sample 1 2
x1 x2
means n1 n2
pq
p' (Sample proportion)
n

et
.n
Null Hypothesis ( H 0 )

pz
The hypothesis tested for possible rejection under the assumption that it is true is usually called
null hypothesis. The null hypothesis is a hypothesis which reflects no change or no difference. It is
ee
usually denoted by H 0
ad

Alternative Hypothesis ( H1 )

The Alternative hypothesis is the statement which reflects the situation anticipated to be correct if
.p

the null hypothesis is wrong. It is usually denoted by H1 .


w

For example:
w

If H0 : = (There is no diff' bet' the means) then the formulated alternative hypothesis is
w

1 2

H1 : 1 2

ie., either H1 : 1 2 (or) 1 2

Level of significance

It is the probability level below which the null hypothesis is rejected. Generally, 5% and 1% level
of significance are used.

Critical Region (or) Region of Rejection

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
The critical region of a test of statistical hypothesis is that region of the normal curve which
corresponds to the rejection of null hypothesis.

The shaded portion in the following figure is the critical region which corresponds to 5% LOS

et
.n
Critical values (or) significant values

pz
The sample values of the statistic beyond which the null hypothesis will be rejected are called
critical values or significant values
ee
Level of significance
Types of test 1% 5% 10%
ad

Two tailed test 2.58 1.96 1.645


.p

One tailed test 2.33 1.645 1.28


w

Two tailed test and one-tailed tests:


w

When two tails of the sampling distribution of the normal curve are used, the relevant test is
w

called two tailed test.

The alternative hypothesis H1 : 1 2 is taken in two tailed test for H 0 : 1 = 2

When only one tail of the sampling distribution of the normal curve is used, the test is described
as one tail test H1 : 1 2 (or) 1 2

H0 1 2
two tailed test
H1 1 2

Type I and type II Error

Type I Error : Rejection of null hypothesis when it is correct

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Type II Error : Acceptance of null hypothesis when it is wrong

Procedure for testing Hypothesis:

1. Formulate H 0 and H1
2. Choose the level of significance
3. Compute the test statistic Z, using the data available in the problem
4. Pick out the critical value at % level say Z
5. Draw conclusion: If |Z| < Z , accept H0 at % level. Otherwise reject H0 at % level

Test of Hypothesis (Large Sample Tests)

Large sample tests (Test based in Normal distribution.)

Type - I: (Test of significance of single mean)

et
Let {x1, x 2 ,. . . .xn } be a sample of size (n 30) taken from a population with mean and

.n
S.D . Let x be the sample mean. Assume that the population is Normal.

pz
To test whether the difference between Population mean
not and this sample comes from the normal population whose mean is
and sample mean x is significant or
or not.
ee
H0 : = a specified value
ad

H1 : a specified value
.p

we choose = 0.05(5%) (or) 0.01(1%) as the Level of significance


w

the test statistic is


w

x x
Z= N(0.1) for large n.
w

S .E ( x)
n

Note:
s
1. If is not known, for large n, S.E x = where 's' is the sample S.D
n

Problems:

1. A sample of 900 members is found to have a mean 3.5cm. Can it reasonably regarded as a simple
sample from a large population whose mean is 3.38 and a standard deviation 2.4cm?

Solution:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
We formulate the null hypothesis that the sample is drawn from population whose mean is
3.38cm.

i.e., H 0 : = 3.38

H1 : 3.38

Hence it is a two-tailed test

Level of significance = 0.05

x
Test statistic Z =

et
n

.n
Given x 3.5, =3.38, n = 900, =2.4

Z=
3.5 3.32
2.4
900
1.5
pz
ee
Critical value:
ad

At 5% level, the tabulated value of Z is 1.96

Conclusion:
.p

Since |Z| = 1.5 < 1.96, H 0 is accepted at 5% level of significance


w
w

i.e., the sample comes from a population with mean 3.38cm


w

2. A manufacturer claims that his synthetic fishing line has a mean breaking strength of 8kg and S.D
0.5kg. Can we accept his claim if a random sample of 50 lines yield a mean breaking of 7.8kg. Use 1%
level of significance.

Solution:

We formulate H 0 : =8

H1 : 8

L.O.S = 0.01

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x
Test statistic Z =

Given x 7.8, = 8, n = 50, = 0.5

7.8 8
Z= 2.828
0.5
50

|Z| = 2.828

Critical value:

et
At 1% level of significance the table of Z = 2.58

.n
Conclusion:

Since |Z| > 2.58, H 0 is rejected at 1% level pz


ee
i.e., the manufacturer’s claim is not accepted

3. A random sample of 200 Employee’s at a large corporation showed their average age to be 42.8 years,
ad

with a S.D of 6.8 years. Test the hypothesis H 0 : = 40 versus H1 : > 40 at = 0.01 level of
significance.
.p

Solution:
w

We set up H 0 : = 40
w

H1 : 40
w

It is one tailed test.

L.O.S = 0.01

x
Test statistic Z =

Given x 42.8, = 40, n = 200, = 6.89

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
42.8 40
Z= 5.747
6.89
200

Critical value:

For one-tail test, the table value of Z at 1% level = 2.33

Conclusion:

Since |Z| =5.747> 2.33, H 0 is rejected at 1% level.

i.e., The hypothesis = 40 is accepted at this level.

Type - II:

et
Test of significance of difference of two means

.n
Consider two samples of sizes n1 and n2 taken from two different populations with population
means 1 and 1 and S.D's 1 and 2
pz
ee
Let x1 and x2 be the sample means and S1 and S2 be the S.D's of the samples

The formulated null and alternative hypothesis is,


ad

H0 : 1 = 2
.p

H1 : 1 2
w

The test statistic 'Z' is defined by


w

x1 x2
w

Z=
S .E ( x1 x2 )

x1 x2
ie., Z = N(0,1)
2 2
1 2
n1 n2

We use the los is 0.05 (or ) 0.01

If |Z| < Z , H0 is accepted at %Los

otherwise, H0 is rejected at %Los

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Note:

In many situations, we do not know the S.D’s of the populations (or) population from which the
samples are drawn.

In such cases, we can subs the S.D’s are of samples S1 and S2 in place of 1 and 2

x1 x2
The test statistic Z =
s12 s2 2
n1 n2

Problems

The mean of two sample large samples of 1000 and 200 members are 67.5 inches and 68 inches

et
respectively. Can the samples be regard as drawn from the population of standard deviation of 2.5 inches?
Test at 5% Los

.n
Solution

we set up H0 : 1 2
pz
ee
ie., the samples are drawn from the sample population
ad

H1: 1 2
.p

x1 x2
The test statistic Z =
w

1 1
w

n1 n2
w

Given x1 67.5; n1 = 1000

x2 68; n2 = 2000; =2.5

67.5 68
Z= 5.164
1 1
2.5
1000 2000

|Z| = 5.164

We choose the Los =0.05

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Critical value:

The table values of Z at 5% Los is Z = 1.96

Conclusion:

Since |Z| > 1.96, H 0 is rejected at 5% Los.

The sample cannot be regards as drawn from the same population.

2. Samples of students were drawn from two universities and from the weights is kilogram. The
means and S.D’s are calculated. Test the significance of the difference between the means of two
samples
Mean S.D Sample Size

et
University A 55 10 400
University B 57 15 100

.n
Solution:

we set up H0 : 1 2
pz
ee
ie., there is no significant difference between the sample means
ad

H1: 1 2 ; = 0.05
.p

x1 x2
The test statistic Z = `
s12 s2 2
w

n1 n2
w
w

Given x1 55; s1 = 10; n1 400

x2 57; s2 = 15; n2 =100

55 57
Z= 1.265
102 152
400 100

|Z| = 1.265

Critical value:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
The table values of Z at 5% Los is Z = 1.96

Conclusion:

Since |Z| < 1.96, H 0 is accepted at 5% Los. We conclude that the difference between the means is
not significant.

3. The average hourly wage of a sample of 150 workers is plant A was Rs. 2.56 with a S.D of
Rs.1.08. The average wage of a sample of 200 workers in plant B was Rs. 2.87 with a S.D of Rs.
1.28. Can an applicant safety assume that the hourly wages paid by plant B are greater than those
paid by plant A?

Solution:

et
Let x1 and x2 denote the hourly wages paid to workers in plant A and plant B respectively.

.n
We set up H0 : 1 2 (Plant Bnot greater than Plant A)

H1 : 1 2 (one tailed test)


pz
ee
= 0.05
ad

x1 x2
Z =
.p

s12 s2 2
n1 n2
w
w

Given x1 2.56; s1 = 1.08; n1 150


w

x2 2.87; s2 =1.28; n2 = 200

2.56 2.87
Z= 2.453
(1.08)2 (1.28) 2
150 200

|Z| = 2.453

Critical value:

The table values of Z at 5% in case of one-tailed test is Z = 1.645

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Conclusion:

Since |Z| > 1.643, H 0 is rejected at 5% Los.

The hourly wage paid by Plant B are greater than those paid by Plant A

4. A sample of size 30 from a normal population yielded 80 and variance 150. A sample of
size 40 from a second normal population yielded the sample mean 71 and variance 200.
Test H 0 : 1 2 2. Versus H1 : 1 2 2

Solution:

H0 : 1 2 2.

et
ie., the diff 'bet the means of two population is 2

.n
Versus H1 : 1 2 2 (one tailed)

Test Statistic Z =
x1 x2 1 2
pz
ee
s12 s2 2
n1 n2
ad

(80 71) 2
Z= 2.215
.p

150 200
30 40
w

Critical value:
w

For one tail test, at 5% Los the table value of z = 1.645


w

Conclusion:

Since |Z| > 1.645, H 0 is rejected.

The formulated null hypothesis H0 : 1 2 2 is wrong

5. A buyer of electric bulbs purchases 400 bulbs; 200 bulbs of each brand. Upon testing these
bulbs be found that brand A has an average of 1225 hrs with a S.D of 42 hrs. where as brand B
had a mean life of 1265 hrs with a S.D of 60 hrs. Can the buyer be certain that brand B is
Superior than brand A in quality?

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Solution:

H0 : 1 2 ;

ie., the two brands of bulbs do not differ in quality

ie., they have the same mean life

H1: 1 < 2 (one tailed)

L.o.s : = 0.05

x1 x2 x1 x2

et
Test Statistic Z =
S .E x1 x2 s12 s2 2

.n
n1 n2

Here, x1 1225; s1 = 42; n1 pz


200
ee
x2 1265; s2 =60; n2 = 200
ad

1225 1265 40
Z= 7.72
(42) 2 (60) 2 5.18
.p

200 200
w

| Z | = 7.72
w

Critical value:
w

The critical value of Z at 5% Los Z = 1.645.

Conclusion:

Since |z| < 1.645 H 0 is rejected.

The brand B is superior to brand A in equality.

Type - III:

Test of significance of single proportion:

If ‘x’ is the number of times possessing a certain attribute in a sample of n items,

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x
The sample proportion p '
n

p' :sample porportion;

p: population proportion.

The hypothesis H0 : p = p'

ie., p has a specified value

Alternative hyp: H1 : p p'

p' p
Test statistic Z =

et
pq
n

.n
Since the sample is large Z N(0,1)

Problems pz
ee
1. A coin is tossed 400 times and it turns up head 216 times. Discuss whether the coin may be
regarded as unbiased one.
ad

Solution
.p

we set up H0 : coin is unbiased


w

1 1
ie., p = q = 1- p =
2 2
w

H1 : coin is biased
w

= 0.05

p' p
Test statistic Z =
pq
n

216
Here p' ;n 400
400

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
0.54 0.5
Z= 1.6
1
600

Table value of Z = 1.96

Conclusion:

Since z < 1.96, H0 is accepted at 5% Los

Hence the coin may be regarded as unbiased


2. In a city of sample of 500 people, 280 are tea drinkers and the rest are coffee drinkers.
Can we assume that both coffee and tea are equally popular in this city at 5% Los.

et
Solution:

.n
we set up H0 : p =
2

ie., the coffee and tea are equally popular pz


ee
1
H1 : p
2
ad

p' p
Test statistic Z =
pq
.p

n
w

280
Here p' 0.56; n 500; p=0.5
500
w
w

q = 1-p = 0.5

0.56 0.5
Z= 2.68
0.5 0.5
500

Conclusion:

Since z > 1.96, H0 is rejected at 5% level


Both type of drinkers are not popular at 5% Los.
3. A manfacturing company claims that atleast 95% of its products supplied confirm to the
specifications out of a sample of 200 prodcuts, 18 are defective. Test the claim at 5% Los.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Solution
we set up H0 : The proportion of the products confirming to specification is 95%
ie., p = 0.95
H1 : p < 0.95 (one tailed test)
p' p
Z=
pq
n
200 18
Here p' 0.91; n 200
200
p = 0.95 q = 1- p = 0.05
0.91 0.95
Z= 2.595 | Z | 2.595
0.95 0.05
200

et
Critical value : at 5%Los Z 1.645
Conclusion:

.n
z =2.595 > 1.645, H0 is rejected at 5% Los(Level of significance)

pz
4. A manfacturer claims that only 4% of his products supplied by him are defective.
Sample of 600 products contained 36 defectives. Test the claim of the manufactrer.
Solution:
ee
we set up H0 : p = 0.04
H1 : p > 0.04 (one tailed test)
ad

p' p
Test Statistic Z =
pq
.p

n
Here p =0.04 q = 1-p = 0.96
w

36
p' 0.06; n 500
w

600
0.06 0.04
w

Z= 2.5
0.04 0.96
600
Critical value :
The table value of Z =1.645 at 5%L.o.s
Conclusion:
Z = 2.5 > 1.645, H0 is rejected
Manufacturer's claim is not acceptable
Type - IV: Test of significance for Difference of proportion of success in two samples:

To test the significance of the difference between the sample proportions p1' and p2' .

We formulate the null hypothesis H0 : p1 = p2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
ie., the population proportions are equal

The alternative hypothesis is H1: p1 p2

1 1
The standard error of p1' p2' pq
n1 n2

x x n1 p1' n2 p2 '
Where p= 1 2
n1 n2 n1 n2

p1' p2'
The test statistic is Z = N (0,1)
1 1
pq
n1 n2

et
Problems:

.n
1. If a sample of 300 units of a manufactured product 65 units were found to be defective and in

pz
another sample of 200 units, there were 35 defectives. Is there significant difference in the
ee
proportion of defectives in the samples at 5% Los.

Solution:
ad

H0: p1 = p2 (ie., There is no significant difference in the proportion defectives in the samples)
.p

The alternative hypothesis H1: p1 p2


w

Los: = 0.05
w

p1' p2'
w

The test statistic is Z =


1 1
pq
n1 n2

65
p1' 0.22; p 2 ' =0.175
300

100 1 4
p= q
500 5 5

1 1 4 1 1
pq 0.0365
n1 n2 25 300 200

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
0.22 0.175
Z= 1.233
0.0365

Critical value :

The table value of Z at 5% Level =1.96

Conclusion:

Z < 1.96, H0 is accepted at 5% Los.

The difference in the porportion of defectives in the samples is not significant

2. A machine puts out 16 imperfect articles in a sample of 500. After the machine is over-hauled

et
in puts out 3 imperfect articles in a batch of 100. Has the machine improved?

.n
Solution:

H0: Machine has not been improved

ie., H0 : p1 = p2
pz
ee
The alternative hypothesis H1: p1 p2 (one-tailed)
ad

Los: = 0.05
.p

p1' p2'
The test statistic is Z =
w

1 1
pq
n1 n2
w
w

16
Here p1' 0.032; p 2' =0.03
500

n1 = 500; n 2 =100

19 581
p= and q
600 600

0.032 0.03
Z= 0.104
19 581 1 1
600 600 500 100

| Z | = 0.104

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

Critical value :
The table value of Z for one tailed test Z = 1.645 at 5 Los
Conclusion:
Z < 1.645, H 0 is accepted at 5% Los.
The Machine has not improved due to overhaulding.

3. Before an increase in excise duty on tea, 800 perons out of a sample of 1000 persons were

found to be tea drinkers. After an increse is excise duty. 800 people were tea drinkers in a

sample of 1200 people. Test whether there is a significant decrease in the consumption of

et
tea after the increase in excise duty at 5% Los

.n
Solution:

pz
H0: the proportion of tea drinkers before and after the increase in excise duty are equal

ie., p1 = p 2
ee
H1: p1 p2
ad

Los: = 0.05
.p

p1' p2'
The test statistic is Z =
w

1 1
pq
n1 n2
w
w

Here x1 =800; x2 =800; n1 = 1000;

800 800
n 2 =1200; p1' 0.8; p2' = 0.67
1000 1200

x1 x2 1600 8 3
p= = = q
n1 n2 2200 11 11

1 1 24
pq 0.001 0.0008 0.0189
n1 n2 121

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
0.13
Z= 6.88 |Z| 6.88
0.0189

Critical value: At 5% Los 1.645

Conclusion:

Z > 1.645, H0 is rejected.

There is a significance decrease in the consumption of tea due to increase in excise duty.

Type - V: (Test of significance for the difference of S.D’s of two large samples)

et
Let S1 and S2 be the S.D's of two indepedent samples of sizes n1 and n2 respectively

.n
The null hypothesis H0 : 1 2 ;

ie., the sample S.D's do not differ significantly.

The Alternative Hypothesis H1:


pz
ee
1 2

S1 S2
the test statistic is Z = N (0,1) for large 'n'
ad

S.E (S1 S2 )

ie., If and are known,


.p

1 2

S1 S2
w

Z= N (0,1)
2 2
1 2
w

2n1 2n2
w

(or)If 1 and 2 are not known,

S1 S2
Z=
S12 S2 2
2n1 2n2

If |Z| > Z , H0 is rejected at % level, otherwise H0 is accepted

Problems:

1. The sample of sizes 1000 and 800 gave the following results

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Mean S.D
Sample I 17.5 2.5
Sample II 18 2.7

Assuming that the samples are indepedent, test whether the two samples may be

regarded as drawn from the universe with same S.D's at 1% Level.

Solution:

We set up H0 : 1 2 ;

ie., two samples maybe regarded as drawn from the universe with same S.D’s

H1 :

et
1 2

.n
S1 S2
Test statistic Z =
S12 S2 2
2n1 2n2
pz
ee
Here n1 = 1000; n2 =800; S1 2.5; S2 = 2.7

2.5 2.7 0.2


ad

Z = =
(2.5)2 (2.7) 2 0.3125 0.455625
2000 1600
.p

| Z | =2.282
w

Critical value :
w

At 1% Los, the tabulated value is 2.58


w

Conclusion:
Since Z < 2.58, H 0 is accepted at 1% Los.
The two samples may be regarded as drawn from the universe with the same S.D's

2. In a survey of incomes of two classes of workers, two random samples gave the following

results. Examine whether the differences between (i) the means and (ii) the S.D's are

significant.

Sample Size Mean annualincome (Rs) S.D in Rs

I 100 582 24

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
II 100 546 28

Examine also whether the samples have been drawn from a population with same S.D

Solution:

(i) We set up H0 : 1 2 ;

ie., the difference is not significant

H1 : 1 2

Here it is two tailed test

x1 x 2 582 546

et
Test statistic Z =
2 2
S1 S2 (24)2 (28)2

.n
n1 n2 100 100

Z =
360
(24) 2 (28) 2
=9.76
pz
ee
| Z | = 9.76
ad

Critical value :

At 5% Los, the table value of Z is 1.96


.p

Conclusion:
w

Since Z > 1.96, H0 is rejected at 5% Los.


w
w

There is a significant difference in the means in the two samples.

(ii) H 0 : 1 2

H1 : 1 2

Here it is two tailed test


Los: = 0.05

S1 S2 24 28
Test statistic Z =
S12 S2 2 (24)2 (28)2
2n1 2n2 200 200

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
40
Z = = 1.53
288 392

| Z | = 1.53

Critical value :

At 5% Los, the table value of Z is 1.96

Conclusion:

Since Z < 1.96, H0 is accepted at 5% Los.

The difference between the sample S.D's is not significant.

et
Hence we conclude that the two samples have been drawn from population with the same S.D's

.n
3. Two machines A and B produced 200 and 250 items on the average per day with a S.D of

pz
20 and 25 items reply on the basis of records of 50 day's production. Can you regard both

machine's equally efficient at 1% Los.


ee
Solution:
ad

(i) H 0 : 1 2 ; ie., the two machines aer equally efficient


H1 :
.p

1 2

Los: = 0.05
w

S1 S2
w

Test statistic Z =
S12 S2 2
w

n1 n2

n1 =200 50; S2 = 25

n2 =250 50; S1 20

(20 25) 50 5 50
Z = = 23.57
400 625 1 1.25
400 500

| Z | = 23.57

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Critical value :
At 1% Los, the table value of Z is 2.58

Conclusion:
Since Z > 2.58, H 0 is rejected at 1% Los.

We conclude that the both machines are not equally efficient at 1% Los

Small sample Tests (t - Test):


Definition:
Consider a random sample {x1 ,x 2 ,.....x n }of size 'n' drawn from a Normal population with
2
mean and variance .
n

et
xi
i 1
Sample mean x
n

.n
2
The unbiased estimate of the pop.variance is denoted as s 2 .

s2
n

i 1
( xi x) 2 pz
ee
n 1
|x |
The student's t-statistic is defined as t = n , Where n = sample size
ad

s
The degree of freedon of this statistic
V=n 1
.p

Type I:
w

To test the significance of a single mean (For small samples)


w

x x
w

Test Statistic t =
S .D S
n 1 n

s = sample S.D and

1 ns 2
S2 ( x x)2 (or) S=
n 1 n 1

If the computed value of t is greater than the critical value t ,Ho is rejected

(or) if |t| < t , the null hypothesis Ho is accepted at level.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1. A machinist is making engine parts with axle diameter of 0.700 inch. A random sample of

10 parts shows a mean diamter of 0.742 inch with a S.D of 0.40. Test whether the work is

meeting the specification at 5% Los

Solution:

Given that n =10; x 0.742 inches

ns 2 10 (0.40)2
= 0.700 inches S= = 0.4216
n 1 9

s = 0.40 inches S = 0.42

et
Null hypothesis H0 : the product is confirming to specification ie., there is no significant

.n
difference between x and

H0 : 0.700inches pz
ee
H1 : 0.700inches
ad

|x |
Test Statistic t = n =0.316
s
.p

degrees of freedom = n-1 = 9


w

Table value of t at 5% level = 2.26


w

the product is meeting the specification.


w

2. Ten individuals are chosen at random from a population and their heights are found to be

in inches 63, 63, 66, 67, 68, 69, 70, 70, 71, 71. In the light of this data, discuss the suggestion

that the mean height in the universe is 66 inches.

Solution:

x : 63 63 66 67 68 69 70 70 71 71

(x- x)2 : 23.04 23.04 3.24 0.64 0.04 1.44 4.84 4.84 10.24 10.24

x 678 and (x - x)2 81.6

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x 678
x 67.8
n 10

(x - x) 2 81.6
S= 3.011
9 9

Let H 0 : = 66 the mean and height if the universe is 66 inches


and H1 : 66
Los = 0.05
|x | 67.8 66
Test Statistic t = n 10 1.89
s 3.011

Table value of t for 9 d.f at 5% Los is t 0 2.2

et
Since |t| < t 0 , H0 is accepted at 5% level.

.n
The mean height of universe of 66 is accepted.

Type II: (Test of significance of difference of mean) pz


ee
x1 x2
Test Statistic t =
1 1
ad

S
n1 n2
.p

n1s12 n2 s2 2
Where S2 (or)
n1 n2 2
w

( x1 x1 ) 2 x 2 )2
w

2
( x2
S
n1 n2 2
w

The number of degrees of freedom = V = n1 n2 2

The calculated value of t is less than the table value of t for d.f = n1 n2 2, H0 is accepted

Otherwise H0 is rejected at the selected Los

1. Two independent samples from normal pop's with equal variances gave the following

results

Sample Size Mean S.D

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 16 23.4 2.5

2 12 24.9 2.8

Test for the equations of means.

Solution:

(i) We set up H0 : 1 2 ; ie., there is no significant difference between their means

H1 : 1 2

Los: = 0.05

x1 x2 n1s12 n2 s2 2
Test Statistic t = Where S2

et
1 1 n1 n2 2
S
n1 n2

.n
Given x1

x2
23.4; n1 16; s1

24.9; n 2 12; s 2 2.8


2.5
pz
ee
n1s12 n2 s2 2 16(2.5) 2 12(2.8) 2
S2 =
ad

n1 n2 2 16 12 2

100 94.08
.p

= =7.465
26
w

S = 2.732
w

23.4 24.9
t= = -1.438
w

1 1
2.732
16 12

| t | = 1.438

Number of degrees of freedom = n1 n2 2 26

Critical value :

The table value of t for 26 d.f at 5% Los is

t 0.05 2.056

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Conclusion:

Since the calculated value of t is less than table value of t,

H0 is accepted at 5% Los.

There is no significant difference between their means

2. Two independent samples of 8 and 7 items respectively had the following values

Sample I : 9 13 11 11 15 9 12 14

Sample II : 10 12 10 14 9 8 10

Is the difference between the means of the samples significant?

et
Solution:

.n
We set up H0 : 1 2

H1 : 1 2
pz
ee
Hence it is a two tailed test
ad

Los: = 0.05

x1 x2
Test Statistic t =
.p

1 1
S
n1 n2
w
w

2
( x1 x1 ) 2 ( x2 x 2 )2
Where S
n1 n2 2
w

Computation of t:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
d1 ( x1 x1 ) d2 ( x2 x2 )
x1 d1 x1 11.75 d1 2
( x1 x1 ) 2 x2 d2 x2 10.43 d 22 ( x2 x2 ) 2

9 -2.75 7.5625
10 -0.43
0.1849
13 1.25 1.5625
12 1.57
2.4649
11 -0.75 0.5625
10 -0.43
0.1849
11 -0.75 0.5625
14 3.57
12.7449
15 3.25 10.5625
9 -1.43
2.0449
9 -2.75 7.5625

et
8 -2.43
5.9049
12 0.25 0.0625
10 -0.43

.n
0.1849
14 2.25 5.0625

d1 3.5 d12 33.5


pz d2 0.01 d22 23.7143
ee
6
ad

x1 11 11.75
8
3
x2 10 10.43
.p

7
w

2
2 2
d1 36
( x1 x1 ) d 1 38 33.5
w

n1 8
w

2
2 2
d2 9
( x2 x2 ) d2 25 33.5
n2 7

33.5 23.71
S2 S = 2.097
8 7 2

x1 x2
t=
1 1
S
n1 n2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
11.75 10.43
=
1 1
2.097
8 7

t = 1.218

d.f = 8 + 7 - 2 = 13

Critical value:

The table value of t for 13 d.f at 5% level is 2.16

Conclusion:

Since | t | < 2.16, H0 is accepted

et
There is no significant difference between the means of the two samples.

.n
Type III:

pz
Testing of significance of the difference in means paired data.
ee
When the two samples are of the same sizes and the data are paired
d
the test statistic is t =
ad

S
n
Where d mean of differences
.p

(d d ) 2
w

and S =
n 1
w

Degrees of freedom = n-1


w

1. Elevan school boys were given a test in painting. They were given a month's further tution
and a second test of equal difficulty was held at the end of the month. Do the marks give
evidance that the students have beneifit by extra coaching?

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

Boys: 1 2 3 4 5 6 7 8 9 10 11

First Test (marks) 25 23 19 22 21 19 22 21 25 18 20

Second test (marks) 26 22 22 19 23 21 24 24 25 22 18

Solution:

H0 : the student have not been benefited by extra coaching.

ie., The mean of the difference between the marks of the two tests is zero

et
ie., H0 : d 0

.n
H1: d 0

Los: = 0.05 (or) 5% pz


ee
d
the test statistic is t =
S
ad

S. No 1 2 3 4 5 6 7 8 9 10 11
.p

d=x-y -1 1 -3 3 -2 -2 -2 -3 0 -4 2
w

d-d 0 2 -2 4 -1 -1 -1 -2 1 -3 3
2 0 4 4 16 1 1 1 4 1 9 9
w

d-d
w

d 11
d 11; d 1
n 11
2
d-d 50

(d d ) 2 50
S= 5 2.236
n 1 10

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
d 1
t=
S 2.236
n 11

1
|t|= 1.48
0.625

No. of d.f = 11-1 = 10

Critical value:

At 5% Los, the table value of t at 10 degree freedom is 1.812

Conclusion:

et
| t | < 1.812, H0 is accepted at 5% Los.

.n
The students have not been benefited by extra-coaching.

48 36 37 54 69
pz
2. The scores of 10 candidates prior and after training are given below,
Prior : 84 83 96 90 65
ee
After : 90 58 56 49 62 81 84 86 84 75
Is the training effective?
ad

Solution:
.p

We set up H0 : the training is not effective


w

ie., H0 : d 0
w

H1: d 0
w

d
the test statistic is t =
S
n

S. No 1 2 3 4 5 6 7 8 9 10
d=x-y -6 -10 -20 -12 -8 -12 -1 10 6 -10
d-d 0.3 -3.7 -13.7 -5.7 -1.7 -5.7 5.3 16.3 12.3 -3.7
2 0.09 13.69 187.69 32.49 2.89 32.49 28.09 265.69 151.29 13.69
d-d

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

d 63
d 63; d 6.3
n 10
2
d-d 728.1

(d d ) 2 728.1
S= 80.9 8.994
n 1 9

S 8.994

6.3 6.3
t 2.21
8.994 2.844

et
10

.n
| t | = 2.21

Degrees of freedom V= n-1 = 10-1 = 9 pz


ee
Critical value:

At 5% Los, the table value of t at 9 degree freedom is 2.262


ad

Conclusion:
.p

| t | < 2.262, H0 is accepted at 5% Los.


w

There is no effective in the training.


w

Variance Ratio Test (or) F-test for equality of variances


w

This test is used to test the significance of two or more sample estimates of population variance

The F-statistic is defined as a ratio of unbiased estimate of population variance


2
S2 x1 x1
F = 12 ; Where S12
S2 n1 1

2
x2 x2
S2 2
n2 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
S12
The distribution of F = 2 S12 S2 2 is given by the following p.d.f
S2

If S12 and S22 are the variances of two sample of sizes n1 and n 2 respectively, the estimate

of the population variances based on these samples are respectively

n1s12 n 2s 2 2
S12 ; S2 2
n1 1 n2 1

d.f V1 = n1 1 &V2 = n2 1

While defining the statistic F, the large oftwo variances is always placed in the numerator and

et
smaller in the denominator

.n
Test of significance for equality of population variances

pz
Consider two independent R, samples x1 ,x 2 ,.......x n1 & y1 ,y 2 ,.......y n 2 from normal populations
The hypothesis to be tested is
ee
"The population variances are same".
ad

2 2
we set up: H0 : 1 = 2

2 2
& H1:
.p

1 2
w

S12
The test statistic F= 2 S12 S2 2
S2
w

n n
w

1 2 1 2
S12 xi x and S12 yj y
n1 1 i 1 n1 1 j 1

F distribution with d.f V1 = n1 1 &V2 = n2 1

Problems:

1. It is known that the mean diameters o rivets produced by two firms A and B are practically the
same but the standard deviations may differ.
For 22 rivets produced by A, the S.D is 2.9 m, while for 16 rivets manufactured by B, the S.D is
3.8 m. Test whether the products of A have the same variability as those of B
Solution:
2 2
H0 : 1 = 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
ie., variability for the two types of products are same.
Los: = 0.05 (or) 5%
S12
The test statistic F= 2 S12 S2 2
S2
Given, n1 = 22; n 2 = 16
S1 = 2.9; S2 = 3.8
n1s12 22(2.9) 2
S12 8.81
n1 1 22 1
n 2s 2 2 16(3.8)2
S2 2 15.40
n2 1 16 1
S2 2
F = S2 2 S12

et
S12
15.40

.n
=
8.81
F = 1.748
Number of degrees of freedom are V1 16 1 15
V2
pz
22 1 21
ee
Critical value:
At 5% Los, the table value of F at d.f (15,21) is F = 2.18
ad

Conclusion:
F< 2.18, H0 is accepted at 5% Los.
.p

Variability for two types of products may be same.


2. Two random samples of sizes 8 and 11, drawn from two normal populations are characterized
w

as follows
w

Size Sum of observations Sum of square of observations


w

Sample I 8 9.6 61.52

Sample II 11 16.5 73.26

You are to decide if the two populations can be taken to have the same variance.

Solution:

Let x and y be the observations of two samples

2 2
we set up: H0 : 1 = 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2 2
& H1: 1 2

For sample I

2
2
x2 x
s 1
n n

2
61.52 9.6
=
8 8

= 7.69 (1.2)2 7.69 1.44

s12 6.25

et
For sample II

.n
2
y2 y
s2 2

n n pz
ee
2
73.26 16.5
=
11 11
ad
.p

= 6.66 (1.5)2 6.66 2.25


w

s22 4.41
w

n1s12 8(6.25)
S12 7.143
w

n1 1 7

n 2s 2 2 11(4.41)
S2 2 4.851
n2 1 10

S2 2
F = S2 2 S12
S12

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
7.143
= 1.472
4.851

F = 1.472

Number of degrees of freedom are V1 n1 1 8 1 7


V2 n 2 1 11 1 10
Critical value:
The table value of F for (7,10) d.f at 5% Los is 3.14
Conclusion:
Since | F |<3.14, H 0 is accepted at 5% level
Variances of two populations may be same.
Variability for two types of products may be same.

et
Chi-Square Test

.n
Definition

pz
If Oi (i = 1, 2, . . . . . n) are set of observed (experimental) frequencies and Ei (i 1,2,....n)
ee
are the corresponding set of expected frequncies, then the statistic

2
is defined as
ad

2
n
Oi Ei
.p

i 1 Ei
w

The degree of freedom is v = n 1


w

For fitting Binomial distribution v = n 1


w

For fitting Poisson distribution v = n 2

For fitting Normal distribution v=n 3

Chi-square Test of Goodness of fit


2
If the calculated value of is less than the table value at a specified Los.
The fit is considered to be good
otherwise the fit is considered to be poor.
2
Conditions for applying Test

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
For the validity of chi-square test of "goodness of fit" between theory and experiment following

Conditions must be satisfied.

(i) The sample of observations should be independent


(ii) Constraints on the cell frequncies. If any, should be linear.
(iii) N, the total frequency should be reasonably large, say greater than 50.
(iv) N0 theoretical cell frequency should be less than 5, If any theoretical cell
frequency less than 5, the for application 2 test
It is pooled with the preceeding or succeeding frequency so that the pooled
frequency is greater than 5 and finally adjust for the d.f lost in pooling.

Problems

et
1. The following table gives the number of aircraft accident that occured during the various days

.n
of the week. Test whether the acidents are uniformly distributed over the week.

Days : Mon
No.of accidents : 14
Tue
18
Wed
12
Thu
11
pz
Fri
15
Sat
14
Total
84
ee
Solution:
ad

We set up H0 : The accidents are uniformly distributed over the week

Los α = 0.05
.p

2
n
Oi Ei
w

2
Test Statistic
i 1 Ei
w

Under the nul hypothesis,


w

84
The expected frequency of the on each day = 14
6

Oi : 14 18 12 11 15 14

Ei : 14 14 14 14 14 14

2 2 2 2 2 2
2 14 14 18 14 12 14 11 14 15 14 14 14
14 14 14 14 14 14

= 1.143 + 0.286 + 0.643 + 0.071

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
= 2.143

Number of degrees of freedom V = n 1=7 1=6

Critical value:
2
The tablulated value of at 5% for 6 d.f is 12.59

Conclusion:
2
Since < 12.59, we accept the null hypothesis

We conclude that the accidents are uniformly distributed over the week.

2. The theory predicts the population of beans in the four groups A, B , C and D should be

et
9:3:3:1. In an experiment among 1600 beans, the number in the four groups were 882, 313,

.n
287 and 118. Does the experimental result support the theory?

Solution:

We set up the null hypothesis


pz
ee
H0 : The theory fits well into the experiment
ad

ie., the experimental results supports the theory


.p

Total Number of beans = 1600


w

Divide these beans in the ratio 9:3:3:1


w

To calculate the expected frequencies


w

9
E(882) = 1600 900
16

3
E(313) = 1600 300
16

3
E(287) = 1600 300
16

1
E(118) = 1600 100
16

Oi : 882 313 287 118

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Ei : 900 300 300 100

2
n
2 Oi Ei
Test Statistic
i 1 Ei

2 2 2 2
2 882 900 313 300 287 300 118 100
900 300 300 100

= 0.36 + 0.563 + 0.563 + 3.24


2
= 4.726

Critical Value:

et
2
The table value of at 5% for 3 d.f is 7.815

.n
Conclusion:

Since 2
< 7.815, H0 is accepted at 5% Los.
pz
ee
We conclude that there is a very good correspondent between theory and experiment

3. 4 coins were tossed 160 times and the following results were obtained.
ad

No. of heads : 0 1 2 3 4
.p

Frequency : 19 50 52 30 9 160
w

0 50 104 90 36 280
w

2
Test the goodness of fit with the help of on the assumption that the coins are unbiased
w

Solution:

We set up, the null hypothesis, the coins are unbiased:

1
The probability if getting the success of heads is p =
2

1
q = 1- p =
2

When 4 coins are tossed, the probability of getting 'r' heads is given by,

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
P(x = r) = n Cr pr q n-r ; r = 0, 1, 2, 3, 4

r 4-r
1 1
= 4Cr
2 2

4
1
= 4Cr
2

1
P(x = r) 4C r r = 0, 1, 2, 3, 4
16

1
The expected frequencies of getting 0, 1, 2, 3, 4 heads are given by 1604Cr
16

et
= 104Cr , r = 0, 1, 2, 3, 4

.n
= 10, 40, 60, 40, 10

Oi : 19 50 52 30 9 pz
ee
Ei : 10 40 60 40 10
ad

26 48 43 26 12
2
n
Oi Ei
.p

2
Test Statistic
i 1 Ei
w

2 2 2 2 2
2 19 10 50 40 52 60 30 40 9 10
w

10 40 60 40 40
w

= 8.1 + 2.5 + 1.067 + 2.5+0.1


2
= 14.267

D.f V= n-1=5-1=4

Critical value:
2
The table value of for 4 d.f at 5% Los is 9.488

Conclusion:
2
Since > 9.488, H 0 is rejected at 5% Los

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
The coins are biased

4. The follwoing table shows the distribution of goals in a football match

No. of goals : 0 1 2 3 4 5 6 7

No. of mistakes : 95 158 108 63 40 9 5 2

Fit a poisson distribution and test the goodness of fit.

Solution:

Fitting of poisson distribution

x: 0 1 2 3 4 5 6 7

et
f : 95 158 108 63 40 9 5 2

.n
fx 812 and f 480

x
fx
f
812
480
1.7
pz
ee
The expected frequencies are computed by
ad

1.7
e (1.7) r
= 480 r = 0, 1, 2, 3, 4, 5, 6, 7
.p

r!

= 88, 150, 126, 72, 30, 10, 3, 1


w
w

We set up H0 : The fit is good


w

2
n
2 Oi Ei
Test Statistic
i 1 Ei

Oi : 95 158 108 63 40 9 5 2
16

Ei : 88 150 126 72 30 10 3 1
14

2 2 2 2 2 2 2
2O E 95 88 158 150 108 126 40 30 16 14 63 72
=
E 88 150 126 30 14 72
= 0.56 + 0.43 + 2.57 + 3.33 + 1.12 +0.29

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2
= 8.30

Number of degrees of freedom V= n-2 = 6 - 2 =4

Critical value:
2
The table value of at 5% Los for 4 d.f is 9.483

Conclusion:
2
Since < 9.483, H 0 is accepted at 5% Los.

The fit is good

2
5. Apply the test of goodness of fit to the follwoing data

et
Oi : 1 5 20 28 42 22 15 5 2

.n
Ei : 1 6 18 25 40 25 18 6 1

Solution: pz
ee
H0 : The fit is good

= 0.05 (or) 5%
ad

Oi : 1 5 20 28 42 22 15 5 2
.p

6 7

Ei : 1 6 18 25 40 25 18 6 1
w

7 7
w

n=7
w

2
n
2 Oi Ei
Test Statistic
i 1 Ei
2 2 2 2 2 2 2
2 6 7 20 18 28 25 42 40 22 25 15 18 7 7
7 18 25 40 25 18 7

= 0.143 + 0.222 + 0.36 + 0.1 + 0.36 +0.5 +0


2
= 1.685

d.f V= n-1 = 7 - 1 = 6

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Critical value:
2
At 5% Los, the table value of for 6 d.f is 12.592

Conclusion:
2
Since <12.592, H0 is accepted at 5% Los.

The fit is good


6. The follwoing table shows the number of electricity failures in a town for a period of 180 days
Failures : 0 1 2 3 4 5 6 7

No. of days : 12 39 47 40 20 17 3 2

2
Use , examine whether the data are poisson distributed.

et
Solution:

.n
Fitting of poisson distribution

x: 0 1 2 3 4 5
pz 6 7
ee
f : 12 39 47 40 20 17 3 2
ad

fx : 0 39 94 120 80 85 18 14

fx 450 and f 180


.p

fx 450
w

x 2.5
f 180
w

The expected frequencies are computed by


w

2.5
e (2.5) r
= 180 r = 0, 1, 2, 3, 4, 5, 6, 7
r!

Ei = 15, 37, 46, 38, 24, 12, 5, 2

r = 0 1 2 3 4 5 6 7

We set up H0 : The fit is good

Oi : 12 39 47 40 20 17 3 2
5

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Ei : 15 37 46 38 24 12 5 2
7

2
Test Statistic

2 2 2 2 2 2 2
2 12 15 39 37 47 46 40 38 20 24 17 12 5 7
15 37 46 38 24 12 7

= 0.6 + 0.108 + 0.022 + 0.105 + 0.667 +2.083+0.5+1


2
= 4.156

d.f V = n-1 = 7 - 1 = 6

et
Critical value:

.n
2
At 5% Los, the table value of for 6 d.f is 12.592

Conclusion:
pz
ee
2
Since < 12.592, H0 is accepted at 5% Los.

The fit is good


ad

Test for Independence of Attributes


.p

Attribute A
w

A1 A2 ................A j .................. At Total


w

Attribute B1 O11 O12 ................O1j.................. O1t (B1 )


w

B B2

Bi Oi1 Oi 2 ................Oij.................. Oit (Bi )

. .

. .

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Bs Os1 Os 2 ................Osj.................. Ost (Bs )

Total (A1 ) (A2 )................(Ai ).................(At ) N

Attribute A
A1 A 2 ................A j .................. A t Total
Attribute B1 O11 O12 ................O1j.................. O1t (B1 )
B B2
.
.
.
Bi O i1 Oi 2 ................O ij.................. Oit (Bi )

et
. .
. .

.n
. .

Total
Bs O s1
(A1 )
pz
O s 2 ................O sj.................. O st
(A 2 )................(A i ).................(A t )
(B s )
N
ee
Such a table is called (s t) consistency table
ad

Here, N Total Frequency

Oij Observed frequency of (i, j)th cell


.p
w

The expected frequency eij obtained by the rule


w

row total Bi Column total A j


eij Where i = 1, 2, 3 ....... s
w

j = 1, 2 ........... t

Degrees of freedom associated with s t consistency table = (s - 1) (t - 1)

Chi-square table for 2 2 consistency table

a b 2
In a 2 2 consistency table where in the frequencies are , the value of is
c d

2 (a b c d )(ad bc)2
(a b)(a c)(c d )(b d )

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Problems :

1. An opinion poll was conducted to find the reaction to a proposed civic reform in 100 members

of each of the two political parties theinformation is tabulated below

Favorable Unfavorable Indifferent


Party A 40 30 30
Party B 42 28 30

Test for Indepedence of reduction with the party affiliations.

Solution:

We set up H0 : Reactions and party affiliations are independent

et
The expected frequencies are calculated by

.n
Total

40 30 30
pz
100
ee
42 28 30 100
ad

Total 82 58 60 200

Favorable Unfavorable Indifferent


.p

82 100 58 100 60 100


Party A 41 29 30
w

200 200 200


w
w

82 100 58 100 60 100


Party B 41 29 30
200 200 200
2
Test Statistic

2
n
2 Oi Ei
i 1 Ei

Oi : 40 30 30 42 28 30

Ei : 41 29 30 41 29 30

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2 2 2 2 2 2
2 40 41 30 29 30 30 42 41 28 29 30 30
41 29 30 41 29 30

= 0.024 + 0.024 + 0.034 + 0.034


2
= 0.116

Number of degrees of freedom =(2-1)(3-1) = 2

Critical value:
2
At 5% Los, the table value of for 2 d.f is 5.99

Conclusion:

et
2
Since < 5.99, H0 is accepted at 5% Los.

.n
The independence of reactions with the party affiliations may be correct.

pz
2. In a locality 100 persons were randomly selected and asked about their educational
ee
achievements. The results are given below.

Education
ad

Middle High School College


Male 10 15 25
Female 25 10 15
.p

Can you say that education depends on sex?


w

3. The following table gives the classification of 100 workers according to sex and the nature
w

of work. Test whether nature of work is independent of the sec of the worker.
w

Skilled Unskilled Total

Male 40 20 60

Sex Female 10 30 40

Total 50 50

Solution:

H0 : Nature of work is independent of the sex of the worker

Under H0 , the expected frequencies are

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
60 50 60 50
E(40) = 30; E(20) = 30
100 100

40 50 40 50
E(10) = 20; E(30) = 20
100 100
2
Test Statistic

2
n
2 Oi Ei
i 1 Ei

Oi : 40 20 10 30

Ei : 30 30 20 20

et
2 2 2 2
40 30 20 30 10 20 30 20

.n
2

30 30 20 20

= 3.333 + 3.333 + 5 + 5 pz
ee
2
= 16.67

Number of degrees of freedom =(2-1)(2-1) = 1


ad

Critical value:
.p

2
The table value of at 5% Los, for 1 d.f is 3.841
w

Conclusion:
w

2
Since > 3.841, H0 is rejected at 5% Los.
w

We conclude that the nature of work is dependent on sex of the worker.

4. From the following data, test whether there is any association between intelligency and

economics conditions

Intelligences
Excellent Good Medium Dull Total
Economic Good 48 200 150 80 478
Conditions Not Good 52 180 190 100 522
Total 100 380 340 180 1000

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Solution:

H0 : There is no association between intelligency and economic conditions.

Los : = 0.05 (or) 5%

Under H0 , the expected frequencies are obtained as follows

100 478 100 522


E(48) = 47.8; E(52) = 52.2
1000 1000

380 478 380 522


E(200) = 181.64; E(180) = 198.36
1000 1000

478 340 340 522

et
E(150) = 162.52; E(190) = 177.48
1000 1000

.n
180 478 180 522
E(80) = 86.04; E(100) = 93.96
1000 1000
pz
ee
Oi : 48 200 150 80 52 180 190 100
ad

Ei : 47.8 181.64 162.52 86.04 52.2 198.36 177.48 93.96

2
.p

Test Statistic
w

2
n
2 Oi Ei
Ei
w

i 1
w

2 2 2 2 2
48 47.8 150 162.52 52 52.2 190 177.48 200 181.64
47.8 162.52 52.2 177.48 181.64

2 2 2
80 86.04 180 198.36 100 93.96
86.04 198.36 93.96

= 0.0008 + 0.9645 + 0.0008 + 0.8832+1.8558+0.4240+1.6994+0.3883


2
= 6.2168

Number of degrees of freedom = (s-1)(t-1) = (2-1)(4-1) = 3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Critical value:
2
The table value of at 5% Los for 3 d.f is 7.815

Conclusion:
2
Since < 7.815, H0 is accepted at 5% Los.

We conclude that there is no association between intelligency and economic conditions

5. From the following data, test the hypothesis that the flower color is independent of flatness

of leaf

Flat leaves Curved leaves Total

et
White Flowers 99 36 135
Red Flowers 20 5 25

.n
Total 119 41 160

Solution: pz
ee
We set up: H0 : flower color is independent of flatness of leaf. Los =0.05 (or) 5%

The given probelm is a 2 x 2 consistency table


ad

2
we use the formula to find is
.p

2 (a b c d )(ad bc)2
w

(a b)(a c)(c d )(b d )


w

Here, a = 99; b = 36; e = 20; d=5


w

2 160(495 720)2 160(50625)


(135)(119)(25)(41) 16, 466,625

2
= 0.4919

Number of degrees of freedom = (s-1)(t-1) = (2-1)(2-1) = 1

Critical value:
2
The table value of at 5% Los for 1 d.f is 3.841

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Conclusion:
2
Since < 3.841, H0 is accepted at 5% Los.

Flower colour is independent of flatness of leaf.

Test for single variance

Chi-square test for population variance


2 2
In this method, we set up the null hypothesis H0 : 0 (with a specified variance)

2 ns 2
The test statistic 2

et
Where n = sample size

.n
s = sample variance

Note:
= population variance
pz
ee
If the sample size n is large (>30)
ad

2
The test statistic z= 2 2n 1 ~ N (0,1)
.p

We use the usual normal test.


w

1. A random sample of size 9 from a normal population have the following values 72, 68, 74, 77,
w

61, 63, 63, 73, 71. Test the hypothesis that the population variance is 36.
w

Solution:
2
Null hypothesis H0 : 36

2
Alternative hypothesis H1: 36

Los : 0.05 (or) 5%

2 ns 2
The test statistic 2

x : 72 68 74 77 61 63 63 73 71

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x 622
x 622; x 69.11
n 9
x x : 2.9 -1.1 4.9 7.9 -8.1 -6.1 -6.1 3.9 1.9

2
x x : 8.41 1.21 24.01 62.41 65.61 37.21 37.21 15.21 3.61

2
x x 254.89

2 ns 2 254.89
2
7.08
36

d. f n-1 = 9-1 = 8

et
Critical value:

.n
2
The table value of for 8 d.f at 5% Los is 15.51

Conclusion: pz
ee
2
Since < 15.51, H0 is accepted at 5% Los.

We conclude that the hypothesis of population variance is 36 is accepted


ad

2. Test the hypothesis that 10, given that s = 15 for a random sample of size 50 from a
.p

normal population
w

Solution:
w

Null hypothesis H0: 10


w

Alternative hypothesis H1: 36

We are given n = 50; s = 15

2 ns 2 50 225
2
= 112.5
100

2
Since 'n' is large (n > 30, the test statistic z = 2 2n 1

= 225 99 15 9.95

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
z = 5.05

This statistic z follows N(0,1)

Critical value:

At 5% Los, the table value of z is 3

Conclusion:

Since | z | > 3, H0 is rejected.

We conclude that 10

3. The standard deviation of the distribution of times taken by 12 workers for performing a Job

et
is 11 sec. Can it be taken 1 as a sample from a popualation whose S.D is 10 sec.

.n
Solution:

Let H0: 10 pz
ee
ie., the population standard deviation 10

H1: 10
ad

Los : 0.05 (or) 5% Los


.p

Given n = 12; s = 11
w

The test statistic is


w

ns 2
w

2
2

12 121
= 14.52
100
2
14.52

Degrees of freedom = n - 1 = 12 - 1 = 11

Critical value:
2
The table value of for 11 d.f at 5%Los is 19.675.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Conclusion:
2
Since < 19.675, H0 is accepted at 5% level

The S.D of the time element is 10 sec is supported.

ie., the population standard deviation 10

et
.n
pz
ee
ad
.p
w
w
w

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
NUMERICAL METHODS
www.padeepz.net
UNIT-III

Solution Of Equation And Eigen Value Problems Algebraic Equation.

If f(x) is a polynomial, then the equation f(x) = 0 is called an algebraic equation.

Ex: x3 4 x 3 0 ; x2 4 0

Transcendental equation:

Equation which involves transcendental of functions like sin x,cos x, tan x,log x ,
e x etc., are called transcendental equation

Ex: ex 2 0, log x 4cos x 12

Location of Roots:

et
The following results helps us to locate the interval in which the roots of f ( x) 0

.n
“If f ( x) is a continuous function in the interval (a, b) and if f (a) and f (b) have opposite

pz
signs, then the equation f ( x) 0 has at least one real root lying in the interval (a, b) ”.
ee
The following methods are used for solving algebraic and transcendental equations.

(i) Fixed point iteration X g ( x) method (or) method of successive approximation


ad

Newton’s Method (or Newton – Raphson methods)


.p

f ( xn )
Formula, xn xn , n 0,1, 2....
w

1
f ' ( xn )
w

If we choose the initial approximation x o close to the root then we get the root of the
w

equation very quickly.

If the initial approximation to the root is not given then we can find any two values of x
say a and b such that f (a) & f (b) are of opposite sign.

If f (a) f (b) then ‘ a ’ is taken as the first approximate to the root.

Newton’s method is also referred to as the method of tangents


2
Condition for convergent is f ( x). f "( x) f '( x)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1. Find the +ve root of x4 x 10 correct to three decimal places using Newton Raphson
Method. www.padeepz.net
Solution:

Let f x = x 4 - x -10

f ' (x) = 4x3 -1

f (1) =1-1-10 = -ve

f (2) = 24 -2-10=16-2-10= 4(+ve)

A root lies between 1 and 2

Take x0 2

f ( xn )
Formula xn 1 xn

et
f '( xn )

.n
f ( x0 )
x1 x0
f '( x0 )

2
f (2)
f '(2)
pz
ee
24 2 10
2
ad

4(2)3 1

24 2 10
.p

2
4(2)3 1
w

4
w

2
31
w

1.8709

x1 1.871(Correct to3decimal places)

f ( x1 )
x2 x1
f '( x1 )

f (1.871)
1.871
f '(1.871)

(1.871) 4 1.871 10
1.871
4(1.871)3 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
0.3835
1.871
25.199 www.padeepz.net
x2 1.856

f ( x2 )
x3 x2
f '( x2 )

f (1.856)
1.856
f '(1.856)

(1.856)4 1.856 10
1.856
4(1.856)3 1

0.010
1.856
24.574

et
x3 1.856

.n
The better approximate root is 1.856

pz
2. Find the real +ve root of 3x cos x 1 0 by Newton’s method to 6 decimal place
ee
Solution:
ad

Let f x =3x -cos x -1

f (x) = 0 1 1 2 ( ve)
.p

f (1) = 3-cos1-1 = 2 cos1


w

=1.459698 (+ve)
w

The root lies between 0 and 1


w

f (0) f (1)

Hence the root is nearer to 1

x0 0.6

f ( xn )
xn 1 xn
f '( xn )

f ( x0 )
x1 x0
f '( x0 )

f (0.6)
0.6
f '(0.6)
www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
3(0.6) cos(0.6) 1
0.6
3 sin (0.6) www.padeepz.net
0.6 ( 0.607101)

x1 0.607108

f ( x1 )
x2 x1
f '( x1 )

3( 0.607108) cos ( 0.607108) 1


0.607108
3 sin 0.607108

0.607108 (0.000006)

x2 0.607102

et
f ( x2 )
x3 x2
f '( x2 )

.n
f (0.607102)
x3 0.607102
f '(0.607102)
pz
ee
3( 0.607102) cos ( 0.607102) 1
0.607102
3 sin 0.607102
ad

0.607102 (0.0000004)
.p

x3 0.607102
w

Here x2 x3 0.607102
w

The root is 0.607102 correct to six decimal.


w

3. Solve by Newton’s method, a root of ex 4x 0

Solution:

Let f x = e x - 4x

f ' (x) = e x - 4

f (0) = e0 -4(0) = 1( ve)

f (1) = e1 - 4(0)=-1.2817(-ve)

One root lies between 0 and 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
f (0) f (1)
www.padeepz.net
Hence the root is nearer to 0

Let x0 0.3

f ( xn )
xn 1 xn
f '( xn )

f ( x0 )
x1 x0
f '( x0 )

f (0.3)
0.3
f '(0.3)

e0.3 4(0.3)
0.3
e0.3 4

et
0.1499

.n
0.3
2.650

x1 0.3566

f ( x1 )
pz
ee
x2 x1
f '( x1 )
ad

f (0.3566)
0.3566
f '(0.3566)
.p

e0.3566 4(0.3566)
0.3566
w

e0.3566 4
w

x2 0.3574
w

f ( x2 )
x3 x2
f '( x2 )

f (0.3574)
0.3574
f '(0.3574)

e0.3574 4(0.3574)
0.3574
e0.3574 4

x3 0.3574

Here, x2 x3 0.3574

Hence the root is 0.3574


www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
4. Find a root of x log10 x 1.2 0 by N.R method correct to three or four decimal places
www.padeepz.net
Solution:

Let f ( x) x log10 x 1.2

log10 log10 x

f ( x) log10 e log10 x

f (1) log10 1 1.2 1.2 ve

f (2) 2log10 2 1.2 0.598 ve

f (3) 3log10 3 1.2 0.231 ve

f (2) f (3)

et
a root lies between 2 and 3 and all it is nearer to 3.

.n
f ( xn )
xn 1 xn
f '( xn )

x1 x0
f ( x0 )
f '( x0 )
pz
ee
f (2.7)
2.7
ad

f '(2.7)

2.7 log10 2.7 1.2


.p

2.7
log10 e log10 2.7
w

0.035
2.7
w

0.867
w

0.035
2.7
0.867

x1 2.740

f ( x1 )
x2 x1
f '( x1 )

(2.74) log10 2.74 1.2


2.740
log10 e log10 2.74

0.0006
2.74
0.872

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
x2 2.740
www.padeepz.net
The revised root is 2.740

1. Find an iterative formula to find the reciprocal of a given number N and hence find the
1
value
19
Solution:
1 1 1 1
Let x = N= x- =0 N=
N x N x

1
f(x) = -N
x

-1

et
f '(x) =
x2

.n
f ( xn )
xn 1 xn
f '( xn )

1
N
pz
ee
xn
xn
1
xn 2
ad

1
xn 2
.p

xn N
xn
w

xn 1 2 xn Nxn 2
w

1
xn+1 = xn (2-Nxn ) is the iterative formula to find ,take N=19 further
w

19
1
0.05 take x 0 = 0.05 .
20

x1 0.0525

x2 0.0526

x3 0.0526

The reciprocal of 19. Correct to 4 decimal place is 0.0526.

1 N
2. Show that the iteration formula for finding the square root of N is xn 1 xn and
2 xn
hence find the value of 15
www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Solution:
www.padeepz.net
Let x N

x2 N x2 N 0

f ( x) x2 N

f '( x) 2x

f ( xn )
Newton's fomula is x n 1 xn -
f '( xn )

( xn 2 N )
xn 1 xn -
2 xn

2 xn 2 xn 2 N

et
2 xn

.n
xn 2 N
2 xn

xn
1
xn
N
; n 0,1, 2,...
pz
ee
1
2 xn

Tofind 15 :
ad

The initial approximation is x0 3.5


.p

Taking N = 15, the successive approximations are


w

1 15
x1 3.5 x1 3.893
w

2 3.5
w

1 15
x2 3.893 x 2 3.873
2 3.893

1 15
x3 3.873 x 3 3.873
2 3.873

The square root of 15, correct to 3 decimal places is 3.873

Solution Of Linear Algebraic Equation:


There are two types of methods to solve simultaneous linear algebraic equations.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1. Direct Method
i) Gauss Elimination Method
www.padeepz.net
ii) Gauss Jordon Method
2. Indirect Method (Or) Iterative Method
i) Gauss Seidel Method
ii) Gauss Jacobi Method

Solution Of Linear System By Direct Method:


Type – I

Gauss Elimination Method:


Gauss Elimination Method is a direct method which consists of transforming the given
system of simultaneous equations to an equivalent upper triangular system. From this system the

et
required solution can be obtained by the method of each substitution.

.n
Working Rules:
Consider the system of eqns. AX B
pz
ee
a11 x1 a12 x2 a13 x3 b1

a21 x1 a22 x2 a23 x3 b2


ad

a31 x1 a32 x2 a33 x3 b3


.p

Step: 1
w

From the augmented matrix


w

a11 a12 a13 b1


w

a21 a22 a23 b2


a31 a32 a33 b3

Step 2:
Reduce to upper triangular matrix

a11 a12 a13 b1


ie., 0 a22 a23 b2
0 0 a33 b3

Here, a11, a22 , a33 0 . This element is also called pivot element

Step 3:
www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
By using back substitutions we get the values of x, y, & z

Note:
www.padeepz.net
1. The first equation is called the pivotal equation.

2. The leading coefficient a11 is called the first pivot element or key element.

Problems based on gauss elimination method

1. Solve the following system 2 x y 3,7 x 3 y 4 by G.E Method

Solution:
Given, 2 x y 3

7x 3y 4

This equation is of the form AX B

et
The augmented matrix is

.n
2 13
A, B
7 3 4

2 1 3
pz
ee
~ R2 2 R2 7 R1
0 13 13
ad

2x y 3

13 y 13
.p

By back substitution, from From 2 13 y 13 y


w

y 1
w

subs. y = 1 in (1) we get


w

2x +1= 3

2x = 2

x =1

Hence the solution is


x =1

y =1

2. Solve by Gauss-Elimination method the equation


2x y 4z 12

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
8x 3y 2z 20
www.padeepz.net
4x 11y z 33

Solution:
Given system is equivalent to,

2 1 4 x 12
8 3 2 y 20
4 11 1 z 33

The augmented matrix is

2 1 4 12
(A,B) 8 3 2 20
4 11 1 33

et
2 1 4 12

.n
~ 0 7 14 28 R2 R2 4 R1 , R3 R3 2 R1
0 9 9 9

2 1 4 12
pz
ee
R2 R3
~ 0 1 2 4 R2 , R3 ,
7 9
0 1 11
ad

2 1 4 12
.p

~ 0 1 2 4 R3 R3 R2
0 0 3 3
w

By Back Substitution method


w
w

3z 3

z 1

y 2z 4

y 2 4

y 2

2x y 4z 12

2x 2 4 12

x 3

Hence the solution


www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
x=3 ; y=2 ; z =1
www.padeepz.net
2. Using gauss – Elimination method, solve the system
3.15x - 1.96y + 3.85z = 12.95
2.13x + 5.12y - 2.89z = -8.61
5.92x + 3.05 + 2.15z = 6.88

Solution:
Given system is equivalent is

3.15 1.96 3.65 x 12.95


2.13 5.12 2.89 y 8.61
5.92 3.05 2.15 z 6.88

AX B

et
The augmented matrix is

.n
3.15 1.96 3.85 12.95
(A , B) 2.13
5.92
5.12
3.05
2.89 8.61
2.15 6.88
pz
ee
3.15 1.96 3.85 12.95
ad

~ 0 20.3028 17.304 54.705 R2 3.15 R2 2, R3 3.15 R3 5.92


0 21.2107 16.0195 54.992
.p

3.15 1.96 3.85 12.95


w

~ 0 20.3028 17.304 54.705 R3 20.302 R3 21.21071


0 0 41.7892 43.8398
w
w

by back substitution method

41.7892 z 43.8398

z 1.049

20.3028 y 17.304 z 54.705

20.3028y 17.304(1.049) 54.705

y 1.800

3.15x 1.96( 1.8) 3.85 (1.049) 12.95

x 1.709

Hence thesolution is
www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
x 1.709
www.padeepz.net
y 1.800

z 1.049

Homework
1.4 x 3 y 11,3x 2 y 4( x 2, y 1)

2. x y z 1, 3x 2 y 3z 6, 2 x 5 y 4 z 5( x 2, y z 6)

3.10 x 2 y 3z 23, 2 x 10 y 5z 33,3x 4 y 10 z 41 ( x 1, y 2, z 3)

TYPE-II

Gauss Jordon Method


This method is a modification of the gauss elimination method. In this method we reduce

et
the augmented matrix into a diagonal matrix (or) unit matrix.

.n
Working Rule:
Consider the system of eqns. AX

a11 x1 a12 x2 a13 x3 b1


B
pz
ee
a21 x1 a22 x2 a23 x3 b2
ad

a31 x1 a32 x2 a33 x3 b3


.p

1) Solve the following system by G.E Method

5x1 x2 x3 x4 4
w
w

x1 7 x2 x3 x4 12
w

x1 x2 6x3 x4 5

x1 x2 x3 4x4 6

Solution:
The given system is of the form is
AX B

The augment matrix of the given system is

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1 1 1 4 6
1 7 1 1 www.padeepz.net
12
( A / B)
1 1 6 1 5
5 1 1 1 4

1 1 1 4 6
0 6 0 3 13 1 1 5
~ R2 R2 R1 , R3 R3 R1 , R4 R4 R1
0 0 5 3 1 1 1 1
0 4 4 19 34

1 1 1 4 6
0 6 0 3 18 4
~ R4 R4 R2
0 0 5 3 1 6
0 0 4 21 46

et
1 1 1 4 6
0 6 0 3 18

.n
4
~ 0 0 5 3 1 R4 R4 R3
5
0 0 0
117
5
234
5 pz
ee
By back substitution method

x1 x2 x3 4x4 6
ad

6 x2 0x3 3x4 18
.p

5x3 3x4 1
w

117 x4 234
w

5 5
w

x4 2

5 x3 6 1

5x3 5 x3 1

6 x2 6 18

6x2 12 x2 2

x1 2 1 8 6

x1 6 9 2

x1 1
www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
TheSolution is
www.padeepz.net
x1 1

x2 2

x3 1

x4 2

Gauss Jordon Method


1. Solve by gauss Jordan method

3x 4 y 5z 18; 2 x y 8 z 13;5 x 2 y 7 z 20

Solution:

The given is of the form is AX B

et
The augmented matrix of the given system is

.n
3 4 5 18
( A / B) 2
5
1 8 13
2 7 20
pz
ee
1 5 3 5
ad

~ 2 1 8 13 R1 R1 R2
5 2 7 20
.p

1 5 3 5
2 5
w

~ 0 11 14 3 R2 R2 R1 , R3 R3 R1
1 1
5 27 22 5
w
w

1 5 3 5
14 3 R2
~ 0 1 R2
11 11 11
5 27 22 5

37 70
1 0
11 11
14 3 5R2 27 R2
~ 0 1 R1 R1 , R3 R3 ,
11 11 1 1
136 136
0 0
11 11

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
37 70
11 www.padeepz.net
1 0
11
14 3 R3
~ 0 1 R3
11 11 136
0 0 1 1 11

1 0 13
37 R3 14 R3
~ 0 1 01 R1 R1 , R2 R2 ,
11 11
0 0 11

TheSolution is x 3, y 1, z 1

2. Solve by gauss Jordan method

et
2x1 7 x2 4x3 9; x1 9x2 6x3 1 ; 3x1 8x2 5x3 6

.n
Solution:

The given is of the form is AX

The augmented matrix of the given system is


B
pz
ee
2 7 4 9
ad

( A / B) 1 9 61
3 8 5 6
.p

1 9 61
w

~ 2 7 4 9 R1 R2
3 8 5 6
w
w

1 9 6 1
2 3
~ 0 25 16 7 R2 R2 R1 , R3 R3 R1
1 1
0 35 13 9

6 88
1 0
25 25
9 35
~ 0 25 16 7 R1 R1 R2 , R3 R3 R2
25 25
47 94
0 0
5 5

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
100
1 0 0 25www.padeepz.net
6 5 5
~ 0 25 0 25 R1 R1 R3 , R2 R2 16 R3
25 47 47
47 94
0 0
5 5

1 0 04
R2 R3
~ 0 1 0 1 R2 , R3
25 47
0 0 12
5
The solution is

x 4 ; y 1; z 2.

or

x1 3 ; x2 1 ; x3 2.

et
.n
Gauss Jacobi Method
pz
If x 0 , y 0 , z 0 are the initial values of x, y, z respectively, then the first iteration
ee
value are

1
x1 (d1 b1 y 0 c1 z 0 )
ad

a1
.p

1
y1 (d2 a2 x 0 c2 z 0 )
b2
w

1
w

z1 (d3 a3 x 0 b3 y 0 )
c3
w

Again using first Iteration value following System the Second Iteration Value are

1
x2 d1 b1 y 1 c1 z 1
a1

1
y2 d2 a2 x 1 c2 z 1
b2

1
z2 d3 a3 x 1 b3 y 1
c3

Proceeding in the same way if the r th iterates are x(r),y(r),z(r) then the iteration for this method is

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1 1
xr d1 b1 y r c1 z r
a1 www.padeepz.net
1 1
yr d2 a2 x r c2 z r
b1

1 1
xr d3 a3 x r b3 y r
a1

The iteration is stopped when the values x, y, z respectively with the desired degree of
accuracy .

1. Solve the Following System by Gauss-Jacobi Method


10x-5y-2z=3; 4x-10y+3z=-3; x+6y+10z=-3
Solution:

et
10 5 2
A 4 10 3 is Diagonally dominant

.n
1 6 10

Since pz
ee
|10|>|-5|+|-2|;

|-10|>|4|+|3|;
ad

|10|>|1|+|6|
.p

By Gauss Jacobi Iteration Process is


w

1
x= 3+5y+2z
10
w

1
w

y= 3+4x+3z
10

-1
z= 3+x+6y
10

Initial Values of [ x 0 , y 0 , z 0 ] (0,0,0) the Successive iteration value are

Iteration 1 1 1
x (3 5 y 2 z ) y (3 4 x 3z ) z (3 x 6 y )
10 10 10

1 0.3 0.3 -0.3

2 0.39 0.33 -0.57

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
3 0.363 0.303 -0.537
www.padeepz.net
4 0.3441 0.2841 -0.5181

5 0.3384 0.2822 -0.5048

6 0.3401 0.2839 -0.5032

7 0.3413 0.2851 -0.5044

8 0.3416 0.2852 -0.5052

9 0.3416 0.2851 -0.5052

The Solution is x = 0.342; y = 0.285; z = - 0.505

2. Solve By Gauss Jacobi method the following System

et
28x 4 y z 32; x 3 y 10 z 24; 2 x 17 y 4 z 35

.n
Solution:
Rearranging the Given System as
28 x 4 y z 32
pz
ee
x 3 y 10 z 24
ad

2 x 17 y 4 z 35

28 4 1
.p

The Coefficient matrix is A= 2 17 4 is diagonally dominant


w

1 3 10
w

Solve for x , y, z we have


w

1
x [32 4 y z ]
28

1
y 35 2 x 4 z
17

1
z 24 x 3 y
10

Initial Iteration Values Of (x, y, z) = (0, 0, 0)


The Successive iteration Values are

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Iteration 1 1 1
www.padeepz.net
x (32 4 y z ) y (35 2 y 4 z ) z (24 x 3 y)
28 17 10

1 1.143 2.059 2.400

2 0.934 1.360 1.668

3 1.008 1.556 1.899

4 0.988 1.493 1.852

5 0.995 1.512 1.853

6 0.993 1.506 1.847

7 0.994 1.507 1.849

8 0.994 1.507 1.849

et
The Solution is x = 0.994 ; y = 1.507; z = 1.849;

.n
3. Solve the following Equation using Jacobi’s Iteration Method
20 x y 2 z 17;3x 20 y z

Solution:
pz
18; 2 x 3 y 20 z 25
ee
The Coefficient matrix is
ad

20 1 2
A= 3 20 1 is Diagonally Dominant
.p

2 3 20
w

Solve for x, y, z we have


w

1
x= [17-y+2z]
w

20

1
y= [-18-3x+z]
20

1
z= 25-2x+3y
20

Initial Iteration Values are (x, y, z) = (0, 0, 0)


The successive values are

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Iteration 1 1 1
www.padeepz.net
x [17 y 2 z ] y [ 18 3x z ] z [25 2 x 3 y ]
20 20 20

1 0.850 -0.900 1.250

2 1.020 -0.965 1.030

3 1.00125 -1.0015 1.00325

4 1.000425 -1.00025 0.99965

5 0.9999 -1.00008 0.9999

6 0.9999 -0.9999 0.9999

7 1.000 -1.000 1.000

et
The Solution is X=1 ; Y= -1 ; Z=1

.n
Indirect method (or) Iteration Method

Gauss Seidel method

Consider the System of Equation


pz
ee
a1x b1 y c1z d1
ad

a2 x b2 y c2 z d2 (1)
.p

a3 x b3 y c3 z d3
w

Let us assume that,


w

a1 b1 c1
w

b2 a2 c2

c3 a3 b3

then iteration method can be used for the system solve the values of x ,y ,z in terms of
the other variables

1
x (d1 b1 y c1 z )
a1

1
y (d2 a2 x c2 z )
b2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1
z (d3 a3 x b3 y)
c3 www.padeepz.net

If the initial value y 0 , z 0 for y and z and x get x 1 ,

1
x1 (d1 b1 y 0 c1 z 0 )
a1

Again substitute x 1 , z 0 for x and z we get

1
y1 (d2 a2 x 1 c2 z 0 )
b2

Again Substitute x 1 , y 1 for x and y we get

et
1
z1 (d3 a3 x (1 b3 y 1 ) And so on.

.n
c3

NOTE:
pz
1. The Sufficient Condition for the Convergence of Gauss Seidel Method
ee
The methods of iteration will convergence if in each equation of the given System, the
Absolute value of the largest coefficient is greater than the sum of the absolute value of all the
ad

remaining coefficient.

2. Gauss Seidel method equations only if the coefficient matrix is diagonally dominant .
.p

Problems based on gauss Seidal method


w

1. Solve the following System by gauss Seidal method


w

10 x 5 y 2 z 3; 4 x 10 y 3z 3; x 6 y 10 z 3
w

Solution:

Given, 10 x 5 y 2 z 3 ------ (1)

4 x 10 y 3z 3 ----- (2)

x 6 y 10 z 3 ------- (3)

Take, 10 5 2 10 5 2

10 4 3 10 4 3

10 1 6 10 1 6

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
the given equation is diagonally dominant
www.padeepz.net
From (1) 10 x 5 y 2 z 3

10 x 3 5 y 2 z

1
x (3 5 y 2 z )
10

From (2) 4 x 10 y 3z 3

10 y 3 4 x 3z

1
y (3 4 x 3 z)
10

From (3) x 6 y 10 z 3

et
10 z 3 x 6y

.n
1
z ( 3 x 6 y)
10

Let y = 0, z = 0 be the initial value


pz
ee
Iteration X Y Z
ad

1 0.3 0.42 -0.582

2 0.3936 0.28284 -0.509064


.p

3 0.3396 0.2831 -0.5038


w

4 0.3408 0.2852 -0.5052


w

5 0.3416 0.2851 -0.5052


w

6 0.3415 0.2850 -0.5052

7 0.3415 0.2850 -0.5052

Here 6th and 7th iteration value of x, y, z is same

x = 0.3415; y = 0.2850; z = -0.5052

2. Solve the following equations by gauss seidal method

4 x 2 y z 14; x 5 y z 10; x y 8z 20

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Solution:
www.padeepz.net
Given:

4 x 2 y z 14 1

x 5 y z 10 2

x y 8z 20 3

Take,

|4| > |3|+|1|

|5|>|1|+|-1|

|8|>|1|+|1|

the given equation are diagonally dominant

et
From (1) 4 x 2 y z 14

.n
4 x 14 2 y z

x
1
(14 2 y z )
pz
ee
4

From (2) x 5 y z 10
ad

5 y 10 x z
.p

1
y (10 x z)
5
w
w

From (3) x y 8z 20
w

1
z (20 x y)
8

Let y = 0, z = 0 be the initial value

1
x= (14 2 y z )
4

1
y= (10 x z )
5

1
z= (20 x y )
8

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Iteration x Y z
www.padeepz.net
1 3.5 1.3 1.9

2 2.375 1.905 1.965

3 2.056 1.982 1.995

4 2.010 1.997 1.997

5 2.002 1.999 2

6 2.001 2 2

7 2 2 2

8 2 2 2

Here the 7th and 8th iteration Value is

et
Hence, x = 2, y = 2, z = 2

.n
3. Solve the following system of the equation by gauss seidal method

27 x 6 y z 85; x y 54 z 110;6 x 15 y 2 z pz 72
ee
Solution:

Given,
ad

27 x 6 y z 85 1
.p

x y 54 z 110 2
w

6 x 15 y 2 z 72 3
w

Take |27| >|6|+|-1|


w

|1|>|1|+|54|

|2|>|6|+|15|

The given equations are not diagonally dominant now we interacting equation 2 &
equation 3

27 x 6 y z 85 4

6 x 15 y 2 z 72 5

x y 54 z 110 6

Take |27| >|6|+|-1|


www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
|15|>|6|+|2|
www.padeepz.net
|54|>|1|+|1|

the given equation are diagonally dominant

From (4) 27 x 85 6 y z

1
x (85 6 y z )
27

From (5) 15 y 72 6x 2z

1
y (72 6 x 2 z )
15

et
From (6) 54 z 110 x y

.n
1
z (110 x y)
54

Let y = 0, z = 0 be the initial value pz


ee
Iteration
ad

1 1 1
x= (85 6 y z ) y= (72 6 x 2 z ) z= (110 x y )
27 15 54
.p
w

1 3.1481 3.5408 1.9132


w

2 2.4322 3.5720 1.9258


w

3 2.4257 3.5729 1.9260

4 2.4255 3.5730 1.9260

5 2.4255 3.5730 1.9260

Here 4th and 5th iteration values are equal

x = 2.4255

y = 3.5730

z = 1.9260

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Home Work:
www.padeepz.net
1) 8x-3y+2z = 20, 4x+11y-z = 33, 6x+3y+12z = 35 (x = 3.0168; y = 1.9859; z = 0.9118)

2.) 28x+4y-z = 32, 2x+17y+4z = 35, x+3y+10z = 24(x = 0.9936; y = 1.5069, z = 1.8486)

3) 20x+y-2z = 17,3x+20y-z = -18; 2x-3y+20z = 25(x = 1; y = -1, z = 1)

Inverse of Matrix By Gauss Jordan method

Let A be a square non-singular matrix of order 3

Consider the inverse of a matrix

a1 b1 c1
A a2 b2 c2

et
a3 b3 c3

.n
We know that,

The unit matrix of order 3 is

1 0 0
pz
ee
I 0 1 0
0 0 0
ad

the augmented matrix,


.p

a1 b1 c1 1 0 0
w

[ A, I ] a2 b2 c2 0 1 0
w

a3 b3 c3 0 0 1
w

By using Gauss Jordan method gives

1 0 0 a1 b1 c1
1
[I , A ] 0 1 0 a2 b2 c2
0 0 1 a3 b3 c3

Hence [A.I] ~[I, A 1 ]

1 1 1
1. Find the Inverse Of A = 1 3 3 by using gauss Jordan method
2 4 4

Solution:
www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1 1 1
Given A = 1 3 www.padeepz.net
3
2 4 4

1 1 3 1 0 0
Let [ A, I ] 1 3 30 1 0
2 4 40 0 1

1 1 3 1 0 0
~ 0 2 6 1 0 0 R2 R2 R1 , R3 R3 R2
0 2 2 2 0 1

2 0 12 3 1 0

et
~ 0 2 6 1 1 0 R1 2 R1 R2 , R3 R3 R2
0 0 4 1 1 1

.n
2 0 0 6 2 3
~ 0
0
8
0
0 10 2 6 R1
4 1 1 1
pz R1 3R3 ' R2 6 R3 4 R2
ee
3
ad

3 1
1 0 0 2
5 1 3 R1 R2 R3
~ 0 1 0 R1 , R2 , R3
.p

4 4 4 2 8 4
0 0 1
1 1 1
w

4 4 4
w

~ [I , A 1 ]
w

3
3 1
2
1 5 1 3
A
4 4 4
1 1 1
4 4 4

12 4 3
1 1
Hence, A 5 1 3
4
1 1 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
4 1 2
2. www.padeepz.net
Find the Inverse of A = 2 3 1 using Gauss Jordan method
1 2 2

Solution:

4 1 2
Given A = 2 3 1
1 2 2

4 1 2 1 0 0
Let [ A, I ] 2 3 10 1 0
1 2 2 0 0 1

4 1 2 1 0 0

et
~ 0 5 4 1 2 0 R2 2 R2 R1 , R3 4 R3 R1
0 9 6 1 0 4

.n
20 0 14 6
~ 0 5 4 1 2
2 0
0
pz
R1 5 R1 R2 , R3 5 R3 9 R2
ee
0 0 6 14 18 20
ad

120 0 0 160 240 280


~ 0 30 0 50 60 80 R1 6 R1 14 R3 R2 6 R2 4 R3
0 0 6 14 18 20
.p
w

4 7
2
1 0 0 3 3
w

5 8 R1 R2 R3
~ 0 1 0 2 R1 , R2 , R3
w

3 3 120 30 6
0 0 1
7 10
3
3 3

~ [I , A 1 ]

4 7
2
3 3
1 5 8
Hence A 2
3 3
7 10
3
3 3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
0 1 1
3. Find the Inverse of A = 1 www.padeepz.net
2 0 Using Gauss Jordan method
3 1 4

Solution:

0 1 1
Given: A = 1 2 0
3 1 4

0 1 1 0 1 0
Let [ A, I ] 1 2 0 1 0 0
3 1 40 0 1

Inter Changing R1 and R2 i.e R1 R2

et
1 2 0 1 0 0

.n
[ A, I ] 0 1 1 0 1 0

1 2
3

0 0
1 40 0 1

1 0
pz
ee
~ 0 1 1 1 0 0 R3 R3 3R1
0 7 40 3 1
ad

1 0 2 2 1 0
.p

~ 0 1 1 1 0 0 R1 R1 R2 , R3 R3 7 R2
w

0 0 3 7 3 1
w

3 0 0 8 3 2
w

~ 0 3 0 4 3 1 R1 3R1 2 R2 , R2 3R2 R3
0 0 3 7 3 1

8 2
1
1 0 0 3 3
4 1 R1 R2 R3
~ 0 1 0 1 R1 , R2 , R3
3 3 3 3 3
0 0 1
7 1
1
3 3

~ [I , A 1 ]

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
8 2
www.padeepz.net
1
3 3
1 4 1
Hence A 1
3 3
7 1
1
3 3

Home Work

3 1 1 2 0 1
1
15 6 5 A 5 1 0
1. A=
5 2 2 0 1 3

et
2 2 3 2 1 1

.n
1 1
2. A = 2 1 1 A 9 7 4 AA I
1 3 5 5 4
pz
2
ee
Eigen value of a matrix by power method

Power method is used to determine numerical largest Eigen value and corresponding
ad

eigenvector of a matrix A.

Let A be an n n matrix and let λ1, λ 2 ......λ n be the distinct Eigenvalue of A, so that
.p

|λ1|>|λ2 |>||λ3|>......|λn |
w

Let x1, x 2 ............x n be the corresponding eigenvector.


w

ie, Axi =λi xi


w

Note

1. λ 1 is dominant |λ1|>|λ2 |>||λ3|>......|λn |

2. Sum of the Eigen values of a matrix is equal to the sum of the main diagonal elements of
the matrix.

3. To find the numerically smallest eigenvalue of A, obtain the dominant eigenvalue λ 1 of


A and then find B=A-λ1I and find the dominant eigenvalue of B.

Then the smallest eigenvalue of A is equal to the dominant eigenvalue of B+λ1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
ie, to find B=A-λ1I
www.padeepz.net
to find A=B+λ1

1
4. The smallest eigenvalue of A= and the corresponding eigenvector is X.
λ

Problems based on power method

12
1. Find the eigenvalue of A = by power method and hence find the other eigenvalue
34
also

1
Let X1 = be an arbitrary initial eigenvector
0

12 1 1 0.3333

et
AX1 = = =3 =3X 2
34 0 3 1

.n
12 0.3333 2.3333 0.3182
AX 2 = = = =7.3333
34 1 7.3333
pz
= 7.3333 X 3
1
ee
12 0.3182 2.3182 0.4679
AX3 = = =4.9546
ad

34 1 4.9546 1

=4.9546X4
.p
w

12 0.4679 2.4679 0.4567


AX 4 = = =5.4037
34 1 5.4037 1
w

= 5.4037 X 5
w

12 0.4567 2.4567 0.4575


AX5 = = =5.3701
34 1 5.3701 1

= 5.3701X 6

1 2 0.4575 2.4575 0.4574


AX 6 = = =5.3725
34 1 5.3725 1
=5.3725X 7

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
12 0.4574 2.4574 0.4574
AX 7 =
34 1
=
www.padeepz.net
5.3722
= 5.3722
1
= 5.3722X8

12 0.4574 2.4574 0.4574


AX8 = = =5.3722
34 1 5.3722 1
=5.3722X9

0.4574
The dominant eigenvalue λ1 =5.3722 and corresponding eigenvalue is
1

To find λ 2 :

Sum of the eigenvalue = sum of the main diagonal element of A

λ1 +λ2 =1+4

et
5.3722 +λ 2 =5

.n
λ 2 = 5-5.3722

λ 2 = -0.3722
pz
ee
Hence the Eigen values are
ad

λ1 =5.3722, λ2 =-0.3722
.p

25 1 2
2. Find the numerically Largest eigenvalue of A 1 3 0 and the corresponding
w

2 0 -4
w

eigenvector
w

Solution:

25 1 2
Given A 1 3 0
2 0 -4

1
Let X1 = 0 be an arbitrary initial eigenvector
0

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
25 1 2 1 25 1
www.padeepz.net
AX1 = 1 3 0 0 = 1 =25 0.0400 =25X 2
2 0 -4 0 2 0.0800

25 1 2 1 25.2000 25.2000 1
AX 2 = 1 3 0 0.0400 = 1.1200 = 1.1200 =25.2 0.0444
2 0 -4 0.0800 1.6800 1.6800 0.0667
=25.2X 3

25 1 2 1 25.1778 1
AX 3 = 1 3 0 0.0444 = 1.1332 =25.1778 0.0450
2 0 -4 0.0667 1.7332 0.0688
=25.1778X 4

25 1 2 1 25.1820 1

et
AX 4 = 1 3 0 0.0450 = 1.1350 =25.1826 0.0451

.n
2 0 -4 0.0688 1.7248 0.0685
=25.1826x 5

25 1 2 1 25.1821
pz 1
ee
AX 5 = 1 3 0 0.0451 = 1.1353 =25.1821 0.0451
2 0 -4 0.0685 1.7260 0.0685
ad

=25.1821X 6
.p

25 1 2 1 25.1821 1
AX 6 = 1 3 0 0.0451 = 1.1353 =25.1821 0.0451
w

2 0 -4 0.0685 1.7260 0.0685


w

=25.1821X 7
w

1
The dominant eigenvalue λ 1 = 25.1821 and the eigenvalue is 0.0451
0.0685

161
3. Find the dominant eigenvalue and corresponding eigenvector of A 12 0 .
0 0 3
Find also the least taken root and hence the third eigenvalue

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Solution:
www.padeepz.net
161
Given A 12 0
0 0 3

1
Let X1 = 0 be the initial eigenvector
0

161 1 1 1
AX1 = 1 2 0 . 0 = 1 =1 1 =1X 2
003 0 0 0

161 1 7 1

et
AX 2 = 1 2 0 . 0 = 3 =7 0.4286 =7X 3
003 0 0 0

.n
161
AX 3 = 1 2 0
1
0.4286
3.5716 1
pz
1.8572 =3.5716 0.5200
ee
003 0 0 0
=3.5716X 4
ad

161 1 4.1200 1
AX 4 = 1 2 0 0.5200 = 2.0400 = 4.1200 0.4951
.p

003 0 0 0
w

= 4.1200X 5
w

161 1 3.9706 1
w

AX 5 = 1 2 0 0.4951 = 1.9902 = 3.9706 0.5012


003 0 0 0
=3.9706X 6

161 1 4.0072 1
AX 6 = 1 2 0 0.5012 = 2.0024 = 4.0072 0.4997
003 0 0 0
= 4.0072X 7

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
161 1 3.9982 1
AX 7 = 1 2 0 0.4997 = www.padeepz.net
1.9994 = 3.9982 0.500
003 0 0 0
= 3.9982X8

161 1 4.0006 1
AX8 = 1 2 0 0.5001 = 2.0002 = 4.0006 0.5000
003 0 0 0
=4.0006X9

161 1 4.0006 1
AX9 = 1 2 0 0.5000 = 2.0002 =4 0.5000 = 4X10
003 0 0 0

161 1 4 1

et
AX10 = 1 2 0 0.5000 = 2 =4 0.5000 =4X11

.n
003 0 0 0

pz
The dominant eigenvalue λ 1 = 4 and corresponding eigenvector i s
1
0.5
ee
0

To find the least latent root (or) smallest root smallest eigenvalue of A = λ 1 and eigenvalue of B
ad

where eigenvalue of B=A-λ1I


.p

16 1 10 0
w

B= 1 2 0 - 4 0 1 0
w

00 3 0 01
w

-3 6 1
B= 1 -2 0
0 0 -1

1
Let Y1 = 0 be an arbitrary initial Eigen vector
0

-3 6 1 1 -3 1
BY1 = 1 -2 0 0 = 1 =-3 -0.3333
0 0 -1 0 0 0

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
=-3Y2
www.padeepz.net
-3 6 1 1 -4.9998
BY2 = 1 -2 0 -0.3333 = 1.6666
0 0 -1 0 0

1
= -4.9998 -0.3333
0

= -4.9998Y3

-3 6 1 1 -4.9998 1
BY3 = 1 -2 0 -0.3333 = 1.6666 = -4.9998 -0.3333

et
0 0 -1 0 0 0
=-4.9998Y4

.n
1
pz
The dominant eigenvalue B = -4.998 and the corresponding eigenvector is -0.3333
0
ee
Smallest eigenvector of A = λ 1 + Eigen value of B
ad

= 4 - 4.49998 (or) 5
.p

= -0.9998 (or) 1
w

λ 2 = -1
w

1. Use the power method to find the dominant eigenvalue and the corresponding
w

918
Eigenvector of the matrix A= 7 4 1
1 79

Solution:
T
Let X 0 = 1,1,1 then

918 1 18 1
AX 0 = 7 4 1 1 = 12 =18 0.67 =λ1X1
17 9 1 17 0.94

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
918 1 17.19 1
www.padeepz.net
AX1 = 7 4 1 0.67 = 10.62 =17.19 0.62 =λ 2 X 2
1 7 9 0.94 14.15 0.82

918 1 16.18 1
AX 2 = 7 4 1 0.62 = 10.30 =16.18 0.64 =λ3X3
17 9 0.82 12.72 0.79

918 1 15.96 1
AX3 = 7 4 1 0.64 = 10.35 =15.96 0.65 =λ 4 X 4
1 7 9 0.79 12.59 0.79

918 1 15.96 1

et
AX 4 = 7 4 1 0.65 = 10.39 =15.96 0.65 =λ5 X5
1 7 9 0.79 12.66 0.79

.n
Hence the dominant eigenvalue is 15.97 and the corresponding Eigen vector is
1,0.65,0.79
T
pz
ee
2. Use the power method to find the dominant eigenvalue and the corresponding
eigenvector of
ad

5 0 1
Matrix A = 0 -2 0
.p

1 0 5
w

Solution:
w

T
Let X 0 = 1,1,1 be an arbitraryinitial eigenvector
w

5 0 1 1 6 1
AX 0 = 0 -2 0 1 = -2 =6 -0.33 =λ1X1
1 0 5 1 6 1

5 0 1 1 6 1
AX1 = 0 -2 0 -0.33 = +0.66 =6 0.11 =λ 2 X 2
1 0 5 1 6 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
5 0 1 1 6 1
www.padeepz.net
AX 2 = 0 -2 0 -0.11 = -0.22 =6 -0.04 =λ3X3
1 0 5 1 6 1

5 0 1 1 6 1
AX3 = 0 -2 0 -0.04 = 0.08 =6 0.01 =λ 4 X 4
1 0 5 1 6 1

5 0 1 1 6 1
AX 4 = 0 -2 0 0.01 = -0.02 =6 -0.003 =λ5 X5
1 0 5 1 6 1
5 0 1 1 6 1
AX5 = 0 -2 0 -0.003 = 0.006 =6 0.001 =λ 6 X 6
1 0 5 1 6 1

et
5 0 1 1 6 1

.n
AX 6 = 0 -2 0 0.001 = -0.002 = 0 =λ 7 X 7
1

5
0 5

0 1 1 6
1

1
6 1
pz
ee
AX 7 = 0 -2 0 0 = 0 =6 0
1 0 5 1 6 1
ad

T
Hence the dominant eigenvalue is 6 and the corresponding eigenvector is 1,0,1
.p

2 -1 0
w

3. Find the smallest eigenvalue and the corresponding eigenvector of A = -1 2 -1 by


w

0 -1 2
w

Power method

Solution:

2 -1 0
Given A = -1 2 -1
0 -1 2

A =4

To find the inverse of A

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
0.75 0.5 0.25
A -1
= B = 0.5 1 0.5 www.padeepz.net
0.25 0.5 0.75

To find the largest eigenvalue and the corresponding eigenvector of B by power method
T
Let X 0 = 1,1,1 be an arbitrary eigenvector

0.75 0.5 0.25 1 1.5 0.75


BX 0 = 0.5 1 0.5 1 = 2 =2 1 =λ1X1
0.25 0.5 0.75 1 1.85 0.75

0.75 0.5 0.25 0.75 1.25 0.714


BX1 = 0.5 1 0.5 1 = 1.75 =1.75 1 =λ 2 X 2
0.25 0.5 0.75 0.75 1.25 0.714

et
0.75 0.5 0.25 0.714 1.214 0.708

.n
BX 2 = 0.5 1 0.5 1 = 1.714 =1.714 1 =λ 3X3
0.25 0.5 0.75 0.714 1.214 0.708

0.75 0.5 0.25 0.708


pz
1.208 0.707
ee
BX 3 = 0.5 1 0.5 1 = 1.708 =1.708 1 =λ 4 X 4
0.25 0.5 0.75 0.708 1.208 0.707
ad

1.207 0.707
.p

BX 4 = 1.707 = 1.707 1 = λ 5 X5
1.207 0.707
w
w

1.207 0.707
BX5 = 1.707 =1.707 1 =λ 6 X 6
w

1.207 0.707

The largest eigenvalue of B is 1.707 and the corresponding eigenvector is


T
0.707,1,0.707

1 1
The smallest eigenvalue of A is = = 0.586 and the corresponding eigenvector is
λ 1.707
T
0.707,1,0.707

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
16 1
4. www.padeepz.net
Find the dominant eigenvalue and the corresponding eigenvector of A = 1 2 0 .Find
0 0 3
also the other two Eigen values.

Solution:

16 1
Given, A = 1 2 0
0 0 3

T
Let X 0 = 1,1,1 be an initial arbitrary eigenvector then

16 1 1 8 1
AX0 = 1 2 0 1 = 3 =8 0.375 =λ1X1

et
0 0 3 1 3 0.375

.n
3.625 1
AX1 = 1.750 =3.625 0.483 =λ 2 X 2
1.123 0.310 pz
ee
4.208 1
AX 2 = 1.966 =4.208 0.467 =λ 3X3
ad

0.930 0.221
.p

4.023 1
AX3 = 1.934 =4.023 0.481 =λ 4 X 4
w

0.663 0.165
w

4.051 1
w

AX 4 = 1.962 =4.051 0.484 =λ 5 X5


0.495 0.122

4.026 1
AX5 = 1.968 =4.026 0.489 =λ 6 X 6
0.366 0.091

4.025 1
AX 6 = 1.978 =4.025 0.491 =λ 7 X 7
0.273 0.068

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
4.014 1
AX 7 = 1.982 =4.014 0.494www.padeepz.net
=λ8 X8
0.204 0.051

4.015 1
AX8 = 1.988 =4.015 0.495 =λ 9 X9
0.153 0.038

4.008 1
AX9 = 1.990 =4.008 0.497 =λ10 X10
0.114 0.028

4.010 1
AX10 = 1.994 =4.010 0.497 =λ11X11
0.084 0.021

et
.n
4.003 1
AX11 = 1.994 =4.003 0.498 =λ12 X12
0.063 0.016
pz
ee
4.004 1
AX12 = 1.996 =4.004 0.499 =λ13X13
ad

0.048 0.012

4.006 1
.p

AX13 = 1.998 =4.006 0.499 =λ14 X14


w

0.036 0.009
w

4.003 1
w

AX14 = 1.998 =4.003 0.499 =λ15 X15


0.027 0.007

4.001 1
AX15 = 1.998 =4.001 0.499 =λ16 X16
0.021 0.005

3.999 1
AX16 = 1.998 =3.999 0.5 =λ17 X17
0.015 0.004

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
4.004 1
AX17 = 2.000 =4.004 0.5 www.padeepz.net
=λ18 X18
0.012 0.003

4.003 1
AX18 = 2.000 =4.003 0.5 =λ19 X19
0.009 0.002

Sum of the eigenvalue = sum of the main diagonal of A

λ1 +λ2 +λ3 =1+2+3

4-1+λ 3 =6

λ 3 =6-4+1

et
λ 3 =3

.n
Hence the Eigen values are 4,3,-1

Home Work:
pz
ee
41
1) Find the numerically largest eigenvalue of and the corresponding eigenvector.
ad

1 3

5 0 1
.p

2) Find the dominant eigenvalue and the corresponding eigenvector of A = 0 -2 0 .Find also
w

1 0 5
w

the least Latent root and hence the third eigenvalue.


w

Eigen value of a matrix by Jacobi Method for Symmetric Matrix

Rotation Matrix:

If P x,y is any point in the XY plane and if OP is rotated in the clockwise direction
through an angle θ , then the new position of P x ' ,y ' is given by

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

x' = xcosθ-ysinθ

y' = xsinθ+ycosθ

x' cosθ -sinθ x x

et
ie., = =P
y' sinθ cosθ y y

.n
cosθ -sinθ
Where P =
sinθ cosθ
pz
Hence P is called a rotation Matrix in the x y Plane. Here P is also an orthogonal matrix since
ee
PPT = 1.
ad

Eigen Values of 2 2 matrix by Jacobi Method:

a11 a12
.p

Let A= be a symmetric matrix of order 2. Where a12 =a 21 .


a 21 a 22
w

Step 1:
w

cosθ -sinθ
w

Assume the most general orthogonal Rotation Matrix of order 2 is P =


sinθ cosθ

Step 2:

1 2a12
To find the θ value using θ= tan -1 if a11 a 22
2 a11 -a 22

Step 3:

cosθ -sinθ
Write down P = using the value of θ
sinθ cosθ

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
Step 4:
www.padeepz.net
Get D=PT AP

The diagonal of D are the Eigen values the columns of p are the corresponding Eigen
vectors.

41
1. Using Jacobi method, find the Eigen values and eigenvector of A=
1 4

Solution:

41
Given, A=
1 4

Here, a11 =a 22 =4,a12 =a 21 =1>0

et
cosθ -sinθ
The rotation matrix is P =
sinθ cosθ

.n
1 2a12
Here,
2
tan 1

a11 a22 pz
ee
1 1 2(1) 1 1 2
tan tan
2 4 4 2 0
ad

1 1
tan
.p

1
w

.
2 2
w
w

1 1
cos sin
4 4 2 2
Rotation matrix p =
1 1
sin c os
4 4 2 2

1 1 1 1
2 2 4 1 2 2
D = PT AP =
1 1 1 4 1 1
2 2 2 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
4 1 1 4 1 1
2 2 2 www.padeepz.net
2 2 2
=
4 1 1 4 1 1
2 2 2 2 2 2

5 5 1 1
2 2 2 2
3 3 1 1
2 2 2 2

5 5 5 5
2 2 2 2
3 3 3 3
2 2 2 2

5 0

et
D = P T AP =
0 5

.n
1 1
The Eigen values are 5 , 3 and eigenvectors column of the P matrix ,
pz 1 1
ee
5 0 1
2. Using Jacobi method, find the Eigen values and eigenvectors of A = 0 2 0
ad

1 0 5

Solution:
.p

5 0 1
w

Given A = 0 2 0
w

1 0 5
w

Here, a13 a31 1, a11 a33 5, a12 0

1 1 2a13
Here, tan
2 a11 a33

1 1 2 2
tan
2 5 5

1 1 4
tan
2 0

1 1
tan
2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1
22 www.padeepz.net

cos sin
The rotational matrix is P =
sin c os

cos 0 sin
cos 0 sin 4 4
P 0 1 0 0 1 0
sin 0 cos
sin 0 cos
4 4

1 1
0
2 2

et
P 0 1 0

.n
1 1
0
2 2

1
0
1
pz
ee
2 2
pT 0 1 0
ad

1 1
0
2 2
.p

To Find D=PT AP
w

1 1 1 1
0 0
w

2 2 5 0 1 2 2
0 1 0 0 2 0 0 1 0
w

D
1 1 1 0 5 1 1
0 0
2 2 2 2

6 0 0
D 0 2 0
0 0 4

Hence the eigenvalue of the given matrix are 6,-2, 4

1 6, 2 2, 3 4 and the Corresponding eigenvector are the columns of P are

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1 1
2 www.padeepz.net
0 2
X1 0 ; X2 1 ; X3 0
1 0 1
2 2

1 2 2
3. Find the Eigen Values and Eigen Vector Of the Matrix A = 2 3 2
2 2 1

Solution:

1 2 2
Given A = 2 3 2

et
2 2 1

.n
Here the Largest off-Diagonal element is

a13 =a31 2 and a11 =a33 =1


pz
ee
1 2a13
Take θ = tan -1
2 a11 -a 33
ad

1 2 2
= tan -1
2 1-1
.p

1 1π
w

= tan -1 =
2 22
w
w

cos θ 0 -sinθ
The Rotation Matrix P= 0 1 0
sinθ 0 cosθ

π π 1
0
1
cos 0 -sin
4 4 2 2
P= 0 1 0 = 0 1 0
π π 1 1
sin 0 cos 0
4 4 2 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1 1
2
0
www.padeepz.net
2
PT = 0 1 0
1 1
0
2 2

To Find D=PT AP

1 1 1 1
0 1 2 2 0
2 2 2 2
D= 0 1 0 2 3 2 0 1 0
1 1 2 2 1 1 1
0 0
2 2 2 2

3 3 1 1
2 0

et
2 2 2 2
2 3 2 0 1 0

.n
1 1 1 1
0 0
2

3 2 0
2 2
pz 2
ee
D 2 3 0
0 0 1
ad

Again reduce the largest off-diagonal element a12 =a 21 =2 in D into zero


.p

Consider the rotation matrix:


w

cosθ -sinθ 0
w

P1 = sinθ cosθ 0 here a11 = a 22 = 3


w

0 0 1

1 2a12 1 2 2
θ= tan -1 = tan -1
2 a11 -a 22 2 3-3

π
θ=
4

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
π π 1 1
cos -sin 0www.padeepz.net0
4 4 2 2
π π 1 1
P1 = sin cos 0 = 0
4 4 2 2
0 0 1 0 0 1

1 1
0
2 2
1 1
P1T = 0
2 2
0 0 1

1 1 1 1

et
0 0
2 2 2 2
3 2 0

.n
T 1 1 1 1
D1 =P DP1 =
1 0 2 3 0 0
2 2 2 2
0 0 1
0 0 -1
pz 0 0 1
ee
5 5 1 1
0 0
ad

2 2 2 2
1 1 1 1
0 0
.p

2 2 2 2
0 0 -1 0 0 1
w
w

5 0 0
w

D1 = 0 1 0
0 0 -1

After two rotations, A is reduced to diagonal matrix D1 .Hence the Eigen values of A are 5, 1,-1.

1 1
1 1 0
0 2 2
2 2
1 1
Now P2 = PP1 = 0 1 0 0
2 2
1 1
0 0 0 1
2 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com
1 1 1
2 2 2 www.padeepz.net
1 1
P2 = 0
2 2
1 1 1
2 2 2

Hence the corresponding eigenvectors are

1 -1 -1
x1 = 2 ; x 2 = 2 ; x 3 = 0
1 -1 1

H.W :

2 0 -1

et
1. 0 2 0

.n
-1 0 2

2.
2
1
1
2
pz
ee
ad
.p
w
w
w

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
UNIT-II

DESIGN OF EXPERIMENTS

Analysis of variance:

The technique of analysis of variance is referred to as ANOVA. A table showing the source of
variance, the sum of squares, degrees of freedom, mean squares(variance)and the formula for the “F ratio
is known as ANOVA table”

The technique of analysis if variance can be classified as

(i) One way classification(CRD)


(ii) Two way classification(RBD)
(iii) Three way classification(LSD)

et
One way classification:

In one way classification the data are classified on the basic of one criterion

.n
The following steps are involved in one criterion of classification

(i) The null hypothesis is pz


ee
Ho : 1  2  ......  k

H1 : 1  2  .......  k
ad

(ii) Calculation of total variation


.p

G2
Total sum of squares V   j xij  N
2
w

Where G    xij (Grand total)


w

i j

G2
w

=correction formula
N

(iii) Sum of squares between the variates

T 2  G2
V1    i   With k-1 degree of freedom
i  ni  N
(iv) Sum of squares within samples

V2  V  V1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
V1
then the ratio K  1 follows F-distribution with degrees of freedom. Choosing the ratio which is
V2
N K
greater than one, we employ the F-test

If we calculated F < table value F0.05 , the null hypothesis is accepted.

ANOVA Table for one way classification

Source of Sum of Degrees of Mean square Variance ratio


variation square freedom
Between V1 K-1 V1 V1
classes K 1 K  1 (or)
V2

et
N K
V2 V2
N K V2

.n
Within N K N K
classes V1

V N 1
pz K 1
ee
1. To test the significance of the variation of the retail prices of a certain commodity in the four
ad

principal plates A,B,C &D, seven shops were chosen at random in each city and the prices
observed were as follows (prices in paise)
.p

A 82 79 73 69 69 63 61
B 84 82 80 79 76 68 62
w

C 88 84 80 68 68 66 66
D 79 77 76 74 72 68 64
w

Do the data indicate that the prices in the four cities are significantly different?
w

Solution:

H0 : 1  2  3  4

H1 : 1  2  3  4

i.e., the prices of commodity in the four cities are same.

we take the origin at x  80 and the calculation are done as follows.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Calculation of ANOVA (use new values)

Cities
K=4 1 2
Shop(n = 7)
3 4 5 6 7
Ti Ti 2 x 2

n
A 2 -1 -7 -11 -11 -17 -19 -64 585.14 946
B 4 2 0 -1 -4 -12 -18 -29 120.14 505
C 8 4 0 -12 -12 -14 -14 -40 228.57 760
D -1 -3 -4 -6 -8 -12 -16 -50 357.14 526
G2
 1196.03
G  183 T i
2

 1290.9
 x
i j
ij
2
 2737
N n
2
G
Total sum of squares V=  x
i j
ij
2

N

=2737-1196.03

et
V=1540.97

.n
Sum of squares between cities

V1  
Ti 2 G 2
n

N
pz
ee
= 1290.9 – 1196.03
ad

V1  94.87
.p

Sum of squares within cities

V2  V-V1  1540.97  94.87


w
w

V2  1446.1
w

ANOVA Table:

Source of Sum of square Degrees of f Mean square F


variation of deviation
V1  94.87 K-1=4-1=3 V1

94.87
Between cities K 1 3
60.25
 31.62 
V2  1446.1 N-K=28-4=24 V2 1446.1 31.62
Within cities   1.90
N K 24
 60.25
Total V=1540.97 N-1=27

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Number of degrees of freedom = (N - K, K - 1) = (24,3)

Critical value:

The table value of F for (24, 3) degree of freedom at 5% Los is 8.64

Conclusion:

Since F< 8.64, H o is accepted at 5% Los

 The prices of commodity in the four cities are same

2. Fill up the following Analysis of variance table

Source of Degrees of Sum of squares Mean squares F ratio


variation freedom
Treatments - - 117

et
-
Error - 704 -

.n
Total 16 938
Solution:

From the given table we have,


pz
ee
V2  704;V=938
ad

degree of freedom (total) N - 1 = 16 => N = 17


.p

V1
mean squares  117
K 1
w

We Know that V2  V-V1


w

=> V1  V-V2
w

= 938 – 704

V1  234

V1
 117
K-1

234 234
  117 =>  K-1
K-1 K-1

K–1=2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
degree of freedom (K-1) = 2

=>K=3

Next, N-K = 17-3 = 4

V2 938
  50.29
N-K 14

Source of Degrees of Sum of Mean squares F ratio


variation freedom squares
Treatments K-1=3-1=2 V1  234 V1 117
 117
K-1 50.29
Error
N-K=17-3=14 V2  704 V2
 50.29  2.327
N-K

et
Total 16 V = 938

.n
3.
pz
The following are the number of mistakes made in 5 successive days of 4 technicians working in
a photographic laboratory
ee
Technicians I Technicians II Technicians III Technicians IV
6 14 10 9
ad

14 9 12 12
10 12 7 8
8 10 15 10
.p

11 14 11 11
w

Test at the 1% Los whether the difference among the 4 samples means can be attributed to chance
w

Solution:
w

H0 : 1  2  3  4

ie., There is no differences among the 4 samples mean

H1 : 1  2  3  4

We take the origin at 12 and the calculation are done as follows

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Calculation of ANOVA (NEW Values)

Days(5)
Technicians
K=4
Ti Ti 2 x 2

n
1 2 3 4 5
I -6 2 -2 -4 -1 -11 24.2 61
II 2 -3 0 -2 2 -1 0.2 21
III -2 0 -5 3 -1 -5 5 39
IV -3 0 -4 -2 -1 -10 20 30
Total G 2 (27) 2 G=-27 49.4 151
=  36.45
N 20

Total sum of squares:

et
G2
V= xij2 

.n
i j N

 151  36.45 pz
ee
V=114.55

Sum of squares b/w cities:


ad

Ti 2 G 2
V1   
.p

n N

 49.4  36.45
w

V1  12.95
w
w

Sum of squares within cities:

V2  V-V1  114.55 12.95

V2  101.6

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

Source of Sum of squares Degrees of Mean squares F ratio


variation of deviation freedom
B/W V1  12.95 K-1=4-1=3 V1 12.95
Technicians   4.31
K-1 3
6.35

V2  101.6 N-K=20-4=16 4.31
Within
V2 101.6
Technicians   6.35
N-K 16

Total V=114.55 N-1=19  1.473

Degrees of freedom ( (N - K, K - 1) = (16,3)

et
Critical value:

.n
The table value of ‘F’ for (16,3) degree of freedom at 1% Los is 5.29

Conclusion:

Since F < 5.29, H 0 accepted at 1% level


pz
ee
 There is no difference among the four sample means.
ad

4. The following table shows the lives in hours of four batches of electric lamps.
.p

Batches Lives in hours


1 1610 1610 1650 1680 1700 1720 1800
w

2 1580 1640 1640 1700 1750


3 1460 1550 1600 1620 1640 1660 1740 1820
w

4 1510 1520 1530 1570 1600 1680


w

Perform an analysis of the variance on these data and show that a significant test does not reject
their homogeneity

Solution:

H0 : 1  2  3  4

I.e., the means of the lives of the four brands are homogeneous.

H1 : 1  2  3  4

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
oldxij  1700
We take the origin xij 
10

Calculation of ANOVA

Brand
K=4 1 2 3 4
Lives
5 6 7 8
Ti Ti 2 x
ij
ij
2

n
1 -9 -9 -5 -2 0 2 10 - -13 24.143 295
2 -12 -6 -6 0 5 - - - -19 72.2 241
3 -24 -15 -10 -8 -6 -4 4 12 -51 325.125 1177
4 -19 -18 -17 -13 -10 -2 - - -79 1040.167 1247
Total G 2 (162) 2
  1009.38 G=-162 =1461.635 2960
N 26

et
N=n1  n2  n3  n4  7  5  8  6  26

.n
Total sum of squares:

V= ( xij )2 
G2 pz
ee
i j N

 2960 1009.38
ad

V=1950.62
.p

Total sum of squares b/w brands:


w

Ti 2 G 2
V1   
n N
w

 1461.635 1009.38
w

V1  452.255

Sum of squares within brands:

V2  V-V1

 1950.62  452.255

V2  1498.365

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

ANOVA Table:

Source of Sum of squares Degrees of Mean squares F ratio


variation freedom
B/W V1  452.255 K-1=4-1=3 V1

452.255
 150.75
Brands K-1 3
150.75

68.11
Within N-K=26-4=22
V2  1498.365 V2 1498.365  2.21
Brands   68.11
N-K 22

Total 1950.62  V N-1=25

et
.n
Degrees of freedom (3, 22) =3.05

Critical value:
pz
The table value of ‘F’ for (3,22) d.f at 5% Los is 3.05
ee
Conclusion:
ad

Since F<3.05, H 0 is accepted at 5% level

 The means of the lives of the four brands are homogeneous.


.p

ie., the lives of the four brands of lamps do not differ significantly.
w

Two way classification:


w

In two way classification the data are classified on the basis of two criterions
w

The following steps are involved in two criterion of classification

(i) The null hypothesis

H 01 and H 02 framed

We compute the estimates of variance as follows

(ii) G=  xij  Grand total of K  n Observations


i j

G2
S : Total sum of squares  xij 
2
(iii)
N

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 n G2
(iv) S1 :Sum of squares b/w rows (class-B)   R j 
2

K j=1 N
1 K 2 G2
(v) S 2 :Sum of squares b/w (classes A)   Ci  N
n i=1
S 3 : Sum of squares due to error (or) Residual sum of squares
(vi) Errors (or) Residual S 3 = S - S1 - S 2
(vii) The degrees of freedoms of
S1  n-1 ;S2  k-1 ;S3  (n-1)(k-1)
S=nk-1

ANOVA Table for two way classification

et
Source of Sum of Degrees of Mean squares F ratio
variation squares freedom

.n
B/W ‘B’ S1 n-1 S1 QB
classes(rows)  QB F1 
n-1 Q AB

B/W ‘A’ S2 k-1


pz
S2
d . f  [(n-1)(k-1)(n-1)]
Q
ee
classes(column)  QA F2  A
k-1 QAB
ad

Residual (or) S3 (n-1)(k-1) S3 d . f  [(k-1),(k-1)(n-1)]


error  Q AB
(n-1)(k-1)
.p

Total S nk-1 - -
w

Advantages of R.B.D:
w

The chief advantages of R.B.D are as follows


w

(i) This design is more efficient or more accurate than CRD. This is because of
reduction of experimental error.
(ii) The analysis of the design is simple and even with missing observations, it is not
much complicated
(iii) It is Quite flexible, any number of treatments and any number of replication may be
used
(iv) It is easily adaptable as in agricultural experiment it can be accommodated well in a
rectangular, squares(or)in a field of any shape
(v) It provides a method of eliminating or reducing the long term effects.
(vi) This is the most popular design with experiments in view of its simplicity, flexibility
and validity. No other has been used so frequently as the R.B.D

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Disadvantages:

(i) The number of treatments is very large, than the side of the blocks will increase and
this may introduce heterogeneity within blocks.
(ii) If the interactions are large, the experiments may yield misleading results.

1. The following data represent the number of units of production per day turned out by four
randomly chosen operators using three milling machines
Machines.
M1 M2 M3

1 150 151 156


2 147 159 155
Operators 3 141 146 153
4 154 152 159

et
Perform analysis of variance and test the hypothesis
(i) That the machines are not significantly different

.n
(ii) That the operators are not significantly different at 5% level

Solution:
pz
H 01 : There is no significantly difference bet machine and
ee
H 02 : There is no significantly a difference b/w operator
ad

We take the origin 155 and the calculations are done as follows.
.p

Calculation of ANOVA (using new values)


w

Operators Machines Row total


x ij
2

Rj
w

j
M1 M2 M3
w

1 -5 -4 1 -8 42
2 -8 4 0 -4 80
3 -14 -9 -2 -25 281
4 -1 -3 4 0 26
Column -28 -12 3 429
total -37
Ci
xi
ij
2 286 122 21 429

Here N=12 ; G=-37

G 2 (37) 2
Correction factor   114.08
N 12

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Total sum of squares:

G2
S=  xij2 
i j N

 429 114.08

 314.92

Sum of squares between operators:

R j2 G2
S1   
j nj N

1
 [(8)2  (4)2  (25) 2 ]  114.08

et
3

.n
 235 114.08

 120.92

Sum of squares between machines:


pz
ee
 C 2  G2
S2    i  
ad

i  ni  N

1
(28) 2  (12) 2  (3) 2   114.08
.p


4
w

 234.25 114.08
w

S2  120.17
w

Residual sum of squares:

S3  S-S1  S2

 314.92 120.92 120.17

 73.83

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

AVOVA Table for two way classification

Source of Sum of Degrees of Mean sum squares F ratio


variation squares freedom
B/W 120.92 n-1=4-1=3 S1
operators QB   40.31
n 1
B/W 120.17 k-1=3-1=2 S 40.31
machines QA  2  1.49
k-1 12.305
 60.09 (3, 6)
Residual 73.83 (n-1)(k-1)=6 S3 60.09
Q AB   4.88
(k-1)(n-1) 12.305
 12.305 (2, 6)

et
Total 314.92 nk-1=11
Degrees of freedom V1  2; V2  6 (machines)

.n
Degrees of freedom V1  3;V2  6 (operators)

Critical value:
pz
ee
(i) Machines
The table value of ‘F’ for (2,6) d.f at 5% Los is 5.14
ad

(ii) Operators
The table value of ‘F’ for (3,6) d,f at 5% Los is 4.76
.p

Conclusion:
w

(i) Operators
Since F< 4.76 , H 02 is accepted at 5% level
w

 The operators are not significantly different


w

(ii) For Machines


Since F< 5.14, H 01 is accepted at 5% level
 The machines are not significantly different

2. An experiment was designed to study then performance of four different detergents, the following
“whiteness” readings were obtained with specially designed equipment for 12 loads of washing
distributed over three different models of washing machines.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

Machines 1 2 3 Total
Detergents
A 45 43 51 139
B 47 46 52 145
C 48 50 55 153
D 42 37 49 128
Total 182 176 207 565

Looking on the detergents as treatment and the machines as blocks, obtain the appropriate analysis of
variance table and test at 0.01 level of Significance whether there are differences in the detergents (or) in
the washing machines

Solution:

et
H 01 : There is no significant different b/w detergent

.n
H 02 : There is no significant different b/w washing machine
We take the origin is 50 and the calculation are done as follows.

Calculation of ANOVA (using new values)


pz
ee
Detergents
Washing machines
Row total
x ij
2

Rj j
ad

M1 M2 M3
A -5 -7 1 -11 75
B -3 -4 2 -5 29
.p

C -2 0 5 3 29
D -8 -13 -1 -22 234
w

Column total -18 -24 7 367


-35
w

Ci
w

x i
ij
2 102 234 31 367

Here N=12; G=-35

G 2 (35) 2
Correction factor   102.08
N 12

G2
Total sum of squares: S=  xij2 
i j N

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
 367  102.08
S=264.92

R j2 G2
Sum of squares b/w detergents: S1   j hj

N

1
 (11) 2  (5) 2  (3) 2  (22) 2   102.08
3

 213 102.08

S1  110.92

Sum of squares between machines

et
 C 2  G2
S2    i  

.n
i  ni  N


1
4
 (18)2  (24)2  (7)2   102.08 pz
ee
 237.25 102.08

S2  135.17
ad

Residual sum of squares S3  S-S1  S2


.p

 264.92 110.92 135.17


w

S3  18.83
w
w

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

ANOVA table for two way classification:

Source of Sum of Degrees of Mean squares F ratio


variation squares freedom
B/W S1  110.92 n-1=4-1=3 S1 110.92
detergents QB   QB 36.97
n-1 3 
 36.97 QAB 3.14
B/W S2  135.17 k-1=3-1=2 S
QA  2 
135.17  11.77
machines
k-1 2
 67.59
Residual S3  18.83 (n-1)(k-1)=6 QA 67.59

(or) S3 18.83 QAB 3.14
Error QAB  
(n-1)(k-1) 6  21.52

et
 3.14
Total S=264.92 nk-1=11

.n
Degrees of freedom V1  2;V2  6 (machines) pz
ee
Degrees of freedom V1  3;V2  6 (detergents)
ad

Critical value:

(i) Detergents:
.p

The table value of F for (3,6) degree of freedom at 1% Los is 9.78


w

(ii)Machines
w

The table value of F for (2,6) degree of freedom at 1% Los is 10.92


w

Conclusion:

(i) For detergents

Since F>9.78, H 01 is rejected at 5% level

 The detergents are significantly different

(ii) For machines

Since F>10.92, H 02 is rejected at 5% level

 The machines are significantly different

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
3. To study the performance of three detergents and three different water temperatures the following
whiteness readings were obtained with specially designed equipment.

Water temp Detergents A Detergents B Detergents C


Cold Water 57 55 67
Worm Water 49 52 68
Hot Water 54 46 58

Solution:

We set the null hypothesis

H 01 : There is no significant different in the three varieties of detergents

et
H 02 : There is no significant different in the water temperatures

.n
We choose the origin at x=50

Water temp
Detergents
pz
Row total
Rj x 2
ee
ij
j
A B C
Cold Water 7 5 17 29 363
ad

Worm Water -1 2 18 19 329


Hot Water 4 -4 8 8 96
.p

Column total
Ci 10 3 43 56 788
w

66 45 677 788
w

x
i
ij
2
w

Total sum of squares:

G2
S=  xij  2

j i N

(56) 2
 788   788  348.44
9

S=439.56

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Sum of squares between detergents:

Ci 2 G 2
S1   
i ni N

1
 (10)2  (3)2  (43)2   348.44
3

 652.67  348.44

S1  304.23

Sum of squares b/w temperatures:

R j2 G2
S2   

et
j nj N

.n
1
 1266  348.44
3

 422  348.44 pz
ee
S2  73.56
ad

Error sum of squares:

S3  S-S1  S2
.p

 439.56  304.23  73.56


w

S3  61.77
w
w

ANOVA Table:

Source of Sum of squares Degrees of Mean squares F ratio


variation freedom
B/W detergents 2 304.23
304.23 152.11
2
15.445
 152.11
 9.848
73.56 (2, 4)
B/W
temperatures 2 2 36.78
73.55  36.78 15.445
 2.381
Error 61.79 4 15.445
Total 439.56 8

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Degrees of freedom (2,4) and (2,4)

Critical value:

The table value of F for (2,4) d.f at 5% Los is 6.94

Conclusion:

(i) For detergents:

Since F > 9.85, H 01 is rejected at 5% Los

 There is a significant different between the three varieties detergents,


(iii) For water temperature
Since F<6.94, H 02 is accepted at 5% Level
 There is no significant different in the water temperatures.

et
4. Four experiments determine the moisture content of samples of a powder, each man taking a

.n
sample from each of six consignments. These assignments are

Observer Consignment

1
1
9
2
10
3
9
pz
4
10
5
11
6
11
ee
2 12 11 9 11 10 10
3 11 10 10 12 11 10
4 12 13 11 14 12 10
ad

Perform an analysis if variance on these data and discuss whether there is any significant different b/w
consignments (or) b/w observers.
Solution:
.p

We formulate the hypothesis


H 02 : There is no significant different b/w observer
w

H 02 : There is no significant different b/w consignment


w
w

We take origin at x=11 and the calculations are done are as follows

Calculation ANOVA:
Observer
1
consignments
2 3 4 5 6
Rowtotal
x ij
2

Rj j

1 -2 -1 -2 -1 0 0 -6 10
2 1 0 -2 0 -1 -1 -3 7
3 0 -1 -1 1 0 -1 -2 4
4 1 2 0 3 1 -1 6 16
Column total C i 0 0 -5 3 0 -3 37
-5

xj
ij
2 6 6 9 11 2 3 37

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
G2
Total sum of squares   xij  2

j i N

( 5) 2
S=37-  35.96
24

(R j ) 2 G2
Sum of squares b/w observers   
nj N

1 25
S1  (6) 2  (3) 2  (2) 2  (6) 2  
6 24

S1  13.13

et
 Ci 2  G 2
Sum of squares b/w consignments    

.n
 ni  N

S2 
1
4 pz
(0  0  25  9  9) 
25
24
ee
S2  9.71
ad

Error sum of squares S3 = S  S1  S2

= 35.96 - 13.13 - 9.71


.p

S3 = 13.12
w

‘F’ ratio
w

Source of Sum of Degrees of Mean


variation squares freedom squares
w

B/W S1  9.71 n-1=5 9.71 1.94


Consignments 5 0.87
 1.94  2.23
(5,15)
B/W observers S2  13.13 k-1=3 13.13 4.38
3 0.87
 4.38  5.03
Error S3  13.12 (n-1)(k-1)=15 13.12 (3,15)
15
 0.87
Total S  35.96 nk-1=23

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Critical value:

(i) For consignments ,


The table value of ‘F’ for (5, 15) d.f at 5% Los is 2.90
(ii) For observers:
The table value of F for (3, 15) d,f at Los 3.29

Conclusion:

(i) For observers


Since F>3.29, H 01 is rejected
Hence these is a difference between observers is significant
(ii) For consignment:
Since F<2.33, H 02 is accepted
 There is no significant different b/w the consignments

et
LATIN SQUARES DESIGN:

.n
A Latin squares is a squares arrangement of m-rows and m-columns such that each symbol
appearly once and only once in each row and column.
pz
In randomized block design the randomization is done within blocks the units in each block
ee
being relatively similar in L.S.D there are two restrictions

(i) The number of rows and columns are equal


ad

(ii) Each treatment occurs once and only once in each row and column.

This design is a three way classification model analysis of variance


.p

The following steps are involved in Latin square design


w

G2
w

Correction factor  ; G -> Grand total


N
w

m
Si 2
S.S b/w rows=Sa    C.F (S.S means Sum of Squares)
i=1 m

m S j2 G2
S.S b/w Columns=Sb    |C.F
j=1 m N

m
Vi 2
S.S b/w Varieties=Sc    C.F
i=1 m

Total sum of 
 S   xij  C.F
2

squares  j i

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
and Sd  S-Sa  Sb  Sc

Here Si =sum of i th row

Sj =sum of jth column

Vi =sum of i th variety

ANOVA Table:

Sum of
Source of Degrees of Mean squares ‘F’ ratio
squares
variation freedom

et
B/W Rows Sa
Sa m-1 R E
m-1
(m-1),(m-1)(m-2)

.n
B/W C
Columns Sb m-1 pz Sb
m-1
C E
(m-1),(m-1)(m-2)
ee
V
B/W varieties Sc
Sc m-1 V E
m-1
(m-1),(m-1)(m-2)
ad

Error Sd
Sd (m-1)(m-2) E
.p

(m-1)(m-2)
Total
S m2 1
w

Comparison of LSD and RBD


w

(i) In LSD, the number of rows and number of columns are equal and hence the number of
w

replication is equal to the number of treatments there is no such restriction in RBD


(ii) L.S.D is suitable for the case when the number of treatments is b/w 5 and 12 where as R.B.D
can be used for any number of treatments and replications
(iii) The main advantage of L.S.D is that it removes the variations b/w rows and columns from
that within the rows resulting in the reduction of experiment error to a large extent
(iv) The RBD can be performed equally on rectangular of square plots but for LSD, a mose (or)
less a squares field is required due to (iii) LSD is preferred over RBD

Note: A 2  2 Latin Square Design is not possible. The degree of freedom for error in a m  m
Latin squares design is (m-1)(m-2)

For m=2 the degree of freedom is ‘o’ and hence comparisons are not possible.

Hence a 2  2 LSD is not possible.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1. The following is the LSD layout of a design when 4 varieties of seeds are being tested set up the
analysis of variance table and state four conclusion

A B C D
105 95 125 115
C D A B
115 125 105 105
D C B A
115 95 105 115
B A D C
95 135 95 115
Solution:

H: There is no significant difference

xij  100

et
we take the origin as u ij  and the calculations are done as follows
5

.n
Varieties Values Vi
A
B
C
1
-1
5
1
1
3
3
-1
-1
7
-1
3
12
0
10
pz
ee
D 3 5 3 -1 10
ad

Columns /
Rows
C1 C2 C3 C4 Row total
x ij
2

Rj i
.p

R1 1 -1 5 3 8 36

R2 3 5 1 1 10 36
w

R3 3 -1 1 3 6 20
w

R4 -1 7 -1 3 8 60
w

Columns 6 10 6 10 G=32 152


total C i

x
j
ij
2 20 76 28 28 152

G=32 N=16;  x
j i
ij
2
 152

G 2 (32) 2
C.F=   64
N 16

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
G2
Total sum of squares   xij  2

j i N

(32) 2
 152 
16

 152  64

S=88

1 2
Sum of squares b/w rows  8  102  62  82   64
4

 66  64

et
Sa =2

.n
1 2
Sum of squares b/w columns  6  102  62  102   64
4

Sb  68  64
pz
ee
Sb  4
ad

1
Sum of squares b/w Varieties  122  02  102  102   64
4
.p

 86  64
w

Sc  22
w

Error sum of squares Sd = S  Sa  Sb  Sc


w

= 88  2  4  22

Sd  60

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
ANOVA Table:

Sum of
Source of Degrees of ‘F’ ratio
squares Mean sum of squares
variation freedom

Sa 2 0.67
B/W rows Sa  2 m-1=4-1=3   0.67  0.067
m-1 3 10
Sb 4 1.33
B/W columns Sb  4 m-1=4-1=3   1.33  0.133
m-1 3 10
Sc 22 7.33
B/W varieties Sc  22 m-1=3   7.33  0.733
m-1 3 10
(m-1)(m-2) Sd
Error Sd  60  10 -
=3  2=6 (m-1)(m-2)
S  88 m 2  1  15

et
Total - -

.n
Number of degrees of freedom V1  3 ; V2  6

Critical value: pz
ee
The table value of F for (3, 6) d.f at 5% Los is 4.76

Conclusion:
ad

Since F<4.76, for all the case.

 There is no significant difference for the varieties


.p

2. Analyse the variance in the following Latin squares of fields (in keys) of paddy where A,B,C,D
w

denote the difference methods of calculation


w

D122 A121 C123 B122


w

B124 C123 A122 D125


A120 B119 D120 C121
C122 D123 B121 A122
Examine whether the different methods of cultivation have given significantly different fields.
Solution:

Re arrange the table in order

A121 A122 A120 A122


B122 B124 B119 B121
C123 C123 C121 C122
D122 D125 D120 D123

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
We take the origin 122 and the table is

Letter Values Vi
total
A -1 0 -2 0 -3
B 0 2 -3 -1 -2
C 1 1 -1 0 1
D 0 3 -2 1 2

Calculation of LSD:

Columns
/ Rows
1 2 3 4 Row total
x
j
ij
2

1 0 -1 1 0 0 2
2 2 1 0 3 6 14

et
3 -2 -3 -2 -1 -8 18
4 0 1 -1 0 0 2

.n
Columns 0 -2 -2 2 36
total -2

x ij
2 8 12 6 pz 10 36
ee
i
ad

Here N=16; G=-2

G2 4
Correction factor =   0.25
.p

N 16
w

G2
Total sum of squares S=  xij2 
w

i j N
w

 36  0.25

S=35.75
m
Si 2 G 2
Sum of squares b/w rows Sa  
i=1 m

N

1
 (6)2  (8) 2   0.25
4

 25  0.25

Sa  24.75

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
m S j2 G2
Sum of squares b/w columns Sb  m
j=1

N

1
 (0)2  (2)2  (2)2  (2)2   0.25

4

Sb  2.75

m
Vi 2 G 2
Sum of squares b/w varieties Sc  
i=1 m

N

1
 (3)2  (2) 2  (1)2  (2) 2   0.25
4

et
 4.5  0.25

.n
Sc  4.25

Error (or) Residual Sd  S-Sa  Sb  Sc

 35.75  24.75  2.75  4.25


pz
ee
Sd  4
ad

LSD Table:
.p

Source of Sum of Degrees of Mean sum of ‘F’ ratio


variation squares freedom squares
w

Sa 24.75
w

 8.25
B/W rows Sa  24.75 m-1=3 m-1 3  12.31
0.67
w

 8.25

Sb 2.75 0.92
B/W columns Sb  2.75 3   1.37
m-1 3 0.67
 0.92
Sc 4.25
 1.42
B/W varieties Sc  4.25 3 m-1 3  2.12
0.67
 1.42
Sd
Error (or)
Sd  4.0 6=(m-1)(m-2) (m-1)(m-2)
Residual
 0.67
Total S  35.75 m 1  8
2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Critical value:

The value of ‘F’ for (3,6) d.f at 5% Los is 4.76

Conclusion:

Since F<4.76, we accept the null hypothesis

 The difference between the methods of cultivation is not significant.

3. The following data resulted from an experiment to compare three burners A,B, and C,A Latin
squares design was used as the tests were made on 3 engines and were spread over 3 days.

Engine 1 Engine 2 Engine 3


Day 1 A 16 B 17 C 20
Day 2 B16 C 21 A 15
Day 3 C15 A 12 B 13

et
Test the hypothesis that there is no diff between the burners

.n
Solution:

We take the origin x=15 and the calculation are done as follows

Re arrangement of given table is


pz
ee
A B C
16 17 20
A B C
ad

15 16 21
A B C
12 13 15
.p
w

Varieties Values Vi
w

A 1 0 -3 -2
B 2 1 -2 1
w

C 5 6 0 11
Calculation of LSD

Columns/
Rows
C1 C2 C3 Row
total
x
j
ij
2

R1 1 2 5 8 30
R2 1 6 0 7 37
R3 0 -3 -2 -5 13
Column 2 5 3 10 80
total
x
i
ij
2 2 49 29 80

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Here N=9; G=10

G 2 (10) 2
Correction Factor    11.11
N 9

Total sum of squares S=  xij2  C.F


j i

 80 11.11

S=68.89
m
Si 2
Sum of squares b/w Rows Sa  
i=1 m
 C.F

et
1
 [82  7 2  (5)2 ]  11.11
3

.n
 46 11.11

Sa =34.89 pz
ee
m S j2
Sum of squares b/w columns Sb   m  C.F
ad

j=1

1
 [(2) 2  (5) 2  (3) 2 ]  11.11
.p

 1.56
w
w

m
Vi 2
Sum of squares b/w varieties Sc  
i=1 m
 C.F
w

1
 [(2)2  12  112 ]  11.11
3

Sc  30.89

Error (or) Residual Sd  S-Sa  Sb  Sc

 68.89  34.89 1.56  30.89

Sd  1.55

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

Source of Sum of Degrees of Mean sum of ‘F’ ratio


variation squares freedom squares

Sa 34.89
 17.445
B/W rows Sa  34.89 m-1=2 m-1 2  22.5
0.775
 17.445
Sb 1.56
 0.78
B/W columns Sb  1.56 m-1=2 m-1 2  1.01
0.775
 0.78
Sc 30.89
 15.445
B/W varieties Sc  30.89 m-1=2 m-1 2  19.93
0.775
 15.445
Sd (m-1)(m-2)

et
Error (or) 1.55
Sd  1.55 (m-1)(m-2) =

.n
Residual 2
 0.775
Total S  68.89 m2  1  8
pz
ee
Critical value:

The value of ‘F’ for (2,8) d.f at 5% Los is 4.46


ad

Conclusion:
.p

Since F> the table value for the burners


w

 There is a significant difference between the burners


w

and also F> tabulated F for columns the difference b/w the engines is not significant.
w

Homework:

1. Analyse the variance in the following LS:

B C D A
20 17 25 34
A D C B
23 21 15 24
D A B C
24 26 21 19
C B A D
26 23 27 22

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2. Analyse the variance in the following LS:
A C B
8 18 9
C B A
9 18 16
B A C
11 10 20

Factorial Experiments

Definition 1:

A factorial experiment in which each of m factors at ‘S’ is called a symmetrical factorial


experiment and is often known as Sm factorial design

et
Definition 2:

.n
2m - Factorial experiments means a symmetrical factorial experiments where each of the m-factors
is at two levels

pz
2 2 -a factorial experiment means a symmetrical experiment where each of the factors is at two levels
ee
Note:

If the numbers of level of the different factors are equal the experiments is called as a symmetrical
ad

factorial experiment.

Uses advantages of factorial experiments:


.p

(i) Factorial designs are widely used in experiments involving several factors where it is
w

necessary
(ii) F.D allow effects of a factor to be estimated at several levels of the others, giving
w

conclusions that are valid over a range of experimental conditions


(iii) The F.D are more efficient than one factor at a time experiments.
w

(iv) In F.D individual factorial effect is estimated with precision, as whole of the experiment is
devoted to it.
(v) Factorial designs from the basis of other designs of considerable practical value.
(vi) F.D are widely used in research work. These design are used to apply the results over a wide
range of conditions

2 2 -Factorial experiment:

A factorial design with two factors, each at two levels is called a 2 2 factorial design

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Yates’s notation:

The two factors are denoted by the letters A and B the letters ‘a’ and ‘b’ denote one of the
two levels of each of the corresponding factors and this will be called the second level.

The first level of A and B is generally expressed by the absence of the corresponding letter in
the treatment combinations. The four treatment combinations can be enumerated as follows.

Symbols used:

a 0b0 (or)1:Factors A and B both at first level

a1a 0 (or)a:A at second level and B at first level

a0a1 (or) b :A at first level and B at second level

et
a1a1 (or) ab : A and B both second levels.

.n
Yates’s method of computing factorial effect totals

pz
For the calculation of various factorial effect total for 2 2 -factorial experiments the following table
is need
ee
Treatment Total yield (3) (4) Effect Totals
combination from all
ad

replicates
'1' [1] [1]+[a] [1]+[a]+[b]+[ab] Grand total
.p

a [a] [b]+[ab] [ab]-[b]+[a]-[1] [A]


b [b] [a]-[1] [ab]+[b]-[a]-[1] [B]
w

ab [ab] [ab]-[b] [ab]-[b]-[a]+[1] [AB]


w
w

2 2 -factorial experiment conducted in a CRD

Let xij  j observation of i th treatment combinations i=1, 2, 3, 4; j=1,2….(say)


th

i.e., x1  [1]; x2  [a]; x3  [b]; x4  [ab]

Where

xi =total of i th treatment combination .

G=  xij grand total


i f

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
n=4r=Total number of observations

G2
TSS=  xij2 -
j i 4r

1. The follwoing table gives the plan and yields of a 22  factorial experiment conducted in CRD

Analyse the design and give your comments

(1) a a b
20 28 24 10
ab b ab (1)
23 11 22 17
a b ab (1)
24 15 21 19

et
Solution:

.n
Arrange the observation as in one-way classification, we proceed as follows

Treatment
Combination
(1) 20 17 19
pz
Total

56
ee
a 28 24 24 76
b 10 11 15 36
ab 23 22 21 66
ad

Total G= 234
G2 2342
Correction Formula =   4563
.p

22  r 4  3

 x
w

ij
2
 202  17 2  192  282  242  242  102  112  152  232  222  212
j i
w

 x 2
 4886
w

ij
j i

G2
TSS   xij2 
j i 4r
 4886  4563  323

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
The values of SSA, SSB and SSAB are obtained by yate’s method

Treatment Total (3) (4) Divisor Sum of squares


combination (2) (5) (6)
1 [1] [1]+[a] [1]+[a]+[b]+[ab]=[M] - -
a [a] [b]+[ab] [ab]-[b]+[a]-[1]=[A] 4r [A]2 /4r=SSA
b [b] [a]-[1] [ab]+[b]-[a]-[1]=[B] 4r [B]2 /4r=SSB
ab [ab] [ab]-[b] [ab]-[b]-[a]+[1]=[AB] 4r [AB]2 /4r=SSAB

SSE = TSS-(SSA+SSB+SSAB)

The analysis of variance table for 2 2 factorial design conducted in CRD

Source of d.f S.S M.S.S F

et
variation
A 1 SSA MSSA MSSA

.n
MSSE
B 1 SSB MSSB MSSB

AB 1 SSAB
pz MSSAB
MSSE
MSSAB
ee
MSSE
Error 3(r-1) SSE MSSE -
Total 4r-1 TSS - -
ad

To obtain the sum of squares SSA, SSB, SSAB use yate’s method:
.p

Treatment/ Total (3) (4) Divisor S.S


w

combination response (5) (6)


(1) 56 56+76=132 132+102=234 4r=12 Grand total
w

a 76 36+66=102 20+30=50 12 502


 208.33
w

12

b 36 76-56=20 102-132=-30 12 (30) 2


 75
12
ab 66 66-36=30 30-20=10 12 (10) 2
 8.33
12
Total 291.66

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
SSE=TSS-(SSA+SSB+SSAB)
=323-291.66
SSE=31.34

Analysis of variance table:

Source of d.f S.S M.S.S F F0.01 (1, 6)


variation
A 1 208.33 208.33 53.15 13.75
B 1 75 75 19.13
AB 1 8.33 8.33 2.09
Error 3(r-1)=6 31.34 3.92
Total 4r-1=11 323
Critical value:

et
The table value of for (1,6) d.f at 1% Los is 13.75

Conclusion:

.n
Since F> tabulated value of ‘F’ for the main effect A and B, we conclude that the main effects A
and B both are significantly different at 1% Los
pz
ee
ad
.p
w
w
w

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
UNIT –IV

Interpolation, Numerical Differentiation And Numerical Integration

Interpolation with unequal intervals:

Lagrangian polynomials

Lagrange’s interpolation formula:

Let y=f(x) be a function which takes the values y0 ,y1,......,yn corresponding to x x0 , x1,...., xn .

Then, Lagrange’s interpolation formula is

( x x1 )( x x2 ).......( x xn )
y f ( x) y0
( x0 x1 )( x0 x2 ).......( x0 xn )

et
( x x0 )( x x2 ).......( x xn )

.n
y1
( x1 x0 )( x1 x2 ).......( x1 xn )

pz
ee
ad

( x x0 )( x x1 ).......( x xn )
yn
( xn x0 )( xn x1 ).......( xn xn 1 )
.p

This called the Lagrange’s formula for interpolation


w

1. Using Lagrange’s formula fit a polynomial to the data:


w

x 0 1 2
y 7 5 15
w

Solution:

Let y f ( x)
W.k.t Lagrange’s interpolation formula is
( x x1 )( x x2 ) ( x x0 )( x x2 ) ( x x0 )( x x1 )
y f ( x) y0 y1 y2
( x0 x1 )( x0 x2 ) ( x1 x0 )( x1 x2 ) ( x2 x0 )( x2 x1 )
Let
x0 0; x1 1; x2 2;
y0 7; y1 5; y2 15;

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
( x 1)( x 2) ( x 1)( x 2) (x 1)( x 1)
y (7) (5) (15)
( 1 1)( 1 2) (1 1)(1 2) (2 1)(2 1)
7 2 5 2
x 3x 2 x x 2 5 x2 1
6 2
7 2 7 7 5 2 5 5
x 3x 2 x x ( 2 ) 5x 2
6 6 63 2 2 2
7 5 7 5 7
5 x2 x
6 2 2 2 5
22 2 7
x x
6 3
1
y 11x 2 3x 7
3
f ( x) by using Lagrange’s formula and hence find f(3) for,

et
2. Find the polynomial y

.n
x 0 1 2 5
f(x) 2 3 12 147
Solution:

W.k.t Lagrange’s interpolation formula is


pz
ee
( x x1 )( x x2 )( x x3 ) ( x x0 )( x x2 )( x x3 )
y f ( x) y0 y1
ad

( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 )

( x x0 )( x x1 )( x x3 ) ( x x0 )( x x1 )( x x2 )
.p

y2 y2
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )
w

( x 1)( x 2)( x 5) ( x 0)( x 2)( x 5)


(2) (3)
w

(0 1)(0 2)(0 5) (1 0)(1 2)(1 5)


w

( x 0)( x 1)( x 5) ( x 0)( x 1)( x 2)


(12) (147)
(2 0)(2 1)(2 5) (5 0)(5 1)(5 2)

( x 1)( x 2)( x 5) ( x 0)( x 2)( x 5)


(2) (3)
( 10) (4)

( x 0)( x 1)( x 5) ( x 0)( x 1)( x 2)


(12) (147)
6 60

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y f (3)
(3 1)(3 2)(3 5) (3 0)(3 2)(3 5) (3 0)(3 1)(3 5) (3 0)(3 1)(3 2)
(2) (3) (12) (147)
( 10) (4) 6 60

2(1)( 2) 3(1)( 2) 3(2)( 2) 3(2)(1)


(2) (3) (12) (147)
10 4 ( 6) 60

8 18 147
24
10 4 10

y = 35

3. Using Lagrange’s interpolation, calculate the profit in the year 2000 from the following data

et
year 1997 1999 2001 2002
Profits in 43 65 159 248

.n
Lakhs of Rs

Solution:

W.k.t Lagrange’s interpolation formula is


pz
ee
( x 1999)( x 2001)( x 2002)
y f ( x) (43)
ad

(1997 1999)(1997 2001)(1997 2002)

( x 1997)( x 2001)( x 2002)


.p

(65)
(1999 1997)(1999 2001)(1999 2002)
w

( x 1997)( x 1999)( x 2001)


(248)
w

(2002 1997)(2002 1999)(2002 2001)


w

(2000 1999)(2000 2001)(2000 2002)


y f (2000) (43)
( 2)( 4)( 5)

(2000 1997)(2000 2001)(2000 2002)


(65)
(2)( 2)( 3)

(2000 1997)(2000 1999)(2000 2002)


(159)
(4)(2)( 1)

(2000 1997)(2000 1999)(2000 2001)


(248)
(5)(3)(1)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
(1)( 1)( 2) (3)( 1)( 2) (3)(1)( 2) (3)(1)( 1)
(43) (65) (159) (248)
( 2)( 4)( 5) (2)( 2)( 3) (4)(2)( 1) (5)(3)(1)

43 65 477 248
20 2 4 5

y 100

4.Using Lagrange’s interpolation formula find y(10) given that y(5) = 12,y(6)=13,y(9)=14,y(11)=16

Solution:

Given

et
x 5 6 9 11
y f ( x) 12 13 14 16

.n
W.K.T Lagrange’s interpolation formula is

( x x1 )( x x2 )( x x3 )
pz
( x x0 )( x x2 )( x x3 )
ee
y f ( x) y0 y1
( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 )
ad

( x x0 )( x x1 )( x x3 ) ( x x0 )( x x1 )( x x2 )
y2 y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )
.p

Let
w

x0 5; x1 6; x2 9; x3 11
w

y0 12; y1 13; y2 14; y3 16


w

( x 6)( x 9)( x 11) ( x 5)( x 9)( x 11)


y f ( x) (12) (13)
(5 6)(5 9)(5 11) (6 5)(6 9)(6 11)

( x 5)( x 6)( x 11) ( x 5)( x 6)( x 9)


(14) (16) \
(9 5)(9 6)(9 11) (11 5)(11 6)(11 9)

put x = 10,

(4)(1)( 1) (5)(1)( 1)
y (10) f (10) (12) (13)
( 1)( 4)( 6) (1)( 3)( 5)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
(5)(4)( 1) (5)(4)(1)
(14) (16)
(4)(3)( 2) (6)(5)(2)

y = 14.667

5. Find the missing term in the following table using Lagrange’s interpolation

x 0 1 2 3 4
y 1 3 9 - 81

W.K.T Lagrange’s interpolation formula is

( x x1 )( x x2 )( x x3 ) ( x x0 )( x x2 )( x x3 )
y f ( x) y0 y1
( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 )

et
( x x0 )( x x1 )( x x3 ) ( x x0 )( x x1 )( x x2 )
y2 y3

.n
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )

Let

x0 0; x1 1; x2 2; x3 4
pz
ee
y0 1; y1 3; y2 9; y3 81
ad

( x 1)( x 2)( x 4) ( x 0)( x 2)( x 4)


y f (3) (1) (3)
(0 1)(0 2)(0 4) (1 0)(1 2)(1 4)
.p

( x 0)( x 1)( x 4) ( x 0)( x 1)( x 2)


(9) (81)
w

(2 0)(2 1)(2 4) (4 0)(4 1)(4 2)


w

Let x 3,
w

(3 1)(3 2)(3 4) (3 0)(3 2)(3 4)


y = f(3) (1) (3)
( 1)( 2)( 4) (1)( 1)( 3)

(3 0)(3 1)(3 4) (3 0)(3 1)(3 2)


(9) (81)
(2)(1)( 2) (4)(3)(2)

2(1)( 1) 3(1)( 1) 3(2)( 1) (3)(2)(1)


(1) (3) (9) (81)
( 1)( 2)( 4) (1)( 1)(3) (2)(1)( 2) (4)(3)(2)

2 27 81
3
8 2 4

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 27 81
3
4 2 4

y 31

1. Apply Lagrange’s formula to find f(5),given that f(1) = 2,f(2) = 4,f(3) = 8 and f(7) = 128

Solution:

Given the data

x0 1; x1 2; x2 3; x3 7

y0 2; y1 4; y2 8; y3 128

By Lagrange’s interpolation formula

et
( x x1 )( x x2 )( x x3 ) ( x x0 )( x x2 )( x x3 )

.n
y f ( x) y0 y1
( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 )

( x x0 )( x x1 )( x x3 )
( x2 x0 )( x2 x1 )( x2 x3 )
y2 pz
( x x0 )( x x1 )( x x2 )
( x3 x0 )( x3 x1 )( x3 x2 )
y3
ee
Substituting x=5 and the given data
ad

3(2)( 2) 4(2)( 2) 4(3)( 2) 4(3)(2)


y f (5) (2) (4) (8) (128)
( 1)( 2)( 6) 1( 1)( 5) (2)(1)( 4) 6(5)(4)
.p

2 ( 12.800) 24 25.6
w

51.6 12.800
w

f (5) 38.800
w

2. Find a polynomial of degrees 3 fitting the following data


x -1 0 2 3
y -2 -1 1 4

Soln:
Given data:
x0 1; x1 0; x2 2; x3 3
y0 2; y1 1; y2 1; y3 4

By Lagrange’s interpolation formula

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
( x x1 )( x x2 )( x x3 ) ( x x0 )( x x2 )( x x3 )
y f ( x) y0 y1
( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 )

( x x0 )( x x1 )( x x3 ) ( x x0 )( x x1 )( x x2 )
y2 y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )

Substituting the given data,

x( x 2)( x 3) ( x 1)( x 2)( x 3)


y f ( x) ( 2) ( 1)
( 1)( 3)( 12) 1 ( 2)( 3)

( x 1) x( x 3) ( x 1) x( x 2)
(1) (4)
3 2 ( 1) 4 3 1

et
1 3 1 3 1 3 1 3
= x 5x2 6 x x 4 x2 x 6 x 2 x 2 3x x x2 2x
6 6 6 3

.n
1 3
= x 5 x 2 6 x x3 4 x 2 x 6 x3 2 x 2 3x 2 x3 2 x x 4 x
6

1 3
pz
ee
y= x x2 4x 6
6
ad

3.Given u0 6; u1 9; u3 33; u7 15. Find u2

Solution:
.p

Given the data


w

x0 0; x1 1; x2 3; x3 7
w

yo 6; y1 9; y2 33; y3 15
w

Where y = u(x)

To find y when x = 2

By Lagrange’s interpolation formula

( x x1 )( x x2 )( x x3 ) ( x x0 )( x x2 )( x x3 )
y f ( x) y0 y1
( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 )

( x x0 )( x x1 )( x x3 ) ( x x0 )( x x1 )( x x2 )
y2 y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
( x 1)( x 3)( x 7) ( x)( x 3)( x 7) ( x)( x 1)( x 7) x( x 1)( x 3)
6 9 33 ( 15)
( 1)( 3)( 7) (1)( 2)( 6) (3)(2)( 4) (7)(6)(4)

put x = 2
(1)( 1)( 5) 2( 1)( 5) 2(1)( 5) 2(1)( 1)
y = u(x) = 6 9 33 ( 15)
21 12 24 168

= 7. 5 -1.429+13.750+0.179

y = y(x) = 2;

u2 20

et
Inverse Lagrangian:

1. Apply lagrange’s formula inversely to obtain the root of the equation f(x) = 0 given that

.n
f(0) = -4;f(1) = 1;f(3)=29;f(4)=52.

Solution:

Given that
pz
ee
x0 0; x1 1; x2 3; x3 4
ad

yo 4; y1 1; y2 29; y3 52
.p

To find x such that f(x) = 0


w

Applying lagrange’s interpolation formula inversely we get


w

( y y1 )( y y2 )( y y3 ) ( y y0 )( y y2 )( y y3 )
x x0 x1
( y0 y1 )( y0 y2 )( y0 y3 ) ( y1 y0 )( y1 y2 )( y1 y3 )
w

( y y0 )( y y1 )( y y3 ) ( y y0 )( y y1 )( y y2 )
x2 x3
( y2 y0 )( y2 y1 )( y2 y3 ) ( y3 y0 )( y3 y1 )( y3 y2 )

Using the given data and subs y = 0 we’ve

( 1)( 29)( 52) 4( 29)( 52) 4( 1)( 52) 4( 1)( 29)


x (0) (1) (1) (4)
( 5)( 23)( 56) 5 ( 28)( 51) 33(28)( 51) (56)(51)(23)

0.845 0.029 0.007

x 0.823

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Homework:

1. By LF Given y0 12; y1 0; y3 6; y4 12.Find y2


Ans: 4
2. Fit a polynomial of minimum order to the data

x 0 1 3 4
y -4 1 29 52

Inverse Lagrange’s Interpolation;

The process of finding a value of x for the corresponding value of y is called inverse
interpolation

The inverse of Lagrange’s interpolation formula is

et
( y y1 )( y y2 )......( y yn ) ( y y0 )( y y2 )......( y yn )

.n
x x0 x1
( y0 y1 )( y0 y2 )......( y0 yn ) ( y1 y0 )( y1 y2 )......( y1 yn )

.................... pz
( y y0 )( y y1 )......( y yn 1 )
( yn y0 )( yn y1 )......( yn yn 1 )
xn
ee
1. Find the age corresponding to the annuity value 13.6 given the table:
ad

Age(x) 30 35 40 45 50
Annuity value (y) 15.9 14.9 14.1 13.3 12.5
.p

Solution:
w

W.K.T the inverse Lagrange’s interpolation formula is


w

( y y1 )( y y2 )( y y3 )( y y4 ) ( y y0 )( y y2 )( y y3 )( y y4 )
w

x x0 x1
( y0 y1 )( y0 y2 )( y0 y3 )( y0 y4 ) ( y1 y0 )( y1 y2 )( y1 y3 )( y1 y4 )

( y y0 )( y y1 )( y y3 )( y y4 ) ( y y0 )( y y1 )( y y2 )( y y4 )
x2 x3
( y2 y0 )( y2 y1 )( y2 y3 )( y2 y4 ) ( y3 y0 )( y3 y1 )( y3 y2 )( y3 y4 )

( y y0 )( y y1 )( y y2 )( y y3 )
x4 ..........
( y4 y0 )( y4 y1 )( y4 y2 )( y4 y4 )

(13.6 14.9)(13.6 14.1)(13.6 13.3)(13.6 12.5)


Let y = 13.6 x (30)
(15.9 14.9)(15.9 14.1)(15.9 13.3)(15.9 12.5)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
(13.6 15.9)(13.6 14.1)(13.6 13.3)(13.6 12.5)
(35)
(14.9 15.9)(14.9 14.1)(14.9 13.3)(14.9 12.5)

(13.6 15.9)(13.6 14.9)(13.6 13.3)(13.6 12.5)


(40)
(14.1 15.9)(14.1 14.9)(14.1 13.3)(14.1 12.5)

(13.6 15.9)(13.6 14.9)(13.6 14.1)(13.6 13.3)


(50)
(12.5 15.9)(12.5 14.9)(12.5 14.1)(12.5 13.3)

x = 43

2. Find the value of given f ( ) 0.3887 where


d
f( ) Using the table
0 1 2

et
1 sin
2

.n
θ 21 23 25

f (θ) 0.3706 0.4068


pz
0.4433
ee
Solution:
ad

Given: f ( ) =0.3887

(0.3887 0.4068)(0.3887 0.4433)


(21)
.p

(0.3706 0.4068)(0.3706 0.4433)


w

(0.3887 0.3706)(0.3887 0.4433)


(23)
w

(0.4068 0.3706)(0.4068 0.4433)


w

(0.3887 0.3706)(0.3887 0.4068)


(25)
(0.4433 0.3706)(0.4433 0.4068)

= 7.8858+ 17.2027 – 3.0865

22.0020

The value of such that f ( ) =0.3887 is 22.0020 .

Homework:

1. Using Lagrange’s interpolation find y (2) from the following data;

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x 0 1 3 4 5
y 0 1 81 256 625
(Ans:16)

2. Using Lagrange’s interpolation find f(4) given that f(0) = 2,f(1) = 3,f(2) = 12,f(15) = 3587
x
2 x2
3. The following table gives the value of the problem integral f ( x) e dx
0

corresponding to certain values of x. For what value of x is this integration equal to 0.5

x 0.46 0.47 0.48 0.49


y 0.4846555 0.4937452 0.5027498 0.5116683

Divided differences (unequal intervals)

et
Let the function y f ( x) take the values f ( x0 ), f ( x1 ), f ( x2 )..... f ( xn ) corresponding to the

.n
value x0 , x1 , x2 ,....., xn of the argument x where x1 x0 , x2 x1,......., xn xn 1 , need not necessarily
be equal
pz
The first divided difference of f(x) for the arguments x0 , x1 , is
ee
f ( x1 ) f ( x0 )
f ( x0 , x1 )
ad

x1 x0

f ( x2 ) f ( x1 )
.p

"' ly, f ( x1 , x2 ) and so on


x2 x1
w

The second divided difference of f(x) for the three arguments x0 , x1 , x3 is defined as
w

f ( x1 , x2 ) f ( x0 , x1 )
w

f ( x0 , x1 , x2 )
x2 x0

f ( x2 , x3 ) f ( x1 , x2 )
f ( x0 , x1 , x2 ) and so on
x3 x1

Divided Difference Table:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Argument X Entry First D.D Second D.D Third D.D
f(x) f ( x) 2
f ( x) 3
f ( x)
1 1 1

x0 f ( x0 )
x1 f ( x1 ) f ( x0 , x1 ) f ( x0 , x1 , x2 )
f ( x1 , x2 ) f ( x0 , x1 , x2 , x4 )
x2 f ( x2 ) f ( x1 , x2 , x3 )
f ( x2 , x3 ) f ( x1 , x2 , x3 , x4 )
x3 f ( x3 ) f ( x2 , x3 , x4 )
x4 f ( x4 ) f ( x3 , x4 )

Properties of divided differences:

1. The divided difference are symmetrical in all their arguments ie., the value of any difference is
independent of the order of the arguments
2. The operator ' ' is linear

et
3. The nth divided differences of a polynomial of the nth degree are constant.
4. The divided difference of the product of a constant and a function is equal to the product of the

.n
constant and the divided difference of the function.

Problems based on Divided Differences:


pz
ee
1 3 1 1
1. If f ( x) . find the divided difference of f(a,b,c,d) (or) show that
x bcd a abcd
Solution:
ad

Given
.p

1
f ( x)
x
w

1 1
f (a) ; f (b)
w

a b
1 1
w

f (b) f (a) b a
f ( a, b)
b a b a
a b
ab
( a b)
( a b) 1
ab (a b)
1
f ( a, b)
ab
f (b, c) f (a, b)
f (a, b, c)
c a

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 1 1 1
bc ab bc ab
c a (c a )
( a c) 1 1
abc (c a ) abc
1
f (a, b, c)
abc
f (b, c, d ) f (a, b, c)
f (a, b, c, d )
d a
1 1
bcd abc (a d ) x 1
d a abcd (a d )

et
1
f (a, b, c, d )
abcd

.n
1 1
ie.,Δ3
a abcd

2. If f ( x)
1
x2
bcd

pz
find the divided difference f(a, b) and f(a, b, c)(or) prove that
ee
ac bc ca
f (a, b, c)
a 2b 2 c 2
ad

Solution:
1
Given: f ( x)
.p

x2
1 1
f (a) ; f (b)
w

a2 b2
1 1
w

f (b) f (a) b2 a 2 a 2 b2 1
f ( a, b)
w

b a b a a 2b 2 (a b)

( a b) ( a b)
( a 2 b 2 ) ( a b)
( a b)
f ( a, b)
a 2b 2
f (b, c) f (a, b)
f ( a , b, c )
(c a )
(b c) a b
b2c 2 a 2b 2
(c a )

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 a 2b a 2 c 2 c 2 a c 2b
(c a ) a 2b 2 c 2
1 ac(c a) b(c 2 a 2 )
(c a ) a 2b 2 c 2
(c a) ac b(c a) ac bc ab
(c a ) a 2b 2 c 2 a 2b 2 c 2
ab bc ca
f (a, b, c)
a 2b 2 c 2

3. From the divided difference table for the following data:


x 5 15 22
y 7 36 160

et
.n
Solution:
The divided difference table is

x y f ( x) f ( x) 2
pz
f ( x)
ee
1 1
5 7
36 7
ad

2.9 17.71 2.9


15 5
15 36
160 36 22 5
17.71 0.87
.p

22 15
22 160
w
w

4. Obtain the divided difference table for the following data


x -1 0 2 3
w

y -8 3 1 12

Solution:
The divided difference table is,

x y f ( x) 1 f ( x) 1
2
f ( x) 1
3
f ( x)
1 8 3 8
11
0 3 0 1 1 11
4 4 4
2 1 1 3 2 1 2
1 11 1 3 1
3 12 2 0 4
12 1 3 0
11
3 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

5. Find the divided difference of f ( x) x3 x 2 for the arguments 1,3,6,11


Solution:
Given, f ( x) x3 x 2
When
x = 1, f(1) = 4
x = 3, f(3) = 82
x = 6, f(6) = 224
x =11, f(11) = 1344

The divided difference table is


x y f ( x) 1 f ( x) 2
f ( x) 3
f ( x)
1 1
1 4 32 4
14

et
3 32 3 1 64 14
10
6 224 224 32 6 1
20 10

.n
64 224 64 1
11 1344 6 3 20 11 1
1344 224 11 3
11 6
224
pz
ee
Homework:
ad

1. Find the divided difference table for the following data


(i)
x 1 1 4 5
.p

f(x) 8 11 78 123
w

(Ans: 0.168)
(ii)
w

x 1 2 4 7 12
w

f(x) 22 30 82 106 206

(Ans: 0.19)
2. Find the 3rd divided difference with arguments 2, 4,9,10 of the function f ( x) x3 2x .

Ans:f(2,4,9,10)=1.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Newton’s Divided difference formula (or) Newton’s interpolation formula for unequal intervals:

Let y f ( x) take values f ( x0 ), f ( x1 )..... f ( xn ) corresponding to the arguments


x0 , x1 ,....., xn then

f ( x) f ( x0 ) ( x x0 ) f ( x0 , x1) ( x x0 )( x x1) f ( x0 , x1, x2 ) ..... ( x x0 )( x x1).....( x xn 1) f ( x0 , x1,..., xn )

Problems base on divided difference:

1. Use Newton’s divided difference formula fit a polynomial to the data:

x -1 0 2 3
y -8 3 1 12
And hence find y when x=1.

et
Solution:

The divided difference table is,

.n
x y f ( x) f ( x) 2
f ( x) 3
f ( x)

0
1
3
8 3
0
8
1
11 1 11
pz
ee
4 4 4
1 3 2 1 2
2 1 1 3 1
2 0 11 1
3 12 4
ad

12 1 3 0
11
3 2
.p

The Newton’s divided difference formula is,


w

f ( x) f ( x0 ) ( x x0 ) f ( x0 , x1 ) ( x x0 )( x x1 ) f ( x0 , x1, x2 )
w
w

( x x0 )( x x1 )( x x2 ) f ( x0 , x1, x2 x3 ) 1

Here x0 1, x1 0, x2 2, x3 3

f ( x0 ) 8; f ( x0 , x1 ) 11; f ( x0 , x1, x2 ) 4; f ( x0 , x1, x2 , x3 ) 2

1 f ( x) 8 ( x 1)11 ( x 1)( x 0)( 4) ( x 1)( x 0)( x 2)(2)

f ( x) 2x3 6x2 3x 3

When x 1, f (1) 2 6 3 3 2

Hence x 1, y 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2. Find the Newton’s divided difference formula find the missing value from the table
x 1 2 4 5 6
y 14 15 5 - 9
Solution:

The divided difference table is


x y f ( x) 1 f ( x) 2
f ( x) 3
f ( x)
1 1
1 14 15 14
1 5 1
2 15 2 1 2
5 15 4 1
5 1.75 2
4 2 2 5 0.75
4 5 1.75 6 1
9 5 6 2
6 9 2
6 4

et
Newton’s divided difference formula is

.n
f ( x) f ( x0 ) ( x x0 ) f ( x0 , x1 ) ( x x0 )( x x1 ) f ( x0 , x1, x2 )

( x x0 )( x x1 )( x x2 ) f ( x0 , x1, x2 x3 ) pz 1
ee
here x0 1, x1 2, x2 4
f ( x0 ) 14, f ( x0 , x1 ) 1, f ( x0 , x1, x2 ) 2, f ( x0 , x1, x2 , x3 ) 0.75
ad

Here x = 5
1 f (5) 14 (5 1)(1) (5 1)(5 2)( 2) (5 1)(5 2)(5 4)(0.75)
.p

f (5) 3
w

3. Find the polynomial equation y f ( x) passing through (-1,3),(0,-6),(3,39),(6,822) and (7,1611)


w

by using divided difference formula,


w

Solution:

Given
x -1 0 3 6 7
f(x) 3 -6 39 822 1611

The divided difference table is ,


x f ( x) 1 f ( x) 2
f ( x) 3
f ( x) 4
f ( x)
1 1 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 3 6 3
9 15 9
0 1 6
3 1 41 6 13 5
0 6 39 6 5 1
15 261 15 6 1 7 1
3 0 41
6 0 132 41
822 39 13
3 39 261 7 0
6 0 789 261
132
1611 822 7 3
6 822 789
7 6

7 161

Newton’s divided difference formula is,

f ( x) f ( x0 ) ( x x0 ) f ( x0 , x1 ) ( x x0 )( x x1 ) f ( x0 , x1 , x2 )

et
( x x0 )( x x1 )( x x2 ) f ( x0 , x1 , x2 , x3 )

.n
( x x0 )( x x1 )( x x2 )( x x3 ) f ( x0 , x1 , x2 , x3 , x4 ) 1

Here x0 1, x1 0, x2

f ( x0 ) 3, f ( x0 , x1 )
3, x3 6, x4 7
pz
9, f ( x0 , x1, x2 ) 6, f ( x0 , x1, x2 , x3 ) 5, f ( x0 , x1, x2 , x3 , x4 ) 1
ee
1 f ( x) 3 ( x 1)( 9) ( x 1) x(6) ( x 1) x( x 3)5 ( x 1) x( x 3)( x 6)(1)
3 9x 9 6x2 6x 5x3 10x2 15x ( x2 2x 3)( x2 6x)
ad

6 18x 4 x 2 5 x3 x 4 6 x3 2 x3 12 x 2 3x 2 18 x
x4 3x3 5x2 6
.p

f ( x)

Interpolation with equal Intervals :


w

Newton’s forward Interpolation formula:


w
w

Let y f ( x) be a function which takes the values y0 , y1,....., yn corresponding to the values
x0 , x1 ,....., xn Where the values of x are equally spaced
Ie., xi x0 ih ; i 0,1,2,....., n
Suppose, to find the values of y when x x0 ph
where p is any real number

p( p 1) 2 p( p 1)( p 2) 3
yp y0 p y0 y0 y0 ....
2! 3!
x x0
Where p
h
This formula is called Newton’s Gregory interpolation forward interpolation formula.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

Note:
(1) If y x is a polynomial in x of degrees n then the formula becomes
p( p 1) 2 p( p 1)( p 2) 3 p( p 1)( p 2)......( p n 1) n
yp y0 p y0 y0 y0 .... y0
2! 3! n!
(2) This formula is used to interpolate the value y near x x0 (beginning of the given date) and
for extrapolation of the values of ‘y’ a short distance backward from y 0 .

Newton’s backward interpolation formula:

This formula is used for interpolating a value of y for a given x near the end of a table of values.
Let y0 , y1,....., yn be the values of y f ( x) for x x0 , x1,...., xn.
x0 ih i 0,1,2,3,......, n

et
Where xi
To find y when x xn ph where p is any number (p is negative in this case)

.n
p( p 1) 2 p( p 1)( p 2) 3
yp yn p yn yn yn .........

where p
x xn
2!
pz 3!
ee
h

This formula is called Newton’s backward interpolation formula


ad

Error in Newton’s Interpolation formula:


(1) The error caused in using Newton’s forward formula for interpolation is given by,
.p

p ( p 1)( p 2).....( p n) n 1
Error = y( c )
w

(n 1)!
x x0
w

where x0 c yn and p
h
w

(2) The error in using Newton’s backward formula in the form

p ( p 1)( p 2).....( p n) n 1 n 1
Error= h y (c)
(n 1)!

where x0 c yn and x xn ph

Problems

1. Using Newton’s forward interpolation formula, five f(1.02) from the following data.

x 1.0 1.1 1.2 1.3 1.4

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
f(x) 0.841 0.891 0.932 0.964 0.985

Solution:

Forward difference table

x y f ( x) y 2
y 3
y
1.0 0.841
1.1 0.891 0.050
0.041 0.009 0
1.2 0.932
0.032 0.009 0.002
1.3 0.964
0.021 0.011
1.4 0.985
2
y0 0.841; y0 0.050 ; y0 0.009

et
Here, x0 1.0 Let x 1.2

.n
x x0
p p 0.2
h

By Newton’s forward interpolation formula, pz


ee
P P 1 2
y 1.2 y0 P y0 y0 .....
2!
ad

0.2 0.8
0.841 0.2 0.050 0.009
2
.p

y 1.2 0.852
w
w

2. Using Newton’s forward interpolation formula find f(1.5) from the following data:
w

x 0 1 2 3 4
f(x) 858.3 869.6 880.9 892.3 903.6

Solution:

Difference table

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

x y y 2
y 3
y 4
y
0 858.3
1 869.6 11.3
11.3 0 0.1
2 880.9 -0.3
11.4 0.1
3 892.3
11.3 0.1 0.2
4 903.6
2 3
Here, x0 1; y0 869.6 ; y0 11.3 ; y0 0.1; y0 0.2

To find y for x=1.5

x x0 0.5
p p 0.5

et
h 1

By Newton’s forward interpolation formula:

.n
p( p 1) 2 p( p 1)( p 2) 3 p( p 1)( p 2)......( p n 1)
yp y0 p y0
2!
y0
3! pz y0 ....
n!
n
y0
ee
(0.5)(0.5)(0.1) (0.5)(0.5)(1.5)
y (1.5) 869.6 (0.5)(11.3) (0.2)
2 6
ad

y (1.5) 875.2

3. Using Newton’s backward interpolation formula find y when x=27 from the following data,
.p

x 10 15 20 25 30
y 35.4 32.2 29.1 26.0 23.1
w

Solution:
w

Backward difference table


x y
w

y 2
y 3
y 4
y
10 35.4
15 32.2 3.2
3.1 0.1 0.1
20 29.1 0.3
3.1 0
25 26.0
2.9 0.2 0.2
30 23.1
Here,

xn 30, yn 23.1, yn 2.9,


2 3 4
yn 0.2, yn 0.2 , yn 0.3

By Newton’s backward interpolation formula

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
p( p 1) 2 p( p 1)( p 2) 3
y ( xn ph) yn p yn yn yn .....
2! 3!
x xn 27 30
Here x 27 ; p 0.6
h 5
( 0.6)(0.4)
y (27) 23.1 (2.9)(0.6) (0.2)
2
( 0.6)(0.4)(1.4) ( 0.6)(0.4)(1.4)(2.4)
(0.2) (0.2)
6 24
24.7947

y(27) 24.8

et
2. Using Newton’s backward formula, find from the following data

.n
x 1.00 1.25 1.50 1.75 2.00
x 0.3679 0.2865 0.2231 0.1738 0.1353
e

Solution:
pz
ee
Backward difference table
x y
ad

y 2
y 3
y 4
y
1.00 0.3679
0.0814
.p

1.25 0.2865
0.0634 0.0180
1.50 0.2231 0.0039
0.141
w

0.0493 0.0006
1.75 0.1735 0.0033
0.0385 0.0108
w

2.00 0.1353
Here, xn 2 ; yn 0.1353 from the difference table ,
w

2 3 4
yn 0.0385 ; yn 0.0108 ; yn 0.0033 ; yn 0.0006.
x xn 1.9 2
Let x 1.9 ; p 0.4
h 0.25

By Newton’s backward interpolation formula


p( p 1) 2 p( p 1)( p 2) 3
y ( xn ph) yn p yn yn yn .....
2! 3!
(0.4)(0.6) ( 0.4)(0.6)(1.6)
y (1.9) 0.1353 ( 0.4)( 0.0385) (0.010) ( 0.0033)
2 6
e 1.9 0.1496

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
3. Find tan(0.26) from the following values of tans for 0.10 x 0.30

x 0.10 0.15 0.20 0.25 0.30


tan x 0.1003 0.1511 0.2027 0.2553 0.3093
Solution:

Difference table
x y y 2
y 3
y 4
y
0.10 0.1003
0.15 0.1511 0.0508
0.0516 0.0008
0.20 0.2027 0.0002
0.0526 0.0010
0.25 0.2553 0.0004 0.0002
0.0540 0.0014
0.30 0.3093
Here xn 0.30 ; yn 0.3093

et
From the difference table

.n
yn 0.0540 ; 2 yn 0.0014 ; 3 yn 0.0004 ; 4
yn 0.0002 ;
Let x 0.26

P
x xn 0.26 0.30
h 0.05
0.8
pz
ee
By Newton’s backward difference formula
( 0.8) ( 0.8)(0.2)(1.2)
tan(0.26) 0.3093 (0.8)(0.0540) ( 0.0014) (0.0004)
ad

2 6
( 0.8)(0.2)(1.2)
(0.0002 )
.p

24
0.2662
w

tan(0.26) 0.2662
w

4. From the following table , find the number of student whose obtained less than 45 marks
w

Marks 30-40 40-50 50-60 60-70 70-80


No of students 30 42 51 35 31

Solution:

Difference table

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x y y 2
y 3
y 4
y
below 40 30
below 50 72 42
51 9
below 60 123 25
35 16
below 70 158 12 37
31 4
below 80 189
2 3 4
Here x0 40 ; y0 30 ; y0 41; y0 10 ; y0 25 ; y0 37

x x0 45 40 5
Let x 45 ; p 0.5
h 10 10
By Newton’s forward difference formula,
p( p 1) 2
yp y0 p y0y0 ....
2!

et
(0.5)( 0.5) (0.5)( 0.5)( 1.5) (0.5)( 0.5)( 1.5)( 2.5)
y(45) 30 (0.5)42 (9) ( 25) 37

.n
2 6 24
30 21.00 1.13 1.56 1.45

y (45) 46.86 pz
ee
Number of students with less than 45 marks

= 47
ad

5. From the following table values of x and f(x),determine (i) f(0.23) and (ii) f(0.29)
x 0.20 0.22 0.24 0.26 0.28 0.30
.p

f(x) 1.6596 1.6698 1.6804 1.6912 1.7024 1.7139


w

Solution:
w

The difference table is,


w

x y y 2
y 3
y 4
y
0.20 1.6596
0.22 1.6698 0.0106
0.0108 0.0002 0.0002
0.24 1.6804 0.0003
0.0112 0.0004
0.26 1.6912
0.0115 0.0003 0.0001
0.28 1.7024
0.30 1.7139

(i) To find f(0.23)


Take x 0.23 and x0 0.22

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
From the difference table,

2 3 4
y0 1.6698; y0 0.0106; y0 0.0002; y0 0.0002; y0 0.0003

x x0 0.23 0.22
p 0.5
h 0.02

By Newton’s forward interpolation formula

p( p 1)
p( p 1)( p 2) 3
2
yp y0 p y0 y0 y0 ....
2! 3!
0.5( 0.5)
f (0.23) 1.6698 (0.5)(0.0106) (0.0002)
2

et
0.5( 0.5)( 1.5) 0.5( 0.5)( 1.5)( 2.5)
(0.0002) ( 0.0003)
6 24

.n
1.6698 0.01 0.00003 0.00001 0.000001
f (0.23) 1.6797
(ii). To find f(0.29)
pz
ee
Take xn 0.30 and x 0.29
x xn
p 0.5
ad

h
2 3
yn 1.7139; yn 0.0115; yn 0.0003; yn 0.0001
.p

p( p 1)
p( p 1)( p 2) 3
2
y ( xn ph) yn p yn yn yn .....
w

2! 3!
( 0.5)(0.5)
w

y(0.29) 1.7139 ( 0.5)(0.0115) (0.0003)


2
w

( 0.5)(0.5)(1.5) ( 0.5)(0.5)(1.5)(2.5)
( 0.0001) ( 0.0003)
6 24

1.7139 0.00575 0.000004 0.00001 0.00001


f (0.29) 1.7081

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Numerical Differentiation and integration:
Differentiation using interpolation formula:

Derivatives using divided difference:

The divided difference formula is

f ( x) f ( x0 ) ( x x0 ) f ( x0 , x1 ) ( x x0 )( x x1 ) f ( x0 , x1, x2 )

( x x0 )( x x1 )( x x2 ) f ( x0 , x1, x2 , x3 ) ......

First fit a polynomial for the given data using Newton’s divided difference interpolation formula
and compute the derivative for a given x.

Problems based on divided differences:

et
'
1. Find f (5)and f (5) using the following the data

.n
x 0 2 3 4 7 9
F(x)
Solution:
4 26 58 112 466 922
pz
Since the values of x are not equally spaced we shall use Newton’s divided difference formula:
ee
x f ( x) y 2
y 3
y 4
y
ad

0 4
26 4
11
.p

2 0
2 26 32 11
58 26 7
w

32 3 0 11 7
3 2 1
54 32 4 0
w

3 58 112 58 11 1 1
54 4 2 16 11 1
4 3 1 1 0
w

118 54 7 2
466 112 16 1 1
4 112 118 7 3 22 16 0
7 4 1 9 2
22 16 9 3
922 466 22
7 466 228 9 4
9 7

9 922
Let x0 0 ; x1 2; x2 3; x3 4; x4 7; x5 9

f ( x0 ) 4; f ( x0 , x1 ) 11; f ( x0 , x1, x2 ) 7; f ( x0 , x1, x2 , x3 ) 1

w.k.t the Newton’s divided diff formula is,

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
f ( x) f ( x0 ) ( x x0 ) f ( x0 , x1 ) ( x x0 )( x x1 ) f ( x0 , x1, x2 )
( x x0 )( x x1 )( x x2 ) f ( x0 , x1, x2 , x3 ) ......
4 ( x 0)11 ( x 0)( x 2)7 ( x 0)( x 2)( x 3)(1)
4 11x ( x2 2x)7 ( x3 5x2 6x)
4 11x 7 x 2 14 x x3 5 x 2 6 x
f ( x) x3 2x2 3x 4 (1)
Differentiate with respect to x
f ' ( x) 3x2 4x 3 (2)
f ' (5) 3(5)2 4(5) 3 98
f '' ( x ) 6x 4
f '' (5) 6(5) 4 34

et
f (5) 98; f ( x) 34

.n
Homework:

0 1 4 5
pz
1. Find the values of f (3) using divided difference Given the data:

x
ee
f ( x) 8 11 68 123

Newton’s forward difference Formula:


ad

Let y=f(x) be a function taking the values y0 , y1 ,...., yn corresponding to x0 , x1 ,......, xn of the
.p

independent variable x.
w

Let the values of x be at equidistant intervals of size h


w

Then, if x is non- tabular value


w

y0 (2u 1) 2 (3u 2 6u ) 2) 3
y0 y0
dy 1 1! 2! 3!
f ' ( x)
dx h (4u 3 18u 2 22u 6) 4
y0 ......
4!

x x0
where u
h

Similarly,
d2y 1 (6u 2 18u 11)
f '' ( x) 2
y0 (u 1) 3
y0 4
y0 ......
dx 2 h2 12

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
d3y 1 12u 18
f ''' ( x) 3
y0 4
y0 ......
dx3 h3 12
For the tabular value at x x0
dy 1 1 1 1
f ' ( x0 ) y0 2
y0 3
y0 4
y0 .......
dx x x0 h 2 3 4

d2y 1 11
f '' ( x0 ) 2
y0 3
y0 4
y0 .......
dx 2 x x0
h2 12

d3y 1 3
f ''' ( x0 ) 3
y0 4
y0 .......
dx3 x x0
h3 2

Newton’s backward difference formula:

et
Let y=f(x) be a function taking the values y0 , y1 ,...., yn corresponding to x0 , x1 ,......, xn of the

.n
independent variable x. Let the values of x be at equidistant intervals of size h

Then
If x is non- tabular value:
pz
ee
y n 2v 1 2 (3v 2 6v 2) 3
yn yn
' dy 1 1! 2! 3!
f ( x)
ad

3 2
dx h (4v 18v 22v 6) 4
yn .....
4!
.p

x xn
where v
h
w

Similarly,
w

d2y 1 (6v 2 18v 11)


w

f '' ( x) 2
yn (v 1) 3
yn 4
yn ......
dx 2 h2 12
d3y 1 (12v 18)
f ''' ( x) 3
yn 4
yn ......
dx3 h3 12
For the Tabluar value at x xn
dy 1 1 1
f ' ( xn ) yn 2
yn 3
yn ......
dx x xn h 2 3

d2y 1 11
f '' ( xn ) 2
yn 3
yn 4
yn ......
dx 2 x xn
h2 12

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
d3y 1 3
f ''' ( xn ) 3
yn 4
yn ......
dx3 x xn
h3 2
Note:

1. Numerical differentiation can be used only when the difference of some order are constant.

Problem based on Newton’s forward and backward

1. Find f ' (3) and f '' (3) for the following data

x 3 3.2 3.4 3.6 3.8 4


f ( x) -14 -10.032 -5.296 -0.256 6.672 14

et
Solution:

.n
Difference Table

x
3 14
y y 2
y pz 3
y 4
y 5
y
ee
3.2 10.032 3.968
4.736 0.768
3.4 5.296 0.464
ad

5.04 0.304
3.6 0.256 1.584 2.048 5.12
6.928 1.888
3.8 6.672 1.488 3.072
.p

7.328 0.4
4 14
w

To find f ' (3) :


w

Here h=0.2
w

By Newton’s forward difference Formula is :


dy 1 1 1 1 1
f ' ( x0 ) y0 2
y0 3
y0 4
y0 5
y0 ......
dx x x0 h 2 3 4 5

dy 1 1 1 1 1
f ' (3) 3.968 (0.768) ( 0.464) (2.048) ( 5.12)
dx x 3 0.2 2 3 4 5
1
(3.968 0.384 0.1547 0.512 1.024)
0.2
f ' (3) 9.4665
To find f (3) :

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
We know that
'' d2y 1 2 3 11 4 5 5
f ( x0 ) y0 y0 y0 y0 ......
dx 2 x x0
h2 12 6

d2y 1 11 5
f '' (3) (0.768 ( 0.464) (2.048) ( 5.12))
dx 2 x 3
(0.2) 2
12 6
1
(0.768 0.464 1.8773 4.267)
0.04
f (3) 184.4075
2. The following data gives the velocity of a particle for 20 seconds at an interval of 5 second Find
the initial acceleration using the entire data

Time(sec) 0 5 10 15 20
Velocity(m/sec) 0 3 14 69 228

et
Solution:
Difference table is dependent on time t.ie.,

.n
t v v 2
v 3
v 4
v
0 0
5 3 3
11
pz 8
44 36
ee
10 14 24
55 104 60
15 69
20 228 159
ad

dv
For initial acceleration ie., at t=0 ; Here h=5
dt
.p

We use forward formula


w

dv 1 1 1 1
f ' (t0 ) v0 2
v0 3
v0 4
v0 .....
dt h 2 3 4
w

t t0

dv 1 1 1 1
w

f ' (0) 3 (8) (36) (24)


dt t 0 5 2 3 4
1
(3 4 12 6)
5
1
(5)
5

f ' (0) 1

3. Find f ' (4) and f '' (4), f ''' (4) for the following data

x 0 1 2 3 4
y 1 2.718 7.381 20.086 54.598

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Solution:

Difference table:

x y y 2
y 3
y 4
y
0 1
1 2.718 1.718
4.663 2.945
2 7.381 5.097 8.668
12.705 8.042
3 20.086 13.765
34.512 21.807
4 54.598

To Find f ' (4) :

et
The Newton’s backward difference formula:

.n
dy 1 1 1 1
f ' ( xn ) yn 2
yn 3
yn 4
yn ......
dx x xn h 2 3 4

f ' (4)
dy
dx x 4
1
1
(34.512) pz 1
2
(21.807)
1
3
(13.765)
1
4
(8.668)
ee
34.512 10.9035 4.58 2.167
'
f (4) 52.1705
ad

To find f '' (4) :


d2y 1 11 5
.p

'' 2 3 4 5
f ( xn ) yn yn yn yn ......
dx 2 x xn
h2 12 6
w

d2y 1 11
f '' (4) 21.807 13.765 (8.668)
dx 2
w

x 4
1 12
21.807 13.765 7.9457
w

''
f (4) 43.5177

To find f ''' (4) :

d3y 1 3
f ''' ( xn ) 3
yn 4
yn ......
dx3 x xn
h3 2

d3y 1 3
f ''' (4) 13.765 (8.668)
dx 3 x 4
1 2
13.765 13.002
'''
f (4) 26.767

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net

4. Find the 1st and 2nd derivatives of f(x) at the point x=1.5 and x=4

x 1.5 2 2.5 3 3.5 4


y 3.375 7 13.625 24 38.875 59

Solution:

Difference table:

x y f ( x) y 2
y 3
y 4
y
1.5 3.375
2 7 3.625
6.625 3 0.750
2.5 13.625 0
3.750 0.750

et
3 24 10.375
4.500 0.750 0
3.5 38.875 14.875

.n
20.125 5.250
4 59

To find x = 1.5
Here h = 0.5
pz
ee
By Newton’s forward difference Formula is :
ad

dy 1 1 1 1 1
f ' ( x0 ) y0 2
y0 3
y0 4
y0 5
y0 ......
dx x x0 h 2 3 4 5
.p

dy 1 1 1
f ' (1.5) 3.625 (3) (0.75)
w

dx x 1.5 0.5 2 3
w

f ' (1.5) 4.75


d2y
w

1 11 5
f '' ( x0 ) 2
y0 3
y0 4
y0 5
y0 ......
dx 2 x x0
h2 12 6

d2y 1
f '' (1.5) (3 0.75)
dx 2 x 1.5
(0.5) 2
''
f (1.5) 9

To find x = 4

The Newton’s backward difference formula is,

dy 1 1 1 1
f ' ( xn ) yn 2
yn 3
yn 4
yn ......
dx x xn h 2 3 4

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
dy 1 1 1
f ' (4) 20.125 (5.250) (0.75)
dx x 4 0.5 2 3
1
20.125 2.625 0.25
0.5
f ' (4) 46
d2y 1
f '' ( xn ) 2
yn 3
yn ......
dx 2 x xn
h2

d2y 1
f '' (4) (5.250 0.75)
dx 2 x 4
(0.5) 2
f '' (4) 24

et
dy d2y
5. Find and 2 at x=51 from the following data

.n
dx dx
x 50 60 70 80 90

Solution:
y 19.96 36.65 58.81 77.21 94.61
pz
ee
Given: x=51
x0 50 h 60 50 10
ad

x x0 51 50
u 0.1
h 10
.p

At x=51, u=0.1
Difference table:
w

x y y 2 3 4
w

y y y
50 19.96
w

60 36.65 16.69
22.16 5.47 9.23
70 58.81 11.99
18.40 3.76 2.76
80 77.21
17.40 1.00
90 94.61
w.k.t the Newton’s forward difference Formula is :

(2u 1) 2 (3u 2 6u 2) 3
y0 y0 y0
' dy dy 1 2! 3!
f ( x) 3 2
dx x = x0 dx u = 0.1 h (4u 18u 22u 6) 4
y0 .......
4!

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
(0.2 1) 3(0.1) 2 6(0.1) 2) 2
16.69 (5.47) ( 9.23)
dy 1 2 6
f ' (51)
dx u 0.1 10 (4(0.02)3 18(0.1) 2 22(0.1) 6)
(11.99) ......
24
1
(16.69 2.188 2.1998 1.9863)
10
f ' (51) 1.0316

'' d2y 1 2 3 (6u 2 18u 11) 4


f ( x) y0 (u 1) y0 y0 ......
dx 2 u 0.1
h2 12
1 6(0.1) 18(0.1) 11
f '' (51) 5.47 (0.1 1)( 9.23) (11)
100 12
1

et
5.47 8.307 9.2523
100
f " (51) 0.2303

.n
f ' (51) 1.0316
f " (51) 0.2303 pz
ee
Numerical differentiation (using Stirling’s formula)
ad

Derivatives at points near the middle of the data.


.p

If the derivatives of y=f x required at a point x=x 0 +ph near the middle of the data.
w
w

3p 2 -1 3 1
Δy 0 +Δy y-1 +pΔ 2 y -1 + Δ y -1 +Δ 3 y -2 + 2p 3 -p Δ 4 y -1
dy 1 12 12
w

=
dx h 5p 4 -15p 2 +4
+ Δ 5 y -2 +Δ 5 y -3 .....
240

d2y 1 p 6p 2 -1 4
2
= 2 Δ 2 y -1 + Δ 3 y -1 +Δ 3 y -2 + Δ y -1 +...
dx h 2 12

x-x 0
Where p=
h

In particular at x=x 0 (at the center of the data)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
dy 1 1 1 3 1 5
= Δy0 +Δy-1 - Δ y-1 +Δ3 y-2 + Δ y -2 +Δ 5 y -3 +....
dx x=x 0 h 2 12 60

d2y 1 1
2
= 2 Δ 2 y -1 + Δ 4 y -2 +.....
dx h 12

We can also use other central difference formula such as Bessel’s Formula.

1. Find the first and second derivatives of the Function tabulated below at x=0.6
x 0.4 0.5 0.6 0.7 0.8
y 1.5836 1.7974 2.0442 2.3275 2.6511
Solution:

Since x = 0.6 is in the middle of the data, we will use Stirling’s formula

et
x y y 2
y 3
y 4
y

.n
0.4 1.5836
0.5 1.7974 0.2138
0.0330 0.0035
0.6
0.7
2.0442
2.3275
0.2468
0.2833
pz
0.0365 0.0038
0.0003
ee
0.3236 0.0403
0.8 2.6511
h=0.1; y0 =0.6
ad

By stirlings Formula
.p

dy 1 1 1 3
= Δy0 +Δy-1 - Δ y -1 +Δ 3 y -2 +...
w

dx x = x0 h 2 12
w

1 1 1
= 0.2833+0.2468 - 0.0038+0.0035
w

0.1 2 12

=10 0.2651-0.0006 =10(0.2645)

dy
=2.645
dx x = 0.6

d2 y 1 1
= Δ 2 y-1 - Δ 4 y-2 +.....
dx 2 x = x0
h 2
12

1 1
0.0365- 0.0003
0.01 12

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
d2 y
=3.6475
dx 2 x = 0.6

2. Given the following table of values of x and

x 1.00 1.05 1.10 1.15 1.20 1.25 1.30


y 1.0000 1.0247 1.0486 1.0723 1.0954 1.1180 1.1401

dy d2y
Find and 2 at x=1.15.
dx dx

Solution:

Since x=1.15 is in the middle of the table we will use stirlings formula

et
Difference table:

.n
x y y 2
y 3
y 4
y Δ5 y Δ6 y
1.00
1.05
1.0000
1.0247 0.0247 pz
0.0006 0
ee
1.10 1.0488 0.0241
0.0006 0.0002 0.0002
1.15 1.0723 0.0235 0.0005
0.0004 0.0001 0.0003 0.0009
0.0231
ad

1.20 1.0954 0.0001 0.0004


0.0226 0.0005 0
1.25 1.1180
0.0221 0.0005
.p

1.30 1.1401
w

h=0.05; y 0 =1.15
w

By stirlings Formula,
w

dy 1 1 1 3 1
= Δy0 +Δy-1 - Δ y -1 +Δ 3 y-2 + Δ 5 y -2 +Δ 5 y -3 +...
dx x = x0 h 2 12 60

1 1 1 1
= 0.0231+0.0235 - -0.0001+0.0002 + 0.0004+0.0005
0.05 2 12 60

=20(0.0233-0.00001-0)

=20(0.02329)

dy
0.46580
dx x 1.15

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
d2 y 1 1
= Δ 2 y-1 + Δ 4 y-2 +....
dx 2 x = x0
h 2
12

1 1
= -0.0004+ -0.0003
0.0025 12

1 1
= -0.0004-0.00003 = -0.00043
0.0025 0.0025

d2 y
= - 0.1720
dx 2 x = 1.15

et
Bessel’s formula:

.n
1
p p p 1
1 1 p p 1 2
y x0 ph
2
y0 y1 p
2
y0
4 pz 2
y 1
2
y0
6
3
y 1
ee
p 1 p p 1 p 2 4 4
y 2 y 1 ...
48
ad

Then
.p

1
1 2p-1 2 3p 2 -3p+
y'(x)= Δy0 + Δ y-1 +Δ 2 y0 + 2 Δ 3 y +....
-1
w

h 4 6
w

1. Obtain the value of f’(7.50) from the following table:


w

x 7.47 7.48 7.49 7.50 7.51 7.52 7.53


Y 0.193 0.195 0.198 0.201 0.203 0.206 0.208
Solution:

Since x=7.50 is in the middle of the table using Bessel’s interpolation formula

Difference table

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x y y 2
y 3
y 4
y Δ5 y Δ6 y
7.47 0.193
7.48 0.195 0.002
0.003 0.001 0.0010
7.49 0.198 0
0.003 0 0.001
7.50 0.201 0.003 0.003
0.002 0.001 0.001 -0.010
7.51 0.203 0.004 0.007
0.003 0.001 0.001
7.52 0.206
0.002 0.001
7.53 0.208

Here h=0.01; y 0 =7.50


1
p p p 1

et
1 1 p p 1 2 2 2 3
y x0 ph y0 y1 p y0 y 1 y0 y 1
2 2 4 6

.n
p 1 p p 1 p 2 4 4
y y ...
48
2

pz 1

1
ee
1 2p-1 2 3p2 -3p+
Then y'(x)= Δy0 + Δ y-1 +Δ 2 y0 + 2 Δ3 y + 1 3
y 4
y +....
-1 2 1
h 4 6 24
ad

For P = 0
.p

dy 1 1 1 1
w

= 0.002- 0.001-0.001 + 0.002 + -0.001-0.004


dx x=7.50 0.01 4 12 24
w

dy
=0.21646
w

dx x=7.50

2. Find the Value of Sec 31 from the following data

(deg) : 31 32 33 34
tan : 0.6008 0.6249 0.6494 0.6745

Solution:

Let x = 0; y= tan

Here x0 31

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
d dy
(tan ) sec2 sec 2 x
d dx

dy
To find sec 2 31
dx x = x0

Difference table:

x y y 2
y 3
y
31 0.6008
32 0.6249 0.0241
0.0245 0.0004
33 0.6494 0.0002
0.0251 0.0006
34 0.6745

et
Here h = 32-31=1

.n
Newton’s forward difference table is

f ' ( x)
dy
sec2
1
( y0
1 2
pz
y0
1 3
y0 ....)
ee
dx x x0 h 2 3

radians i radians 0.0


ad

180
1 1
f ' (31) sec2 31 (0.0241 (0.004) (0.0002)).
2 3
.p

sec 2 31 1.3695
w

sec 31 1.1703
w
w

1 3
Numerical Integration by Trapezoidal Rule and Simpson’s and rules :
3 8

Numerical Integration:
xn

The process of computing the value of a definite Integral f(x)dx from a set of values
x0

x i, yi , i = 0,1,2.........,n then where x0 = a, x n = b of the function y = f(x) is called numerical


integration.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Trapezoidal Rule:
b
The trapezoidal Rule to evaluate f x dx .Let DC be the curve y = f(x) and DA, CB be the terminal
a

ordinates.

Let OA= a and OB = b then

AB = OB - OA = b-a

b-a
Divide AB into n equal parts AA1, AA2 ......An-1 , B so that each part = =h
n

y C

et
Y=f(x)

.n
D pz yn yn 1
ee
y1 y2 An 1
ad

0 A A1 A2 B
.p

Draw the ordinates through AA1, AA2 ......An-1 ,B and let then be called y1, y2,.....yn, yn+1 respectively
then
w

xn b
h
w

f(x)dx = f(x)dx = A+2B ----->1


x0 a
2
w

Where A=y1 +y n+1 = sum of the first and last ordinates

B=y 2 +y 3 +......+y n = Sum of the remaining ordinates

Then equation (1) is called the Trapezoidal rule.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Simpson’s rule or Simpson’s one-third Rule:

Let DC be the curve y = f(x) and DC, CB be the terminal ordinates. Let OA = a and OB = b. Divide AB
into even number of equal parts equal to h.

y C

y f ( x)

y1 y2 y3 y2 n 1

0 A A1 A 2 A2n BX

et
1

Let x1, x 2,......x 2n+1 be the points A,A1,...B and y1, y2,..... ,y2n+1 be the corresponding ordinates

.n
then

xn b
f x dx = f x dx =
h
3
A+4B+2C
pz ------> 1
ee
x0 a

Where A = y1 +y2n+1 = Sum of the first and last ordinates


ad

B = y 2 +y 4 +.....+y 2n =Sum of the even ordinate


.p

c = y3 +y5+..... +y2n-1 = Sum of the remaining ordinates.


w

Then equation (1) is known as Simpson’s rule or Simpson’s one-third Rule


w

Simpsons Three Eight Rule:


w

Let DC be the curve y = f(x) and DA, CB be the terminal ordinates. Let OA = a and OB = b.
b-a
Divide AB into a number ‘n’ of equal parts of size h. Then =h .Let ‘n’ be a multiple of 3
n
b
3h
Then y dx = y1 +y n+1 +3 y 2 +y5 +....y n +2 y 4 +y 7 +.....y n-2
a
8

b
3h
ydx= A+3B+2c
a
8

This is known as Simpson’s Three Eight Rule

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Truncation error in Trapezoidal Rule:

nh 3
Error = E < M
12

Where M is the maximum value,

b-a h 2 b-a
E< M, where n =
12 h

Error in the trapezoidal rule is of the order h 2 .

Truncation Error in Simpson’s Formula:


5
Error= E < nh M

et
90

Where M is the maximum value

.n
b-a h 4 b-a
E<
180
M where n=
pz
2h
ee
Error in the Simpson’s formula is of the order h 4

Formula:
ad

Rule Degree of y(x) No of intervals n Error Order


Trapezoidal rule One Any (b a)h 2
h2
.p

E M
12
w

Simpson’s 1/3 Two Even(or)Add (b a)h 4


Rule
E M h4
180
w

3 5
Simpson’s 3/8 Three Multiple of 3 E h
w

rule 8 h5

Note:

1. The trapezoidal rule y(x) is a linear function of the rule is the simplest one but it is least accurate.
2. In Simpson’s one- third Rule: y(x) is a polynomial of degree two. In this ‘n’ the number of
interval must be even ie., the number of ordinates must be odd.
3. Simpson’s one third rule approximates the area of two adjacent strips by the area under a
quadratic parabola.
4. In Simpson’s three eighth rule, y(x) is polynomial of degree 3.In this ‘n’ the number of intervals
is a multiple of 3.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Problems:
3
1. Evaluate x 4 dx by using (i) Trapezoidal Rule (ii) Simpson’s Rule. Verify your results by
-3

actual integration

Solution:

Given
3 b
4
x dx y ( x)dx
3 a

Here y( x) x4
Length of the interval b a 3 3 6.

et
6
we divide '6'equalintervals h= =1
6

.n
we form the below table:

x
y f ( x)
-3
81
-2
16
-1
1
pz
0
0
1
1
2
16
3
81
ee
(i) Trapezoidal Rule:
ad

b
h
f(x)dx= (A+2B)
.p

a
2
w

h (sum of first and last ordinates)


=
2 +2(sum of the remaining ordinates)
w
w

1
= (81+81)+2(16+1+0+1+16)
2
3
f(x)dx=115
-3

(ii)Bysimpson's one-third rule.

b
h
f(x)dx= (A+4B+2C)
a
3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
(sum of the first and last ordinates)
1
= +4(sum of the even ordinates)
3
+2(sum of the remaining ordinates)

1 1
= (81+81)+4(16+0+16)+2(1+1) = 162+128+2
3 3
3
f(x)dx=98
-3

(iii) bysimpson's three-eighth rule:

since n=6(multipleof three)

et
b
3h
f(x)dx= (y1 +y n+1 )+3(y 2 +y5 +.......y n )+2(y 4 +y 7 +.....+y n )

.n
a
8

=
3
8
81+81 +3 16+1+1+16 +2 0 pz
ee
3
f(x)dx=99
-3
ad

iv Byactualintegration :
.p

3 3 3
4 4 x5 2 (3)5
w

x dx 2 x dx 2
3 0
5 0
5
w

2 243
97.2
w

5
3
x 4 dx 97.2
3

1
dx
2. Evaluate using Trapezoidal rule with h=0 Hence obtain an approximate value of .
0
1 x2

. Can you use other formula in this case.

Solution:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 b
dx
Given : y ( x) dx
0
1 x2 a

1
Let y(x) =
1 x2

length of theinterval b a 1 0 1

Taking h 0.2

x 0 0.2 0.4 0.6 0.8 1.0


1
y 1 0.96154 0.86207 0.73529 0.60976 0.50000
1 x2

et
(i) By trapezoidal rule :

.n
b
h
f ( x)dx (A 2B)
a
2

0.2
1 0.5
pz
2 0.96154 0.86207 0.73529 0.60976
ee
2

0.1 1.5 6.33732


ad

1
dx
0.783732
.p

0
1 x2
w

(ii) By Actualintegration:
w

1
dx 1
tan 1 x Here 3.1416
w

1 x2 0 4
0

0.7854

5.2
3.Evalute theintegral I log e xdx using trapezoidal,simpson's rules :
4

Solution:

given:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
5.2 b
x
I= log e dx y ( x)dx
4 a

Let y( x) loge x

Here, b a 5.2 4 1.2

We divide theintervalinto 6equal parts

1.2
h 0.2
6

We form the table

et
4 4.2 4.4 4.6 4.8 5.0 5.2

log e x

.n
1.3862944 1.4350845 1.48160451 1.5260563 1.5686159 1.6094379 1.6486586

(i) By Trapezoidal Rule : pz


ee
b
h
f ( x)dx A 2B
a
2
ad

5.2
0.2 1.4350845 1.48160451 1.5260563
log e x dx 1.3862944 1.6486586 2
.p

4
2 1.5686159 1.6094379
w

1.82765512
w

(ii) Bysimpson's rule:


w

b
h
f ( x)dx ( A 4 B 2C )
a
3

1.3862944 1.6486586
5.2
0.2
log x dx 4 1.4350845 1.5260563
4
3
2 1.4816045 1.5686159

1.82784724

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
(iii)Bysimpson's three eighths rule:

b
3h
f ( x)dx A 3B 2C
a
8

3(0.2) 1.3862944 1.6486586 3 1.4350845 1.4816045


8 1.5686159 1.6094379 2 1.5260563

5.2
log x dx 1.82784705
4

6
1
4.Evaluate I dx using (i) Trapezoidal rule (ii) Simpson's rule
1 x

et
0

Also find the acutal integration

.n
Solution:
6

Given : 1 x dx
1 pz
ee
0

1 6 0
ad

let y ; h 1
1 x 6

x 0 1 2 3 4 5 6
.p

1
y 1 1/2 1/3 1/4 1/5 1/6 1/7
w

1 x
w

(i) By Trapezoidal Rule:


w

b
h
f ( x)dx ( A 2 B)
a
2
6
1 1 1 1 1 1 1 1 1
dx 1 2
0
1 x 2 7 2 3 4 5 6 7
2.02142857
(ii) Bysimpson's one-third Rule:
b
h
f ( x)dx ( A 4 B 2C )
a
3
6
1 1 1 1 1 1 1 1
dx 1 4 2
0
1 x 3 7 2 4 6 3 5

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 1 16 22
1
3 7 15 6
1.95873016

(iii) Bysimpson's three-eighths Rule:

b
3h
f ( x)dx A 3B 2C
a
8

3 1 1 1 1 1 1
1 3 2
8 7 2 3 5 6 4

6
1
dx 1.96607143

et
0
1 x

.n
(iv)By Actualintegration :

0
1
1 x
dx log(1 x)
6
0 pz
log(1 6) log(1 0)
ee
loge 7
ad

1.94591015
.p

5.By dividing the range into ten equal parts, evaluate sin x dx.Trapezoidal
0
w

and simpson's rule verify actualintegration:


w

solution:
w

Given: sin x dx
0

Range b a 0

Hence h
10

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x 0 2 3 4 5 6 7 8 9
0 10 10 10 10 10 10 10 10

y sin x
0 0.3090 0.5878 0.8090 0.9511 1.0 0.9511 0.8090 0.5878 0.3090 0
(i) By Trapezoidal rule
b
h
f ( x)dx A 2B
a
2
0.3090 0.5878 0.8090 0.9511 1.0
0 0 2
2 10 0.9511 0.8090 0.5878 0.3090

sin x dx 1.9843
0

(ii) Bysimpson's rule :

et
b
h
f ( x)dx A 4 B 2C

.n
a
3

0
sin x dx
1
3 10
0 0
2 0.5878 0.9511 0.5878 pz
4 0.3090 0.8090 1 0.8090 0.3090
ee
2.00091
2
ad

(iii)By Actualintegration :
.p

sin x dx cos x 0
cos cos
w

( 2)
w

sin x dx 2
w

0
5
dx
6.Evaluate by simpson's one-third rule and hence find the value of log e5 (n 10)
0
4 x 5
Solution :
5
dx
Given :
0
4x 5
1
Here, y ( x)
4x 5
5 0 1
h
10 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
y 0.2 0.1429 0.1111 0.0909 0.0769 0.0667 0.0588 0.0526 0.0476 0.0434 0.04

Bysimpson's one-third rule :

5
dx h
( y0 yn ) 2( y2 y4 y6 ....) 4( y1 y3 y5 ....)
0
4x 5 3

1 (0.2 0.04) 2(0.111 0.0769 0.0588 0.0476)


2 3 4(0.1429 0.0909 0.0667 0.0526 0.0434)

1
10.24 2(0.2944) 4(0.3964)
6

et
1
(2.4148)

.n
6
5

0
dx
4x 5
0.4025 1 pz
ee
by actualintegration:
ad

5 5
dx log(4 x 5) 1
log 25 log 25
0
4x 5 4 0 4
.p

1
log 5 2
w

4
w

From1&2
w

1
log 5 0.4025
4

log 5 1.61

Homework:
6
dx
1.Evaluate by (i)T .R (ii) S .R , also find the actualintegration
0
1 x2

T .R 1.41079950, S.R 1.36617433, S.R 1.35708188, A.I 1.40564765

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2
sin x
2.Evaluate dx taking 6intervals
1
x

2
3.Evaluate e x dx taking 6intervals
0

et
.n
pz
ee
ad
.p
w
w
w

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
UNIT-V

Numerical Solution of Ordinary DE

Taylor’s Series

Type :1

Solution of the first order ODE

Formula:

dy
y' f ( x, y ) with initial condition y x0 y0
dx

h h2 h3
yn yn yn ' yn '' yn ''' ..........

et
1
1! 2! 3!

.n
Problems:

1. Solve y' 1 by Taylor’s Series method . find the value of y at x 0.1; x 0.2

Solution:
x y, y 0
pz
ee
Given, y' x y
ad

y 0 1 x1 0.1& x2 0.2
.p

y x0 y0
w

x0 0; y0 1
w

By Taylor’s Series ,
w

h ' h2 h3
yn 1 yn yn yn '' yn ''' ........
1! 2! 3!

Put n=0,

h h2 h3
y1 y0 y0 ' y0 '' y0 '' ............
1! 2! 3!

y' x y y0 ' y' 1 x0 , y0 y(x 0 ) = y 0 , y(x1 ) = y1 , y(x 2 ) = y 2

y'' 1 y' y0 '' 2 x1 = x0 + h, x 2 = x1 + h

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y''' y'' y0 ''' 2

2 3
0.1 0.1 0.1
y1 1 1 2 2 ..............
1! 2! 3!

y1 1.1103

Now, x1 0.1, y1 1.1103, h 0.1

h h2 h3
y2 y1 y1 ' y1 '' y' ''' ..........
1! 2! 3!

y1 ' x y x1 , y1
1.2103

et
y1 '' 1 y' x1 , y1
2.2103

.n
y1 ''' y ' x1 , y1 2.2103

y2 1.1103
0.1
1.2103
0.1
pz
2

2.2103
0.1
3

2.2103
ee
1! 2! 3!

y2 1.243
ad

Hence the solution is ,


.p

y1 y 0.1 1.1103
w

y2 y 0.2 1.243
w
w

dy
2. Using Taylor’s series find y at x=0.1 given that x2 y, y 0 1, correct to 4 decimal
dx
points using Taylor’s series find y at x=0.1,y 0 1

Solution:

y' x2 y 1

y 0 1; x1 0.1

y x0 y0

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x0 0; y0 1

h2
yn 1 yn hyn ' yn '' ......... ------- (1)
2!

Here, h 0.1

and y' x2 y 1 y0 ' = y '( x0 , y0 ) = 1

y '' x2 y ' 2 xy y0 " = y"( x0 , y0 ) = 0

y ''' x 2 y '' 2 xy ' 2 y 2 xy ' y0 "' = y"'( x0 , y0 ) = 2

(1) becomes,

et
y1 y 0.1

.n
2 3

1 0.1 1
0.1
2!
0
3!pz
2 0.1
ee
y1 0.9003
ad

dy
x2 y
dx
.p

y' x2 y
w

y 0 1, x1 0.1
w

x0 0; y0 1
w

By Taylor’s series,

h 2 ''
y1 y0 hy0 ' y0 .....
2!

Here h = 0.1

y' x2 y y0 ' y ' x0 , y0 1

y'' 2x y' y'' 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y''' 2 y'' y''' 1

(1) becomes

y1 y 0.1

2 3
0.2 0.1
y1 1 0.1 1 1 1
2 3!

y1 1 0.1 0.005 0.00016

0.0948

dy
3. Find the Taylor’s series with three terms for the initial value problem x3

et
y; y 1 1
dx

.n
Solution:

Given y'=x3 y and x0 1, y0 1

The Taylor’s formula for y1 is


pz
ee
h h2 h3
ad

y1 y0 y0 ' y0 '' y0 ''' ......... 1


1! 2! 3!

y' x3
.p

y y0 ' 2
w

y'' 3x2 y' y0 '' 3 2 5


w

y''' 6 x y '' y0 ''' 6 5 11


w

2
x x0 x x0 x x0
y1 1 2 5 11 ....................
1! 2! 3!
2
x x0 x x0 x x0
1 2 5 11 ....................
1 2 3
5 2 11 3
y1 1 2 x x0 x x0 x x0 ................ is the required Taylor series.
2 6

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Type-II

Simultaneous first order ODE

The simultaneous first order differential equations of the type

dy dz
f x, y , z ; g x, y, z with initial conditions y x0 y0 and z x0 z0 and can be
dx dx
solved by using taylor’s series method.

dx dy
yt 1, xt ; x 0, y 1 at t 0
1. Solve dt dt
find x, y at t 0.2

Solution:

et
We use 2 Taylor’s series formula,

.n
h2
x1 x0 hx0 ' x0 '' ................ 1

h2
2!
pz
ee
y1 y0 hy0 ' y0 '' ................ 2
2!
ad

Given,

x' yt 1 y' xt
.p

x 0 0 y 0 1
w
w

t0 0; x0 0 t0 0; x0 1
w

x' yt 1 y' xt

x '' y 't y y '' x 't x

x ''' y '' t y' y' y ''' x '' t x ' x '

y '' t 2 y ' y ''' x '' t 2 x '

x0 ' x ' t0 , x0 , y0 1 y0 ' y ' t0 , x0 , y0 0

x0 '' x '' t0 , x0 , y0 1 y0 '' 0

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x0 ''' 0 y0 ''' 2

1 & 2 Becomes

2
0.2
x1 0.2 1 1 0.22
2!
3
0.2
y1 1 0.2 0 2 0.9973.
3!

2. Solve the following simultaneous differential equations using taylor’s series method of the fourth
order for x=0.1 and 0.2
dy dz
xz 1; xy , y (0) 0 and z (0) 1

et
dx dx

.n
Solution:

Given y' = xz+1 ; z' = -xy

y 0 0 z 0 1
pz
ee
x0 0; y0 0 y0 0; z0 1; h 0.1
ad

y ' xz 1 z' xy
.p

y'' xz' z z'' xy' y


w

y ''' xz '' z ' z ' z ''' xy '' y ' y '


w

y''' xz '' 2z ' z ''' xy'' 2 y'


w

y 'v xz ''' z '' 2 z '' z 'v xy ''' y '' 2 y ''

xz ''' 3z '' xy ''' 3 y ''

y0 ' 1 z0 ' 0

y0 '' 1 z0 '' 0

y0 ''' 0 z0 ''' 2

y0 'v 0 z0 'v 3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
To find y 0.1 and z 0.1

h2 h3 h4
y1 y0 hy0 ' y0 '' y0 ''' y0 'v ..............
2! 3! 4!

h2 h3 h4 v
z1 z0 hz0 ' z0 '' z0 ''' z0 ' ..................
2! 3! 4!
2
0.1
y1 0.1 1 0.105
2!
3 4
2 0.1 3 0.1
z1 1 z1 0.99966
6 24

et
2
0.2
y 0.2 0.2 1

.n
2

y 0.2 0.22
pz
ee
3 4
2 0.2 3 0.2
z 0.2 1
6 4!
ad

z 0.2 0.99714
.p

Type-III
d2y dy
w

p qy f x 1
dx 2 dx
w

Put y ' z 2
w

dy
z
dx

1 becomes

dz
pz qy f x
dx

z' f x pz qy

z' f x, y, z 3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Thus weget 2 first order equation given by 2 & 3

y x0 y0 ; y ' x0 y0 ' ; z x0 z0.

d2y dy
1.Find the value of y 1.1 and y 1.2 from y2 x3
dx 2 dx

y(1) 1 y' (1) 1 by usi g taylor’s series ethod

Solution:

d 2 y 2 dy 3
+y =x ----- (1) y(1) = 1; y '(1)=1
dx 2 dx

et
Put y ' z ------ (2)

.n
y '' z'

(1) becomes

z ' y2 z x3
pz
ee
z ' x3 y 2 z -------- (3)
ad

Given initial conditions are,


.p

y 1 1; y '(1) = 1 z(1) = 1
w

x0 = 1; y0 = 1; z0 = 1; h0 = 0.1
w

By Taylor’s series
w

h ' h 2 ''
y1 y0 y0 y0 ..........(4)
1! 2!

h ' h 2 ''
z1 z0 z0 z0 ..........(5)
1! 2!

Now , y ' z y0 ' z0 1

y '' z ' y0 '' 1 1 1 0

y'' x3 y2 z

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y ''' z '' 3x2 y 2 z ' 2zyy ' y0 ''' 3 2 1

y 'v z ''' 6x y2 z '' 2z ' yy ' 2zy '2 2z ' yy ' 2zy

z ''' y0 'v 6 1 2 3

Now, z0 ' 0

z0 '' 1

z0 ''' 3

4 and 5 becomes

et
3
0.1 0.1
y 1.1 y1 1 1 1 1.1002

.n
1! 3!

z (1.1) z1 1
0.1
1!
(0)
(0.1) 2
2!
(1)
(0.1)3
3!
(3)
pz
ee
1.005
ad

To find y 1.2

h ' h2 " h3 "'


.p

y2 y1 y1 y1 y1 .........(6)
1! 2! 3!
w

Here h 0.1; y1 1.002; z1 1.005


w

Here z1' ( z ' )1


w

( x3 y 2 z)1 x13 y12 z1

x1 1.1; y1 1.1002; z1 1.005

z1' (1.1)3 (1.1002)2 (1.005)

3x12 y12 z1' 2 z1 y1 y1'

3(1.1)2 (1.1002)2 (0.1145) 2(1.005)(1.1002)(1.005)

z1" 1.2676

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
0.1 (0.1) 2 (0.1)3
y (1.2) y2 1.1002 (1.005) (0.1145) (1.2676)
1! 2! 3!

y(1.2) 1.2015

Euler Method

yn 1 yn hf ( xn , yn ); n 0,1,..........

Where xi x0 ih; i 0,1,2..............

and h is a step size

Modified Euler Method

et
h h
yn 1 yn h f xn , yn ( f ( xn , yn )
2 2

.n
Where yn y( xn h) and h is a step size.

Problems on Euler Method


1

pz
ee
dy
1. Using Euler method compute ‘y’ in the range 0 x 0.5 if y satisfies 3x y 2 , y(0) 1
dx
ad

Solution:
dy
Given, 3x y 2
.p

dx
f ( x, y) 3x y2
w

x0 0; y0 1
w

By Euler's method
w

yn 1 yn h f ( xn , yn ), n 0,1, 2..........
Let h 0.1
y(0.1) y1 y0 (0.1) f ( x0 , y0 )
1 (0.1) f (0,1)
1 (0.1)(1)
y1 1.1
y(0.2) y2 y1 (0.1) f ( x1, y1 )
1.1 (0.1)(0.3 1.21)
y (0.2) 1.251
y(0.3) y3 y2 (0.1) f ( x2 , y2 )

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1.251 (0.5) f (0.2,1.251)
y3 1.4675
y(0.4) y4 y3 (0.1) f ( x3 , y3 )
1.4675 0.1 f (0.3,1.4675)
y4 1.7728
y(0.5) y5 y4 (0.1) f ( x4 , y4 )
1.7728 (0.1) f (0.4,1.7728)
y5 2.2071

2.Using Euler method solve y' x y xy, y(0) 1compute y(1.0) with h=0.2

Solution:

et
Given, y' x y xy

.n
f ( x, y) x y xy

h 0.2 pz
ee
y(0) 1 x0 0; y0 1

Let xi x0 ih
ad

i 1, 2,3, 4,5
.p

x1 0 0.2(1)
w

0.2
w

x2 0.4; x3 0.6; x4 0.8; x5 1


w

yn 1 yn hf ( xn , yn )

y(0.2) y1 y0 hf ( x0 , y0 )

y1 1.2

y(0.4) y2 y1 h f ( x1, y1 )

1.2 (0.2) f (0.2,1.2)

y2 1.528

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y(0.6) y3 y2 h f ( x2 , y2 )

1.528 (0.2) f (0.4,1.528)

y3 2.0358

y(0.8) y3 h f ( x3 , y3 )

2.0358 (0.2) f (0.6, 2.0358)

y4 2.8072

y(1.0) y5 y4 h f ( x4 , y4 )

et
y5 3.9778

.n
Home work:

dy
1. Using Euler's method find y(0.2)&y(0.4) from
pz
dx
x y, y(0) 1 with h=0.2
ee
2x
2. Solve y ' y , y (0) 1, find y(0.1)&y(0.2) by Euler's method
y
ad

3. Solve y' 1 xy, y(2) 0,find y(2.2) with stepwise 0.1


.p

4. Solve y' y sin x cos x, y(0) 0find y(0.2)


w

'
1. Compute y at x = 0.25 by modified Euler method y 2 xy y (0) 1
w

Solution:
w

Given, y ' 2 xy
y (0) 1; h 0.25
x0 0; y0 1
h h '
yn 1 yn h f xn , yn yn
2 2
Put n = 0
0.25 0.25
y1 y0 h f 0 ,1 2 x0 y0
2 2
1 0.25 f (0.125,1)
1 0.25(2(0.125)(1))

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y(0.25) 1.0625

dy
2. Solve the equation 1 y given y(0)=0 using modified Euler method find the values
dx

x=0.1,0.2,0.3

Solution:

y' 1 y

x0 0; y0 0; h 0.1

Modified Euler method

et
h h '
yn 1 yn h f xn , yn yn
2 2

.n
h h '
y1 y0 h f x0
2
, y0
2
y0
pz
ee
0.1 0.1
0 0.1f 0 ,0 (1 y0 )
2 2
ad

0.1 f (0.05, 0.05(1))


.p

0.1 f (0.05, 0.05)


w

0.1(1 0.05)
w

y(0.1) 0.095
w

Put n= 1,

h h '
y2 y1 hf x1 , y1 y1
2 2

0.1 0.1
0.095 0.1 f 0.1 ,0.095 (1 0.095)
2 2

0.095 0.1 f (0.150, 0.140)

0.095 0.1(1 0.1403)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y2 y(0.2) 0.1810

Put n=2

h h '
y3 y2 hf x2 , y2 y3
2 2

0.1 0.1
0.1810 (0.1) f 0.2 ,0.1810 (1 0.1810)
2 2

0.1810 (0.1) f (0.250,0.222)

0.1810 (0.1)(1 0.222)

y3 0.259

et
.n
dy
1.Using MEM find y 0.2 , y 0.1 given x2 y 2 , y(0) 1
dx

2.Given
dy
dx
pz
x y 2 , y(0) 1 find an approximate value of y at x=0.5 by EME, h=0.1
ee
Am y(0.5)=2.2070
ad

dy
1.Given that log( x y) with y = 1 when x = 1 using MEM, find y for x = 0.2 and x = 0.5
dx
.p

correct to four decimal places.


w

Solution:
w

Given f(x,y) = log(x+y), x0 0, y0 1 to find y(0.2)


w

Take h = 0.2 x 1 x0 h 0 0.2 0.2

By modified Euler method

h h '
yn 1 yn hf xn , yn yn
2 2

h h '
y1 y0 hf x0 , y0 y0
2 2

0.2 0.1
1 (0.2) f 0 ,1 log( x0 y0 )
2 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1 (0.2) f (0.1, 0)

1 (0.2)( 1.000)

y1 0.8000

To find y 0.5

x2 x1 h 0.2 h 0.5 0.2 0.3

x2 0.5

h h '
y2 y1 hf x1 , y1 y1
2 2

et
0.3 0.3

.n
0.800 (0.3) f 0.2 ,0.8 log( x1 y1 )
2 2

0.8 0.3 f (0.35, 0.8) pz


ee
0.8 0.3(0.0607)

0.8 0.01821
ad

y2 0.81821
.p

dy
2.Given xy 2 , y(0) 2. using Euler's modified method, find y(0.2) in two steps of 0.1 each
w

dx
w

Solution:
w

Let x1 x0 h Here x0 0; y0 1

h 0.1

dy
y' xy 2
dx

By modified Euler method

h h '
yn 1 yn hf xn , yn yn
2 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
h h '
y1 y0 hf x0 , y0 y0
2 2

0.1 0.1
2 (0.1) f 0 ,2 (0)
2 2

2 (0.1) f (0.05, 2)

2 0.02

y1 1.98

To find y(0.2)

et
h h '
y2 y1 hf x1 , y1 y1
2 2

.n
1.98 (0.1) f (0.1 0.05,1.98 0.05( 0.392))

1.98 (0.1) f (0.15,1.9604) pz


ee
1.98
ad

y2 1.9224

Fourth-order Runge - kutta method (RK method)


.p
w

k1 hf ( xo , y0 )
w

h k1
k2 hf x0 , y0
2 2
w

h k2
k3 hf x0 , y0
2 2
k4 hf ( x0 h, y0 k3 )
1
y k1 2k2 2k3 k 4
6
y1 y0 y
The second iteration we replace (x0 , y0 ) to ( x1, y1 ) and we proceed the second iteration.

Problems:

1.Apply the 4th order RKmethod find y(0.2) given that y' x y, y(0) 1.

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Solution:

Given y' x y

y(0) 1, x0 0, y0 1

h 0.2

k1 hf ( x0 , y0 )

0.2 f (0.1)

0.2(1 0) 0.2

h k1

et
k2 hf x0 , y0
2 2

.n
0.2 0.24
0.2 f 0 ,1

0.2(0.1,1.1)
2 2
pz
ee
k2 0.24
ad

h k2
k3 hf x0 , y0
2 2
.p

0.2 0.24
w

(0.2) 0 ,1
2 2
w

0.2 f (0.1,1.12)
w

k3 0.244

k4 hf ( x0 h, y0 k3 )

0.2(0 0.2,1 0.244)

k4 0.2888

1
y (0.2 2(0.24) 2(0.244) 0.2888)
6

y 0.2428

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y1 y0 y 1 0.2428

y1 1.2428

dy
2. Compute y(0.2) Given that y xy 2 0, y(0) 1 by taking h=0.1 using RK method of
dx
th
4 order.

Solution:

dy
y xy 2 ( y xy 2 )
dx

et
y(0) 1 x0 0 y0 1

.n
h 0.1

k1 hf ( x0 , y0 )

0.1 f (0,1)
pz
ee
0.1( 1(1 0))
ad

0.1( 1) 0.1
.p

h k1
k2 hf x0 , y0
2 2
w

0.1 ( 0.1)
w

0.1 f 0 ,1
2 2
w

0.1 f (0.05, 0.95)

0.1( (0.95 (0.5)(0.95)2 )

0.1( 0.9951)

h k2
k3 hf x0 , y0
2 2

0.1 ( 0.0995)
0.1 f 0 ,1
2 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
0.0995

k4 hf ( x0 h, y0 k3 )

0.1 f (0 0.1,1 0.0995)

0.1 f (0.1, 0.9005)

k4 0.0982

1
y ( 0.1 2(0.0995) 2(0.0995) 0.0982
6

0.5962
6

et
y 0.0994

.n
y1 yn 1 0.0994 0.9006

Second iteration
y

pz
ee
k1 hf ( x1, y1 )
ad

dy
y yx 2 , = 0.1f(0.1, 0.9006)
dx
.p

0.1( 0.9006 (0.9006)2 (0.1))


w

k1 0.0982
w

h k1
w

k2 hf x1 , y1
2 2

0.1 ( 0.0982)
0.1 f 0.1 ,0.9006
2 2

0.1 f (0.15,0.8515)

0.1( 0.8515 (0.8515)2 (0.15))

0.1( 0.9603)

0.0960

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
h k2
k3 hf x1 , y1
2 2

0.1 0.0960
0.1 f 0.1 ,0.9006
2 2

0.1 f (0.15, 0.8526)

0.1( 0.8526 (0.8526)2 (0.15))

0.1( 0.9616)

0.0962

et
k4 hf ( x1 h, y1 k3 )

.n
0.1 f (0.1 0.1,0.9006 0.0962)

0.1 f (0.2, 0.8044)

0.1( 0.8044 (0.2)(0.8044)2 )


pz
ee
k4 0.0934
ad

1
y (k1 2k2 2k3 k4 )
6
.p

1
w

( 0.0982 2( 0.0960) 2( 0.0962) 0.0934)


6
w

y 0.0960
w

y2 y1 y

0.9006 0.0960

y2 0.8046

Home work:

dy y2 x2
1.Using RK method of 4th order Given y(0) = 1,x = 0.2 & x = 0.4
dx y2 x2

Ans:y1 1.1960;

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y2 1.3753

2.Using RKmethod of 4th order determine correct to 3 decimal place the value

dy
of y at x=0.1,0.2 of y satisfies the equation x 2 y x, y (0) 1
dx

Ans:y(0.1)=1.003

y(0.2)=1.02

RK method for simultaneous first order differential equation

dy dz
To solve the simultaneous equations f1 ( x, y, z ) and f 2 ( x, y, z ) with the intial conditions
dx dx

et
y(x0 ) y0 , z( x0 ) z0

.n
Then the first order RK method is

k1 hf1 ( x0 , y0 , z0 ) pz
ee
h k1 l1
k2 hf1 x0 , y0 , z0
2 2 2
ad

h k2 l2
k3 hf1 x0 , y0 , z0
2 2 2
.p

k4 hf1 ( x0 h, y0 k3 , z0 l3 )
w

1
w

and y= (k1 2k2 2k3 k4 )


6
w

l1 hf2 ( x0 , y0 , z0 )

h k1 l1
l2 hf 2 x0 , y0 , z0
2 2 2

h k2 l2
l3 hf 2 x0 , y0 , z0
2 2 2

l4 hf 2 x0 h, y0 k3 , z0 l3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1
and z= (l1 2l2 2l3 l4 )
6

Hence y1 y0 y and z1 z0 z

Where h=x1 x0 x1 x0 h

Problems based on R-K method for simultaneous first ODE.

dy dz
1.Find y(0.1),z(0.1) from the system of equation x z, x y 2 given y(0) = 2, z(0) = 1
dx dx

using R-K Method of fourth order

Solution:

et
dy dz
Given x z x y2
dx dx

.n
y' x z z' x y2

f1 ( x, y, z) x z f 2 ( x, y, z)
pz
x y2
ee
and y(0)=2 z(0)=1
ad

Here, x0 0; y0 2 Here, x0 0, z0 1
.p

where h = 0.1
w

First iteration:
w

Let x0 0, y0 2, z0 1 and h=0.1


w

By R-K Method.

k1 hf1 ( x0 , y0 , z0 ) l1 hf2 ( x0 , y0 , z0 )

hf1 (0, 2,1) h( x0 y02 )

(0.1)( x0 z0 ) (0.1)(0 4)

(0.1)(0 1) (0.1)( 4)

k1 0.1 l2 0.4

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
h k1 l1 h k1 l1
k2 hf1 x0 , y0 , z0 l2 hf 2 x0 , y0 , z0
2 2 2 2 2 2

0.1 0.1 0.4 0.1 0.1 0.8


hf1 0 ,2 ,1 hf 2 0 ,2 ,1
2 2 2 2 2 2

hf1 (0.05,2.05,0.8) hf2 (0.05,2.05,0.8)

(0.1)(0.05 0.8) (0.1)(0.05 (2.05)2 )

k2 0.085 l2 0.4153

et
h k2 l2 h k2 l2
k3 hf1 x0 , y0 , z0 l3 hf 2 x0 , y0 , z0
2 2 2 2 2 2

.n
0.1 0.085 0.4153
(0.1) f1 0 ,2 ,1 (0.1) f 2 (0.05, 2.0425,0.7924)
2 2 2
pz
ee
(0.1) f1 (0.05, 2.0425,0.7924)

k3 (0.1)(0.05 0.7924) l3 (0.1)(0.05 (2.0425)2 )


ad

(0.1)(0.05 0.7924)
.p

k3 0.0842 l3 0.14122
w
w

k4 hf1 ( x0 h, y0 k3 , z0 l3 ) l4 hf 2 ( x0 h, y0 k3 , z0 l3 )
w

(0.1) f1 (0 0.1, 2 0.0842,1 0.4122) (0.1) f (0.1, 2.0842,0.5878)

(0.1) f (0.1,2.0842,0.5878) (0.1)(0.1 (0.5878)2 )

k4 0.0688 l4 0.4244

1 1
y k1 2k2 2k3 k4 z l1 2l2 2l3 l4
6 6

1 1
(0.1 2(0.085) 2(0.0842) 0.0688) ( 0.4 2(0.4153) 2(0.4125) 0.4244)
6 6

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y 0.0845 z 0.4132

Hence, y1 y0 y z1 z0 z

y( x1 ) 2 0.0845 z( x1 ) 1 0.4132

y(0.1) 2.0845 z (0.1) 0.5868

Home work:

dy dz
1.Using RK method tabulate the solution of the system x z, x y, y 0, z 1 when x=0
dx dx
at internal of h=0.1 from x=0.0 to x=0.2

Runge-Kutta method for second order differential equations

et
To solve the second order differential equation y'' = f x, y, y ' with the initial condition

.n
y x0 y0 , y ' x0 y0 '

Let y' z and y '' z' pz


ee
Hence the differential equation reduces to

dy
ad

y' z f1 x, y, z
dx
dz
z' y '' f 2 x, y , z
.p

dx
w

With the initial condition y x0 y0 , z x0 z0


w

Problems
w

i. Given y '' xy ' y 0, y 0 1, y ' 0 0 find the value of y 0.1 and y ' 0.1 by using
th
R-K method of 4 order.

Solution:

Given,

y'' + xy' + y = 0

let y' = z and y'' = z'

The given equation can be written as,

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
z' + xz + y = 0

y' = z and z'= xz y

f1 x, y, z z f 2 x, y, z xz y

The initial condition,

y 0 1, y' 0 0 z 0 0

x0 0, y0 1 x0 0, z0 0

By Runge – Kutta method.

et
k1 hf1 x0 , y0 , z0 l1 hf 2 x0 , y0 , z0

.n
hf1 0,1, 0 hf 2 0,1, 0

0.1 0 pz 0.1 0 1
ee
k1 0 l1 0.1
ad

h k1 l1 h k1 l1
k2 hf1 x0 , y0 , z0 l2 hf1 x0 , y0 , z0
2 2 2 2 2 2
.p

0.1 0 0.1
hf1 0 ,1 ,0 0.1 f 2 0.05,1, 0.05
w

2 2 2
w

0.1 f1 0.05,1, 0.05 0.1 0.05 0.05 1


w

k2 0.0050 ; l2 0.0998

h k2 l1 h k2 l2
k3 hf1 x0 , y0 , z0 l3 hf 2 x0 , y0 , z0
2 2 2 2 2 2

0.1 0.0050 0.0998


hf1 0 ,1 ,0 hf 2 0.05,0.9975, 0.499
2 2 2

0.1 f 2 0.05, 0.9975, 0.0499 0.1 0.05 0.0499 0.9975

k3 0.0050 l3 0.0995

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
k 4 =hf1 x 0 +h,y0 +k 3 ,z 0 +l3 l 4 =hf 2 x 0 +h,y 0 +k 3 ,z0 +l3

=hf1 0.051,1-0.0050,0-0.0995 =hf 2 0.05,0.9950,0.0995

=hf1 0.05,0.9950,-0.0995 = 0.1 - 0.05 -0.0995 -0.9950

=k 4 =-0.01 l4 =-0.099

1 1
Δy= k1 +2k 2 +2k 3 +k 4 Δz= l1 +2l2 +2l3 +l4
6 6

1
= 0- 2×0.0050 -2 0.0050 -0.01 = -0.1-2 0.0998 -2 0.099 -0.09920
6

et
Δy=-0.005 Δz=-0.099

.n
Hence y1 =y0 +Δy z1 =z0 +Δz

y x1 =1-0.005
pz
z x1 =0-0.099
ee
y 0.1 =0.995 z 0.1 =-0.099
ad

y' 0.1 =-0.099


.p

y 0.1 =0.995,y' 0.1 =-0.099


w
w
w

2.Find y 0.1 , y(0.2) given y '' x 2 y ' 2 xy 1 with ic y 0 1, y ' 0 0.

Solution:

y'' x 2 y ' 2 xy 1 1

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Let y ' z f1 x, y, z

1 z ' x 2 z 2 xy 1

z ' 1 x2 z 2xy

z' f 2 x, y, z 1 x 2 z 2 xy

y 0 1, y ' 0 0; z 0 0

y0 1; x0 0; z0 0

k1 hf1 x0 , y0 , z0 l1 hf 2 x0 , y0 , z0

et
0.1 f1 0,1, 0 0.1 f 2 0,1, 0

.n
k1 0 l1 0

h k1 l1
pz h k1 l1
ee
k2 hf1 x0 , y0 , z0 l2 hf 2 x0 , y0 , z0
2 2 2 2 2 2
ad

0.1 0 0.1 0.1 0 0.1


0.1 f1 0 ,1 ,0 0.1 f 2 0 ,1 ,0
2 2 2 2 2 2
.p

0.1 f1 0.05,1, 0.05 0.1 f 2 0.05,1, 0.05


w

k2 0.05 l2 0.1100
w
w

h k2 l2 h k2 l2
k3 hf1 x0 , y0 , z0 l3 hf 2 x0 , y0 , z0
2 2 2 2 2 2

0.005 0.1100
0.1 f1 0.05,1 , 0.1 f 2 0.05,1.0025,0.0550
2 2

0.1 f1 0.05,1.0025,0.0550 (0.1)(1 0.0001 0.1003)

k3 0.0055 l3 0.1100

k4 hf1 x0 h, y0 k3 , z0 l3 l4 hf 2 x0 h, y0 k3 , z0 l3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
0.1 f1 0.1, 0.0055, 0.1100 0.1 1 0.0011 0.2011

0.0110 0.1202

1 1
y k1 2k2 2k3 k4 z k1 2k2 2k3 k4
6 6

1 1
0 2 0.0050 2 0.0055 0.0110 0.6602
6 6

1
0.0320 0.0053 z 0.1100
6

y = 0.0053 z1 z0 z

et
y1 y0 y 0 0.1100

.n
1 0.0053

Second Iteration
z1 0.1100
pz
ee
k1 hf1 x1 , y1, z1 l1 hf 2 x1, y1, z1
ad

0.1 f1 0.1,1.0053, 0.1100 0.1 f 2 0.1,1.0053, 0.110


.p

0.1(0.1100) (0.1))(1.202)
w

k1 0.01100 l1 0.1202
w
w

h k1 l1 h k1 l1
k2 hf1 x1 , y1 , z1 l2 hf 2 x1 , y1 , z1
2 2 2 2 2 2
0.1 0.01100 0.1202
(0.1) f1 0.1 ,1.0053 ,0.1100 0.1 f 2 0.15,1.0107,0.1701
2 2 2

=(0.1)f1 0.15,1.0107, 0.1701 0.1 1.3070

k2 0.0170 l2 0.13070

h k2 l2 h k2 l2
k3 hf1 x1 , y1 , z1 l3 hf 2 x1 , y1 , z1
2 2 2 2 2 2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
0.1 f1 0.15,1.0138, 0.1754 0.1 f 2 0.15,1.0138, 0.1754

k3 0.1 0.1754 0.01751 l3 0.1308

k4 hf1 x1 h, y1 k3 , z1 l3 l4 hf 2 x1 h, y1 k3 , z1 l3

0.1 f1 0.2,1.0228, 0.2408 0.1 f 2 0.2,1.0228, 0.2408

k4 0.0241 l4 0.1419

1 1
y= k1 2k2 2k3 k4 z = l1 2l2 2l3 l4
6 6

et
1
0.0174 0.1309
6

.n
y(0.2) y2 y1 y z2 z1 z 0.1100 0.1309

y 0.2 1.0227
pz z2 0.2409
ee
Hence the solution is
ad

y1 y 0.1 1.0053
.p

y2 y 0.2 1.0227
w

z1 z(0.1) 0.1100
w

z2 z(0.2) 0.2409
w

Homework:

1. Solve y" x( y ')2 y2 0 using RK method for x = 0.2 given y(0) = 1, y'(0)= 0 taking h = 0.2
Ans: 0.9801

Predictor Corrector Method

 Milne’s predictor- Corrector Method


 Adam’s Bash forth predictor – corrector method
These two methods are called multistep-method

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
i. Milne’s predictor- Corrector Method:

Predictor:

4h
yn 1, p yn 3 2 yn' 2 yn' 1 2 yn'
3

Corrector Method:

h '
yn 1,C yn 1 yn 1 4 yn ' yn 1
'

dy 1
1.Find y(2) if y(x) is the solution of (x y) given y(0) = 2, y(0.5) = 2.636,y(1) = 3.595,
dx 2

& y(1.5) = 4.968

et
Solution:

.n
dy 1
dx
y'
2
(x y)
pz
ee
Given, y(0)=2, y(0.5)=2.636,y(1)=3.595, &y(1.5)=4.968

x0 0; x1 0.5; x2 1; x3 1.5
ad

y0 2; y1 2.636 y2 3.595 y3 4.968


.p

1
y' (x y)
w

2
w

1 1
y0' ( x0 y0 ) (0 2) 1
2 2
w

1 1
y1' ( x1 y1 ) (0.5 2.636)
2 2

1.5680

1
y2' (1.0 3.595) 2.298
2

1
y3' (1.5 4.968) 3.234
2

By Corrector formula,

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
h '
yn 1,C yn 1 yn 1 4 yn ' yn 1
'

put n=3

0.5 '
y4,C y2 ( y2 4 y3' y4' )
3

y4,C 6.873

By Predictor formula,

4h
yn 1, p yn 3 2 yn' 2 yn' 1 2 yn'
3

et
Put n=3

.n
4(0.5)
yn 1, P =y0 (2 y1' y2' 2 y3' )
3

2
4(0.5)
(2(1.5680) (2.298) 2(3.234))
pz
ee
3

y4, P 6.871
ad

2. y (4.4) given 5xy' y2 2 0 ,given y(4) 1, y(4.1) 1.0049, y(4.2) 1.0097, y(4.3) 1.0143
.p

Solution:
w

5xy' y2 2 0
w

5xy' y2 2 2 y2
w

2 y2
y'
5x

x0 4; x1 4.1; x2 4.2 ; x3 4.3

y0 1; y1 1.0049 ; y2 1.0097 ; y3 1.0413

2 y12 2 (1.0049) 2
y '1
5 x1 5(4.1)

y1' 0.0483

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
' 2 y2 2 2 (1.0097) 2
y2
5 x2 5(4.2)

y2' 0.0467

2 y32 2 (1.043)2
y3'
5 x3 5(4.3)

y3' 0.0452

By Predictor formula,

4h
yn 1, p yn 3 2 yn' 2 yn' 1 2 yn'
3

et
when n 3, h 0.1

.n
4(0.1)
y4, P y0
3
(2 y1' y2' 2 y3' )
pz
ee
4(0.1)
1 (2(0.0483) (0.0467) 2(0.0452))
3
ad

y4, P 1.0817
.p

' 2 y4 2 2 (1.0187)2
y4 0.0437
5 x4 5(4.4)
w

By corrector formula,
w

h
w

'
yn 1,C yn 1 yn 1 4 yn ' yn 1
'

when n 3

(0.1) '
y4,c y2 y2 4 y3' y4'
3

0.1
(1.0049) (0.0467 4(0.0452) 0.0437)
3

y4,c 1.0187

Homework:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2x
1.Find y(0.4) given y ' y ; y (0) 1, y (0.1) 1.095 ; y (0.2) 1.1841 , y (0.3) 1.2662
y

Using Milne’s M ethod

Ans: 1.3428

Adam’s Bash forth Method

Adam’s predictor formula,

h
yn 1, p yn 55 yn ' 59 yn ' 1 37 yn ' 2 9 yn ' 3
24

Adam’s corrector formula,

et
h
yn 1,c yn (9 yn ' 1 19 yn ' 5 yn ' 1 yn ' 2 )
24

.n
Problems:

1. Using Adam’s method find y(0.4) given


dy 1
pz
ee
; y (0) 1, y (0.1) 1.01, y(0.2) 1.022, y(0.3) 1.023
dx 2 xy
ad

Solution:

dy 1
.p

Given
dx 2 xy
w

x0 0; x1 0.1; x2 0.2; x3 0.3; x4 0.4


w

y0 1; y1 1.01; y2 1.022; y3 1.023; y4 ?


w

1
y01 0
2 x0 y0

1
y11 0.0505
2 x1 y1

1
y21 0.1022
2 x2 y2

1
y31 0.1535
2 x3 y3

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
Predictor formula,

h
yn 1, p yn 55 yn ' 59 yn ' 1 37 yn ' 2 9 yn ' 3
24

When n=3

0.1
y4, p y3 55 y3' 59 y2' 1 37 y1' 9 y0 '
24

0.1
1.023 55(0.1535) 59(0.1022) 37(0.0505) 9(0)
24

y4 1.0408

et
1 1
y '4
2 x4 y4 2(0.4)(1.0408)

.n
y'4 0.2082

Corrector formula,
pz
ee
h
yn 1,c yn (9 yn ' 1 19 yn ' 5 yn ' 1 yn ' 2 )
24
ad

When n=3
.p

0.1
y 4,c y3 (9 y4 ' 19 y3' 5 y2 ' y1' )
24
w

0.1
w

1.023 9(0.2082) 19(0.1535) 5(0.1022) 0.050


24
w

y4,c 1.0410

dy
2.Determine the value of y 0.4 using adam’s find y 0.1 , y 0.2 , y 0.3 from =xy+y 2
dx

using RK method y 0 1

Solution:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
dy
xy y2
dx

y (0) 1

x0 0; y0 1

f ( x, y) y' xy y 2

k1 hf x0 , y0 (0.1) f (0,1) 0.1 f ( x0 y0 y0 2 )

k1 0.1

h k1
k2 hf x1 , y1 (0.1) f (0.05,1.05)

et
2 2

.n
k2 0.1155

k3 hf x0
h
2
, y0
k2
2
pz
ee
(0.1) f (0.05,1.0578)
ad

k3 0.1172
.p

k4 hf ( x0 h, y0 k3 )
w

k4 0.1360
w

1 1
y (k1 2k2 2k3 k4 ) (0.1014)
6 6
w

0.1169

y1 y(0.1) y0 y 1 0.1169 1.1169

Second iteration:

k1 hf ( x1, y1 )

(0.1) f (0.1,1.1169)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
k1 0.1359

h k1
k2 hf x1 , y1 (0.1) f (0.15,1.1849)
2 2

k2 0.1582

h k2
k3 hf x1 , y1
2 2

0.1 0.1582
(0.1) f 0.1 ,1.1169
2 2

k3 (0.1) f (0.15,1.196) 0.1610

et
k4 hf ( x0 h, y0 k3 )

.n
0.1 f (0.2,1.2779)

k4 0.1889
pz
ee
1
y (k1 2k2 2k3 k4 )
6
ad

1
(0.9630)
.p

6
w

y 0.1605
w

y2 y(0.2) y1 y
w

1.1169 0.1605

y2 1.2779

Third iteration:

k1 hf ( x2 , y2 )

(0.1) f (0.2,1.2774)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
k1 0.1887

h k1
k2 hf x1 , y1 (0.1) f (0.25,1.3718)
2 2

k2 0.2225

h k2
k3 hf x1 , y1
2 2

(0.1) f (0.25,1.3887)

k3 0.2276

et
k4 hf ( x1 h, y1 k3 )

.n
0.1 f (0.3,1.505)

k4 0.2717
pz
ee
1
y (k1 2k2 2k3 k4 )
6
ad

1
(1.3606)
6
.p

y 0.2268
w

y3 y(0.3) y2 y
w

y3 1.5042
w

x0 0; x1 0.1; x2 0.2; x3 0.3; x4 0.4

y0 1; y1 1.1169; y2 1.2774; y3 1.5042; y4 ?

y0' x0 y0 y02 y1' x1 y1 y12 y2' x2 y2 y22

(0)(1) (1)2 (0.1)(1.1169) (1.1169)2 (0.2)(1.2774) (1.2774)2

y0' 1 y1' 1.3592 y2' 1.8872

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
y3' x3 y3 y32

(0.3)(1.5042) (1.5042)2

y3' 2.7139

Adam’s predictor formula,

h
yn 1, p yn 55 yn ' 59 yn ' 1 37 yn ' 2 9 yn ' 3
24

When n=3

0.1
y4, p y3 55 y3' 59 y2' 37 y1' 9 y0 '
24

et
y4, p 1.8342

.n
y4' x4 y4 y42 (0.4)(1.8342) (1.8342)

y4' 4.0980
pz
ee
Corrector formula,
ad

h
yn 1, c yn (9 yn ' 1 19 yn ' 5 yn' 1 yn' 2 )
24
.p

When n=3
w

0.1
y4,c y3 (9 y4 ' 19 y3' 5 y2 ' y1' )
w

24
w

y4,c 1.8391

Homework:

dy
1.Given x 2 (1 y); y(1) 1; y(1.1) 1.233; y(1.2) 1.548; y(1.3) 1.979
dx

Evaluate by adam’s bash forth mtd.Ans : pre 2.5871, corr 2.5773

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
2x
2.Find y (0.4) given y ' y , y (0) 1, y (0.1) 1.0959, y (0.2) 1.1841, y (0.3) 1.2662
y

using adam's method

Finite difference methods for solving second order equation:

The solution of a differential equation of second order of the form F ( x, y, y' , y'' ) 0 contains
two arbitrary constants.

These constants are determined by means of two conditions. The conditions on y or y' or their
combination are prescribed at two different values of x are called boundary conditions.

The differential equation together with the boundary conditions is called a boundary value
problem

et
Finite difference approximations to derivatives

.n
First derivative approximations:

y ' ( x)
y ( x h) y ( x )
h
0(h) pz
ee
y ( x ) y ( x h)
y ' ( x) 0(h)
ad

y ( x h) y ( x h)
y ' ( x) 0(h) 2 (central diff )
.p

2h
w

Second Derivative Approximation:


w

y ( x h ) 2 y ( x ) y ( x h)
y '' ( x) 0(h 2 )
h2
w

Third Approximation:

1
y ''' ( x) yi 2 2 yi 1 2 yi 1 yi 2
2h 3

Fourth Derivative Approximation:

yi 4 yi 6 yi 4 yi yi
yiv ( x) 2 1 1 2

h4

Solution of ODE of second order:

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
The second order ODE is given by

F(x,y,y' ,y'' )=0

with b.c, x=a and x=b

Divide the interval into 'n' equal parts

b a
h=
n

xi x0 ih ; i 0,1,2,......, n where x0 a & xn b

yi y( xi ) ; y ' ( xi ) yi ' ; y '' ( xi ) yi ''

et
The finite difference approximations to the detrivatives are given by,

.n
yi yi
yi ' 1 1
and

yi ''
yi 1
2h

2 yi yi 1
i 1, 2,....n 1
pz
ee
h2

y0 y(a) and yn y(b)


ad

1. Solve xy'' y 0, y(1); y(2) 2 with h 0.5 and h 0.25 by using finite difference method:
.p

Solution:
w

Given
w

xy'' y 0 ; y(1) 1; y(2) 2 ------ (1)


w

y0 1 and y2 2

(i) h 0.5

y0 y1 y2

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x0 1 x1 1.5 x2 2

Here , x0 1; x1 1.5 ; x2 2

By boundary conditions ; y0 1; y2 2

To find y1 for x1 1.5

By finite difference approximation

yi 2 yi yi
yi '' 1 1
; i 1, 2,......., n 1
h2

(1) xi yi '' yi 0

et
yi 1 2 yi yi 1
xi yi 0

.n
h2

xi
h2
( yi 1 2 yi yi 1 ) yi 0 pz 2
ee
put i 1; h 0.5
ad

x1
y0 2 y1 y2 y1 0
0.25
.p

4 x1 y0 2 y1 y2 y1 0
w

4(1.5) 1 2 y1 2 y1 0
w

6 12 y1 12 y1 0
w

18 11y1 0

18 11y1

y1 1.6364

y (1.5) 1.6364

(ii) h 0.25

y0 y1 y2 y3 y4

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
x0 1
x1 1.25 x2 1.5 x3 1.75 x4 2

y0 1; y4 2

x0 1; x1 1.25 ; x2 1.5 ; x3 1.75 ; x4 2

xi
(2) yi 1 2 yi yi 1 yi 0; i 1, 2,3,....n 1
h2

i 1, 2,3

put h 0.25 & i 1, 2,3

16 xi yi 1 2 yi yi 1 yi 0

et
put i 1,

.n
16 x1 y0 2 y1 y1 y1 0

16(1.25)(1 2 y1 y2 ) y1 0
pz
ee
20 40 y1 20 y2 y1 0
ad

39 y1 20 y2 20
.p

39 y1 20 y2 20 (3)
w

put i 2,
w

16 x2 y1 2 y2 y3 y2 0
w

16(1.5)( y1 2 y2 y3 ) y2 0

24 y1 48 y2 24 y3 y2 0

24 y1 47 y2 24 y3 0 4

put i 3,

16 x3 y2 2 y3 y4 y3 0

16(1.75)( y2 2 y3 y4 ) y3 0

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
28 y2 56 y3 56 y3 0

28 y2 55 y3 56 5

Solve equation (3),(4)&(5) by gauss elimination method

39 20 0 20
A,B 24 47 24 0
0 28 55 56

1 0.513 0 0.513
R1 ' R2 ' R3
~ 1 1.958 1 0 R1' , R2 , R3
39 24 28
0 1 1.964 2

et
1 0.513 0 0.513

.n
~ 0 1.445 1 0.513 R '2 R2 R1 , R 3' R3
0

1
1

0.513
1.964

0 0.513
2
pz
ee
~ 0 1.445 1 0.513 R 3' 1.445 R3 R2
0 0 1.838 3.403
ad

By back substitution method:


.p

1.838y3 3.403
w

y3 1.851
w
w

1.445 y2 y3 0.513

y2 1.636

y1 0.513 y2 0.513

y1 1.352

y(1.25) 1.352 ; y(1.5) 1.636 ; y(1.75) 1.851

2. Determine the value of ‘y’at the pivotal points of the interval (0,1) if ‘y’ satisfies the boundary value
problem

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
yiv 81y 81x2 , y(0) y(1) y' (0) y'' (1) 0 (take n 3)

Solution:

Given, yiv 81y 81x2 ,

(a, b) (0,1)

y(0) y(1) y' (0) y'' (1) 0

b a 1 0 1
h
n 3 3

y0 y1 y2 y3

et
1 2
x0 0 x1 x2 x3 1

.n
3 3

1 2
x0 0; x1
pz 3
; x2
3
; x3 1
ee
y0 0 ; y3 0 ; y0'' 0 ; y3'' 0
ad

To find y1 and y2

By using central difference approximation, the differential equation becomes,


.p

1
yi 4 yi 6 yi 4 yi yi 81yi 81xi 2
w

2 1 1 2
h4
w

1
put h
3
w

1
yi 2 4 yi 1 6 yi 4 yi 1 yi 2 81yi 81xi 2
(1/ 3) 4

81 yi 2 4 yi 1 6 yi 4 yi 1 yi 2 81yi 81xi 2

81 and put i 1 and i 2

1
y3 4 y2 6 y1 4 y0 y 1 y1 x12
9

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
4
y4 4 y3 6 y2 4 y1 y0 y2
9

1
y3 4 y2 7 y1 4 y0 y 1
9

1
4 y2 7 y1 y 1 1
9

4
y4 7 y2 4 y1 2
9

1
yi '' ( yi 1 2 yi yi 1 )
h2

et
i 0,

.n
y0'' 9( y1 2 y0 yi 1 ) 3

y0 0, y0'' 0, y 1 y1 pz
ee
i 3, y3'' 9( y4 2 y3 y2 ) 4
ad

y3 0; y3'' 0; y4 y2

Using (3) and (4) in eqn (1) & (2)


.p

1
w

4 y2 6 y1 5
9
w

4
6 y2 4 y1 6
w

6
(5) (6) 24 y2 36 y1
9

16
(6) (4) 24 y2 16 y1
9

22
20 y1
9

y1 0.1222

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
1
5 4 y2 0.7332
9

4y2 0.6221

y2 0.1555

1 2
y 0.1222 ; y 0.1556
3 3

3. Solve the boundary value problem ( x3 1) y'' ( x) x2 y' ( x) 4xy 2

subject to y(0) 0, y(2) 4 taking n 4 and choosing h 0.5

et
Solution:

.n
Given, ( x3 1) y'' ( x) x2 y' ( x) 4xy 2 1

y(0) 0; y(2)

y0 0; y4
4

2 ; h 0.5 & n 4
pz
ee
y0 y1 y2 y3 y4
ad
.p

x0 0 x1 0.5 x2 1 x3 1.5 x4 2
w

x0 0; x1 0.5; x2 1; x3 1.5; x4 2
w

y0 0; y4 2
w

to find y1 , y2 , y3 :

The finite difference approximates,

yi 2 yi yi yi yi
yi '' ( x) 1 1
; y ' ( x) 1 1

h2 2h

1
put h
2

(1) 4( xi 3 1) yi 1 2 yi yi 1 xi 2 ( yi 1 yi 1 ) 4 xi yi 2 (2)

www.padeepz.net

Download Useful Materials from Rejinpaul.com


www.rejinpaul.com
www.rejinpaul.com

www.padeepz.net
put i 1, 2,3

(2) 4( x13 1)( y2 2 y1 y0 ) x12 ( y2 y0 ) 4 x1 y1 2

4(1.125)( y2 2 y1 ) 0.25 y2 2 y1 2

4.5 y2 9 y1 0.25 y2 2 y1 2

4.75 y2 11y1 2 (3)

4(2)( y3 2 y2 y1 ) y3 y1 4 y2 2

8 y3 16 y2 8 y1 y3 4 y2 y1 2

et
7 y1 20 y2 9 y3 2 (4)

.n
4(4375)( y4 2 y3 y2 ) 2.25 y4 6 y3 2.25 y2 2

35 35 y3 17.5 y2 2.25 y4 6 y3 2.25 y2


pz 2
ee
15.25 y2 41y3 37.5 (5)

Solving the equations (3),(4) and (5) by gauss elimination method , we get
ad

y(0.5) 0.25, y(1) 1 and y(1.75) 2.25


.p

Homework:
w

1
1. Solve the BVP y" +xy=1,y(0)=0,y' (1)=1with n=2 taking h=
2
w
w

2. Solve theBVP x2 y" (x)+xy' (x)+(x2 -3)y(x)=0given y(1)=0, y(2)=2and take h 0.25 and n 4

Ans : y1 0.6044; y2 1.1304; y3 1.5973

www.padeepz.net

Download Useful Materials from Rejinpaul.com

You might also like