SlideShare a Scribd company logo
1 of 71
Download to read offline
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
6
SCE Department of Mechanical Engineering
Unit-I
Testing of Hypothesis
1.1.Introduction:
A statistical hypothesis is an assertion or conjecture
concerning one or more populations.
To prove that a hypothesis is true, or false, with absolute
certainty, we would need absolute knowledge. That is, we
would have to examine the entire population.
Instead, hypothesis testing concerns on how to use a random
sample to judge if it is evidence that supports or not the
hypothesis.
Hypothesis testing:
Hypothesis testing is formulated in terms of two hypotheses:
• H0 : the null hypothesis;
• H1 : the alternate hypothesis.
Types of error:
Because we are making a decision based on a finite sample,
there is a possibility that we will make mistakes.
The possible outcomes are:
H0 is true H1 is true
Do not Correct Type II
reject H0 Decision error
Reject H0 Type I Correct
Error Decision
1.2.Sampling Distribution:
There are two types of samples in Testing of Hypothesis
i) Small Sample (n <30)
ii) Large Sample (n >30)
Small Sample: (n <30)
Type 1:Student’s ‘t’ test
Single Mean (S.D given directly)
Single Mean (S.D is not given directly)
Difference of Means
Type 2: F – test
Type 3: Chi-Square test
Goodness of fit
Large Sample: (n >30)
Type 1: Single Mean
Type 2: Single Proportion
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
7
SCE Department of Mechanical Engineering
Type 3: Difference of Mean
Type 4: Difference of Proportion
Problems:
1.A Random sample of 25cups from a certain coffee dispensing machine yields a mean x=6.9ounces per
cup.Use a=0.05level of against the null hypothesis that, on the average, machine dispense µ˂7 ounces.
Assume that the distribution of ounces per cup is normal, and that the variance is the known quantity σ2
=0.01
ounces.
Sol:
Given:
n-25,x = 6.9
µo = 7,σ2 = 0.01,
s = σ = 0.1
1.parameter of interest is µ.
2.Ho:µ=7.0
3.H1:µ˂7.0
4.significanc level a=0.05
5.The test statistic is z=
̅ µ
/√
.
6.Reject Ho if |z|˃1.645 at *a=0.05
7.Compensation
Z =
	 .
[
.
√
]
= (-0.1)(
.
) = -5
Conclusion:
Here |z|=5˃1.645
Hence reject to HO: µ=7.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
8
SCE Department of Mechanical Engineering
1.3.Normal Distribution:
The test statistic is
z=
̅ µ
/√
.
Problems:
1. An insurance agent has claimed that the average age of policy holders who insure through him is less than
the average for all agents which is 30.5years.A random sample of 100 policy holders who had insured through
him reveal that hte mean and s.d are 28.8 years and 6.35 years respectively.Test his claim at 5% level of
significance>
Solution:
N=100,m0=30.5,x=28.8,σ=s=6.35.
1.parameter of interest is µ
2.H0:=:µ=30.5
3.H1:µ˂30.5
4.a=0.05
5.The test statistic is
Z =
̅ µ
/√
.
6.Reject H0 is|z|˃1.645
7.Computations:
Z=
( . )( )
.
|z|=2.68
Conclusion:
|z|=2.68˃1.645.
Hence reject H0:µ=30.5
Hence the claim of the agent is valid.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
9
SCE Department of Mechanical Engineering
2.A study shows that 16 out of 200 tractors produced on one αshipped,while the same was true for 14 out of
400 tractors produced on another assembly line. At the 0.01 level of significance,doesthis support the claim
that the second production line does support work?
r1=200 n2=400
P1= =0.08 P2= =0.035
P= =
( )( . ) ( )( . )
= 0.05
q = 1-p = 1-0.05 = 0.95
1.H0: p1 = p2
2.H1: p1≠p2
3.α = 0.01,table z = 2.58
4.Calculate z
Z =
Z =
.
.
= 2.36
Cal z< tab Z
Accept Ho.
1.4.Students-t- Distribution:
Z=
Problems:
1.Two horses A and B were tested according to the time (in seconds) to run a particular race with the
following results
Horse A 28 30 32 33 33 29 34
Horse B 29 30 30 24 27 29
Test whether horse A is running faster than B at 5% level.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
10
SCE Department of Mechanical Engineering
Solution:
Given: =7, =6
28 784 29 841
30 900 30 900
32 1024 30 900
33 1089 24 576
33 1089 27 729
29 841 29 841
34 1156
219 6883 169 4787
S2
= =
( . ) ( . )
=
. .
= 5.03
1.the parameter of interest is µ and µ
2.H0= µ = µ 	
[there is no significant difference]
=
∑
= = 31.29 ; =
∑
= = 28.17
=
∑
-( ) = - 31.292
= 4.23, =
∑
-( ) = - 28.172
= 4.28
3.H0= µ >µ [keyword A faster than B]
4.α = 0.05,d.f = n1+n2-2 = 7+6-2 =11
5.The test statistic is t =
6.Reject H0 if |t|>1.796[from table ‘t’ we get t = 1.796]
7.Computations: t =
. .
.
= 2.498
8.Conclusion:
Since |t|=2.498>1.796,so we reject H0 at 5% level of significance
Hence there is a significant difference between the two samples.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
11
SCE Department of Mechanical Engineering
1.5. CHI-SQUARE DISTRIBUTION:
Goodness of fit:
The test statistic is ℵ = ∑
( )
Where O – Observed frequency, E – Expected frequency
Problems:
1.The following data are collected on two characters.
Smokers Non-Smokers
Literaters: 83 57
Illiterates: 45 68
Based on this,can you say that there is no relation between smoking and literacy?
Solution:
1.The parameter of interest is ℵ
2.Ho :No relation between smoking and literacy.
3.H1: There is a relation between both
4.α = 0.05,d.f = (r-1)(s-1) = (2-1)(2-1) = 1
5.The test statistic is ℵ =
( ) ( )
( )( )( )( )
6.Reject H0 if ℵ >3.84
7.Computation
ℵ =
[( )( ) ( )( ) [ ]
( )( )( )( )
= = 9.4758
ℵ =9.48
8.Conclution:
Since ℵ =9.48>3.84
Hence we reject H0 at 5% level of significance.
There is some association between literacy and smoking.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
12
SCE Department of Mechanical Engineering
1.6. F-DISTRIBUTION:
F = , = ,				 =
Problems:
1.Two random samples drawn from two normal populations are given below:
Sample I: 24 27 26 21 25
Sample II: 27 30 32 36 28 23
Test if the two populations have the same variance.
Solution:
Given n1=5, n2=6
X1 X2
24 576 27 729
27 729 30 900
26 676 32 1024
21 441 36 1296
25 625 28 784
23 529
123 3047 176 5262
= = 24.6 , = = 29.33
=
∑
-( )2
= -(24.6)2
= 609.4-605.16 = 4.24
=
∑
-( )2
= -(29.33)2
= 16.7511
= =
( )( . )
= 5.3, = =
( )( . )
= 20.10
>
H0: = , H1:	 	≠
Α=5%=0.05
d.f :v1 = n1-1= 4, v2 = n2-1 = 5
F = =
.
.
= 3.79
F(5,4=6.26)
∴ Cal F<Table F
So we accept H0.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
13
SCE Department of Mechanical Engineering
2.1 Introduction
yield of paddy. Here the quantity of manure used and the amount of yield of paddy
UNIT II
Design of Experiments
and quality of seeds (will also affect the yield of paddy, which are not under
study) are called extraneous variables.
Aim of design of experiments:
In any statistical experiment we will have both experimental variables and
extraneous variables. The aim of the design of experiments is to control
extraneous variables and hence to minimize the error so that the results of
experiments could be attributed only to the experimental variables.
Basic principles of experimental design:
1. Randomization 2.Replication 3.Local control.
Consider an agricultural experiment. To analyze the effect of a manure in the
yield of paddy, we use the manure in some plots of same size(group of
experimental units) is called experimental group and the some other group of
plots in which the manure is used and which will provide a basis for comparison
is called the control group.
By grouping, we mean combining sets of homogeneous plots into groups, so that
different manures may be used in different groups. By blocking, we mean
assigning the same number of plots in different blocks. . By balancing, we mean
adjusting the procedures of grouping, blocking and assigning the manures in
such a manner that a balanced configuration is obtained.
By 'experiment' we mean the collection of data (which usually consists of a series
according to a certain specified sampling procedures.
Consider the example of agricultural experiment which may be performed
to verify the claim that a particular manure has got the effect of increasing the
are known as experimental variables. And factors such as rainfall, quality of soil
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
14
SCE Department of Mechanical Engineering
In order to study the effects of different manures on the yield are studied, each
manure is used in more than one plot. In other words, we resort to replication
which means repetition.
Basic designs of experiments.
I. Completely Randomized Design ( ANOVA one way classification)
2. Randomized Block Design ( ANOVA two way classification)
3. Latin Square Design ( ANOVA three way classification)
ANOVA:
ANOVA enables us to divide the total variation (represented by variance) in a
group into parts which are accounted to different factors and a residual random
variation which could be accounted for by any of these factors. The variation due
to any specific factor is compared with the residual variation for significance, and
hence the effect of the factors are concluded.
2.2. Completely Randomized Design (CRD)
Consider an experiment of agriculture in which "h" treatments (manures) and "n"
plots are available. To control the extraneous variables treatment "I" should be
replicated on "n I" plots, treatment 2 should be replicated on "n2" plots and so on.
To reduce the error we have to randomize this process that is which nl plots b'e
used treatment I and so on. For this we number the plots (from I to n) and write
the numbers on cards and shuffle well. Now, we select nl cards (as cards are
selected at random the numbers will not be in order) on which treatments I will be
used and so on. This process and design is called completely randomized
design.
2.3. Randomized Block Design (RBD)
Consider an experiment of agriculture in which effects of "k" treatments on the
yield of paddy used. For this we select "n" plots. If the quality of soil of these "n"
plots is known, then these plots are divided into "h" blocks (each with one
quality). Each of these "h" blocks are divided into "k" times (n = hk) and in each
one of this "k" plots are applied the "k" treatments in a perfectly randomized
manner such that that each treatment occurs only once in any of the block. This
design is called randomized block design.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
15
SCE Department of Mechanical Engineering
2.4. Latin Square Design (LSD)
Consider an agricultural experiment, in which n2 plots are taken and arranged in
the form of an n X n square, such that plots in each row will be homogeneous as
far as possible with respect to one factor of classification, say, quality of soil and
plots in each column will be homogeneous with respect to another factor of
classification, say, seed quality. Then "n" treatments are given to these plots
such that each treatment occurs only once in each tow and only once in each
column. The various possible arrangements obtained in this manner are known
as Latin squares of order "n" and the design is called Latin Square Design.
Note: In a 2 X 2 LSD, the degree of freedom for the residual variation is en -2) =
0 which is not possible. Therefore a 2 X 2 LSD is not possible.
Problems
1. The following table shows the lives in hours of four brands of electric lamps:
Brand
A: 1610 1610 1650 1680 1700 1720 1800
B: 1580 1640 1640 1700 1750
C: 1460 1550 1600 1620 1640 1660 1740 1820
D: 1510 1520 1530 1570 1600 1680
Perform an analysis of variance and test the homogeneity of the mean lives of
the four brands of lamps.
Solution:
We are going to discuss mean lives of bulbs according to brands (only one
factor). So, let us use ANOV A one way classification.
Step 1 : Null Hypothesis Ho: There is no significant difference in the mean life of
bulbs according to brands.(J..l]= J..l2= J..l3= /14)
Step 2: Test Statistic (Calculating F ratio) As the data given is numerically larger,
let us subtract all values given by 1640 and then divide them by 10 to make them
simpler for calculation ease
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
16
SCE Department of Mechanical Engineering
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
17
SCE Department of Mechanical Engineering
SSE = SST - SSC = 1950.62 - 452.25 = 1498.37
ANOVA table is
Step 3: Level of significance: Not given. So, let us take 5 % = 0.05 a
Step 4: Degrees of Freedom: ( 3,22)
Step 5: Table value : Fo.os(3,22)= 3.05
Step 6: Conclusion: Comparing the F - value calculated at step 2 with table
value of step 5 Fcal < Flab,we accept the Null hypothesis. That is there is no
difference in the mean life time of the lamps due to brands.
2. A completely randomized design experiment with 10 plots and 3 treatments
gave the following results:
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
18
SCE Department of Mechanical Engineering
Analyze the results for treatment effects.
Solution:
All the plots are not applied with the same number of treatments and we are to
analyze the treatment effects only, we apply One way classification.
Re arranging the data
Treatment A: 5 7
Treatment B: 4 4
Treatment C: 3 5
Step 1: Null Hypothesis
Ho: There is no difference in the yield between treatments.
Step 2 : Test Statistic:
Total = T = 16+15+9 = 40
The square of the values are
LX2 =84+81+35=200
Correction factor = 160
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
19
SCE Department of Mechanical Engineering
SST= = 40
SSC= (16)2 + (lS)2 + (9)2 -160 = 6
SSE = SST - SSC =40 - 6 = 34
The ANOVA table is
Step 3: Level of significance: Not given. So, let us take S % = O.OS
Step 4: Degrees of Freedom: ( 7,2)
Step 5: Table value : Fo.os(7,2)= 19.3S
Step 6: Conclusion: Comparing the F - value calculated at step 2 with table
value of step S Fca1 < Flab,we accept the Null hypothesis. That is there is no
difference in the mean yield between the treatments.
3. Three varieties of a crop are tested in a randomized block design with four
replications, the layout being as given below: The yields are given in kilograms.
Analyze for significance
C48 A51 B52 A49
A47 B49 C52 C51
B49 C53 A49 B50
Solution:
Each blocks are applied with same number of replications and from the question
(RBD) we understand that it is two way classification.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
20
SCE Department of Mechanical Engineering
Step 1: Null Hypothesis Ho (I): There is no difference in the yield between
treatments (rows).
Null Hypothesis Ho (II): There is no difference in the yield between blocks(
columns).
Step 2: Test Statistic (Calculating F ratio)
As the data given is numerically larger, let us subtract all values given by 50
make them simpler for calculation ease.
Total T = - 6 +3+3+0 = 0
The square of the above values are
LX2 =14+ 11 + 9 + 2 = 36
Correction factor = 0
SST = 36
SSE = SST - SSC-SSR = 36 - 18 - 8 = 10
The ANOVA table is
Step 3: Level of significance: Not given. So, let us take 5 % = 0.05
Step 4: Degrees of Freedom: for rows (3,6) for columns (4,6)
Step 5: Table value : Foos(2,6) = 5.14 Foos(3,6) = 4.76
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
21
SCE Department of Mechanical Engineering
Step 6: Conclusion: Comparing the FR- value calculated at step 2 with table
value of step 5 FR< Ftab,we accept the Null hypothesis I. That is there is no
difference in the mean yield between the treatments(rows).
Comparing the Fe - value calculated at step 2 with table value of step 5 Fe<
Ftab,we accept the Null hypothesis II. That is there is no difference in the mean
yield between the blocks(columns).
4. Four experiments determine the moisture content of samples of a powder,
each observer taking a sample from each of six consignments. The assessments
are given below:
Perform an analysis of variance on these data and discuss whether there is any
significant difference between consignments or between observers.
Solution:
From the data we understand that there are two factors. One is consignment and
other is observer. So, we apply ANOV A two way classification.
Step 1: Null Hypothesis Ho (I): There is no difference in the yield between
treatments (rows).
Null Hypothesis Ho (II): There is no difference in the yield between
blocks(columns).
Step 2: Test Statistic (Calculating F ratio) As the data given is numerically larger,
let us subtract all values given by 10 make them simpler for calculation ease.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
22
SCE Department of Mechanical Engineering
Total = 4 + 4 + -1 + 7 + 4 +1 = 19
The square of the above table values are,
Ix2 =10+10+3+21+6+1 = 51
Correction factor = -15.04
SST= Ix - -=51-15.04 = 35.96
SSR = 15.04
SSE = SST - SSC-SSR = 35.96 - 13.13 - 9.71 = 13.12
The ANOVA table is
Step 3: Level of significance: Not given. So, let us take 5 % = 0.05
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
23
SCE Department of Mechanical Engineering
Step 4: Degrees of Freedom : for rows (3,15) for columns (5,15)
Step 5: Table value : Fo.os(3,15)= 3.29 Fo.os(5,15) = 5.05
Step 6: Conclusion: Comparing the FR- value calculated at step 2 with table
value of step 5 FR>Ftab,we Reject the Null hypothesis 1. That is there is
significant difference in the moisture content of the powder between the
observers(rows).
Comparing the Fe - value calculated at step 2 with table value of step 5 Fe<
Ftab, we accept the Null hypothesis II. That is there is no difference in the
moisture content between the consignments( columns).
5. The following data resulted from an experiment to compare three burners BI,
B2,B3. A Latin square design was used as the tests were made on 3 engines
and were spread over 3 days.
Test the hypothesis that there is no difference between the burners.
Step 1: Null Hypothesis Ho (I): There is no difference in the mean between days
(rows).
Null Hypothesis Ho (II): There is no difference in the mean between Engines(
columns).
Null Hypothesis Ho (III): There is no difference in the mean between
Burners(letters ).
Step 2: Test Statistic (Calculating F ratio)
As the data given is numerically larger, let us subtract all values given by 16
make them simpler for calculation ease.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
24
SCE Department of Mechanical Engineering
Total T = 1 B1 = 0 - 1 - 4 = - 5
B2 = 1 + 0 - 3 = - 2
B3 = 4 + 5 -1 = 8
The squared values are
Ix2 = 69
Correction factor = 0.1111
SST = 68.88889
SSR = 8.3333 + 5.3333 + 21.3333 - 0.1111
= 34.8888
ssc= 0.3333 + 1.3333+0- 0.1111 = 1.5556
SSL = 8.3333+1.3333+21.3333 - 0.1111
= 30. 8888
SSE = SST - SSC- SSL - SSR = 68.8889 - 34.8888 - 1.5556 - 30.8888
= 1.5557
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 25 Department of Mechanical Engineering
Ftab, we accept the Null hypothesis II. That is there is no difference between the
engines ( columns). Comparing the FL - value calculated at step 2 with table
value of step 5 Fe>Ftab, we reject the Null hypothesis III. That is there is
difference between the numbers(letters).
Step 5: Table value : Fo.os(2,2) = 19
Comparing the Fe - value calculated at step 2 with table value of step 5 Fe<
Step 3: Level of significance: Not given. So, let us take 5 % = 0.05
Step 4: Degrees of Freedom: for rows (2,2) for columns ( 2,2) for letters ( 2,2)
Step 6: Conclusion: Comparing the FR - value calculated at step 2 with table
value of step 5 FR>Ftab, we Reject the Null hypothesis I. That is there is
significant difference in the due to selection of days(rows).
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 26 Department of Mechanical Engineering
UNIT -3
SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS
3.1.Introduction
The problem of solving the equation ( ) = is of great importance in science
and Engineering. In this section, we deal with the various methods which give a solution for the
equation ( ) =
Solution of Algebraic and transcendental equations:
The equation of the form f(x) =0 are called algebraic equations if
f(x) is purely a polynomial in x.For example: − − + = 	&	 − − = are
algebraic equations .
If f(x) also contains trigonometric, logarithmic, exponential function etc. then the equation
( ) = is known as transcendental equation.
Methods for solving the equation ( ) =
The following result helps us to locate the interval in which the roots of ( ) =
 Method of false position.
 Iteration method
 Newton-Raphson method
Method of False position (Or) Regula-Falsi method (Or) Linear interpolation method
In bisection method the interval is always divided into half. If a function
changes sign over an interval, the function value at the mid-point is evaluated. In bisection method
the interval from a to b into equal intervals ,no account is taken of the magnitude of
( )	 	 ( ).An alternative method that exploits this graphical insights is to join ( )	 	 ( )
by a straight line.The intersection of this line with the X-axis represents an improved estimate of
the root.The replacement of the curve by a straight line gives a “false position” of the root is the
origin of the name ,method of false position ,or in Latin ,Regula falsi .It is also called the linear
interpolation method.
Problems:
1. Find a real root of			 − + = that lies between 2 and 3 by the method of false position
and correct to three decimal places.
Sol:
Let ( ) = − +
( .) = − . 	 	 ( ) =
The root lies between 2.5 and 3.
The approximations are given by
)()(
)()(
afbf
abfbaf
x



www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 27 Department of Mechanical Engineering
Iteration(r) A b xr f(xr)
1 2.5 3 2.9273 -0.2664
2 2.9273 3 2.9423 -0.0088
3 2.9423 3 2.9425 -0.0054
4 2.9425 3 2.9425 0.003
2. Obtain the real root of = ,correct to four decimal places using the method of false
position.
Sol:
Given =
Taking logarithmic on both sides,
2log10 xx
2log)( 10  xxxf
00958.0)5.3( f and 000027.0)6.3( f
The roots lies between 3.5 and 3.6
The approximation are given by
)()(
)()(
afbf
abfbaf
x



Iteration(r)a b xr f(xr)
1 3.5 3.6 3.5973 0.000015
2 3.5 3.5973 3.5973 0
The required root is 3.5973
Exercise:
1. Determine the real root of = correct to four decimal places by Regula-Falsi method.
Ans: 1.0499
2. Find the positive real root of = correct to four decimals by the method of False
position .
Ans: 1.8955
3.Solve the equation = − by Regula-Falsi method,correct to 4 decimal places.
Ans: 2.7984
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 28 Department of Mechanical Engineering
3.2.Newton’s method (or) Newton-Raphson method (Or) Method of tangents:
This method starts with an initial approximation to the root of an equation, a better and closer
approximation to the root can be found by using an iterative process.
Derivation of Newton-Raphson formula:
Let  be the root of 0)( xf and 0x be an approximation to  .If 0xh  
Then by the Tayor’s series
)(
)(
1
i
i
ii
xf
xf
xx

 ,i=0,1,2,3,………
Note:
 The error at any stage is proportional to the square of the error in the previous stage.
 The order of convergence of the Newton-Raphson method is at least 2 or the convergence
of N.R method is Quadratic.
Problems:
1.Using Newton’s method ,find the root between 0 and 1 of − + = correct five decimal
places.
Sol:
Given − + =
46)( 3
 xxxf
63)( 2
 xxf
By Newton-Raphson formula, we have approximation
.....3,2,1,0,
)(
)(
1 

 n
xf
xf
xx
i
i
ii
The initial approximation is 5.00 x
First approximation:
,
)(
)(
0
0
01
xf
xf
xx


,
25.5
125.1
5.0


=0.71429
Second approximation:
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 29 Department of Mechanical Engineering
,
)(
)(
1
1
12
xf
xf
xx


,
4694.4
0787.0
71429.0


=0.7319
Third approximation
,
)(
)(
2
2
23
xf
xf
xx


,
3923.4
0006.0
0.73205


=0.73205
Fourth approximation
,
)(
)(
3
3
34
xf
xf
xx


,
3923.4
000003.0
0.73205


=0.73205
The root is 0.73205, correct to five decimal places.
2. Find a real root of x=1/2+sinx near 1.5, correct to 3 decimal places by newton-Raphson method.
Sol:
Let 2
1
sin)(  xxxf
xxf cos1)( 
By Newton-Raphson formula, we have approximation
.....3,2,1,0,
)(
)(
1 

 n
xf
xf
xx
i
i
ii
,....3,2,1,0,
cos1
cos5.0sin
1 


 n
x
xxx
x
n
nnn
n
Let 5.10 x be the initial approximation
First approximation:
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 30 Department of Mechanical Engineering
5.1cos1
)5.0)5.1sin(5.1(
5.11


x
)9293.0(
)0025.0(
5.1 
=1.497
Second approximation:
9263.0
)00028.0(
497.11

x
=1.497.
The required root is 1.497
Exercise:
1. Find the real root of xex
3 ,that lies between 1 and 2 by Newton’s method ,correct to 4
decimal places.
Ans:1.5121
2.Use Newton-Raphson method to solve the equation 01cos3  xx
Ans:0.6071
3.Find the double root of the equation 0123
 xxx by Newton’s method.
Ans: 0.03226
Iteration method (Or) Method of successive approximations(Or)Fixed point method
For solving the equation 0)( xf by iteration method, we start with an
approximation value of the root.The equation 0)( xf is expressed as )(xx  .The equation
)(xx  is called fixed point equation.The iteration formula is given by
,.....2,1,0),(1  nxx nn  called fixed point iteration formula.
Theorem(Fixed point theorem)
Let 0)( xf be the given equation whose exact root is . The equation 0)( xf be
rewritten as
)(xx  .Let I be the interval containing the root .x If 1)(  x for all x in I, then the
sequence of
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 31 Department of Mechanical Engineering
Approximation nxxxx ,.....,, 321 will converges to . ,If the initial starting value 0x is chosen in I.
Theorem:
Let . be a root of the equation )(xgx  .If
0)(0)(,.......0)(,0)( )()1(
 
 pp
andgggg .then the convergence of iteration
)(1 ii xgx  is of order p.
Note:
The order of convergence in general is linear (i.e) =1
Problems:
1.Solve the equation 0123
 xx or the positive root by iteration method ,correct to four
decimal places.
Sol:
1)( 23
 xxxf
01)1(01)0(  andff
The root lies between 0 and 1.
1)1(01 223
 xxxx
x
x


1
1
The given equation can be expressed as
x
x


1
1
)(
2
3
)1(2
1
)(
x
x


2
3
)1(2
1
)(
x
x


1
24
1
)1(
2
1
)0(   and
2
3
)1(2
1
)(
x
x


)1,0(1)(  xx
Choosing 75.00 x ,the successive approximations are
75.01
1
1

x
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 32 Department of Mechanical Engineering
=0.75593
75488.0
75488.0
75487.0
75463.0
75465.0
6
5
4
3
2





x
x
x
x
x
Hence the root is 0.7549
Exercise:
1. Find the cube root of 15, correct to four decimal places, by iteration method
Ans: 2.4662
System of linear equation:
Many problems in Engineering and science needs the solution of a system of simultaneous
linear equations .The solution of a system of simultaneous linear equations is obtained by the
following two types of methods
 Direct methods (Gauss elimination and Gauss Jordan method)
 Indirect methods or iterative methods (Gauss Jacobi and Gauss Seidel
method)
(a) Direct methods are those in which
 The computation can be completed in a finite number of steps resulting in the
exact solution
 The amount of computation involved can be specified in advance.
 The method is independent of the accuracy desired.
(b) Iterative methods (self correcting methods) are which
 Begin with an approximate solution and
 Obtain an improved solution with each step of iteration
 But would require an infinite number of steps to obtain an exact solution
without round-off errors
 The accuracy of the solution depends on the number of iterations performed.
Simultaneous linear equations:
The system of equations in n unknowns nxxxx ,.....,, 321 is given by
11212111 .......... bxaxaxa nn 
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 33 Department of Mechanical Engineering
22222121 .......... bxaxaxa nn 
…………………………………………………………
………………………………………………………….
………………………………………………………….
nnmnnn bxaxaxa  ..........2211
This can be written as BAX  where      T
n
T
nnnij bbbbBxxxxXaA ,.....,,;,.....,,; 321321  
This system of equations can be solved by using determinants (Cramer’s rule) or by means of
matrices. These involve tedious calculations. These are other methods to solve such equations .In
this chapter we will discuss four methods viz.
(i) Gauss –Elimination method
(ii) Gauss –Jordan method
(iii) Gauss-Jacobi method
(iv) Gauss seidel method
 Gauss-Elimination method
This is an Elimination method and it reduces the given system of equation to an equivalent
upper triangular system which can be solved by Back substitution.
Consider the system of equations
3333232131
2323222121
1313212111
bxaxaxa
bxaxaxa
bxaxaxa



Gauss-algorithm is explained below:
Step 1. Elimination of 1x from the second and third equations .If ,011 a the first
equation is used to eliminate 1x from the second and third equation. After elimination, the
reduced system is
3333232
2323222
1313212111
bxaxa
bxaxa
bxaxaxa



Step 2:
Elimination of 2x from the third equation. If ,022 a We eliminate 2x from third
equation and the reduced upper triangular system is
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 34 Department of Mechanical Engineering
3333
2323222
1313212111
bxa
bxaxa
bxaxaxa



Step 3:
From third equation 3x is known. Using 3x in the second equation 2x is obtained. using
both
2x And 3x in the first equation, the value of 1x is obtained.
Thus the elimination method, we start with the augmented matrix (A/B) of the given
system and transform it to (U/K) by eliminatory row operations. Finally the solution is
obtained by back substitution process.
Principle
)/()/( lim
KUBA inationeGauss
  
 Gauss –Jordan method
This method is a modification of Gauss-Elimination method. Here the elimination of
unknowns is performed not only in the equations below but also in the equations above.
The co-efficient matrix A of the system AX=B is reduced into a diagonal or a unit matrix
and the solution is obtained directly without back substitution process.
)/()/()/( KIorKDBA JordanGauss
  
Examples:
1.Solve the equations 33114,20238,1242  zyxzyxzyx by (1)Gauss –
Elimination method (2) Gauss –Jordan method
Sol:
(i)Gauss-Elimination method
The given system is equivalent to BAX  where
= −
−
= and =
Principle. Reduce( ⁄ ) to( ⁄ )
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 35 Department of Mechanical Engineering
( ⁄ )=	 −
−
	
~ −
−
~ − −
−
− → − ; → − ;
~ − −
−
−
−
→ +
From this ,the equivalent upper triangular system of equations is
1242  zyx
28147  zy
2727  z
z=1,y=2,x=3 By back substitution.
The solution is x=3,y=2,z=1
(ii)Gauss –Jordan method
Principle. Reduce( ⁄ ) to( ⁄ )
( ⁄ )~ −
−
~
−
→ × (− / ); → × ( / );
~
− −
→ − ; → −
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 36 Department of Mechanical Engineering
~ → × (− / )
~ → − ; →
From this ,we have =
=
y = 2
z=1
∴ 	 	 	 = , = , = .
Exercise:
1. Solve the system by Gauss –Elimination method
532,303,14225  zyxzyxzyx .
Ans: x= 39.3345;y=16.793;z=18.966
2. Solve the equations 40543,13432,9  zyxzyxzyx by (1) Gauss –Elimination
method (2) Gauss –Jordan method
Ans: x=1; y=3; z=5
3.3.Iterative method
These methods are used to solve a special of linear equations in which each equation must
possess one large coefficient and the large coefficient must be attached to a different unknown in
that equation.Further in each equation, the absolute value of the large coefficient of the unknown is
greater than the sum of the absolute values of the other coefficients of the other unknowns. Such
type of simultaneous linear equations can be solved by the following iterative methods.
 Gauss-Jacobi method
 Gauss seidel method
3333
2222
1111
dzcybxa
dzcybxa
dzcybxa



i.e., the co-efficient matrix =
〈 〉
〈 〉
〈 〉
is diagonally dominant.
Solving the given system for x,y,z (whose diagonals are the largest values),we have
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 37 Department of Mechanical Engineering
][
1
][
1
][
1
333
3
222
2
111
1
ybxad
c
z
zcxad
b
y
zcybd
a
x



Gauss-Jacobi method
If the rth
iterates are )()()(
,, rrr
zyx ,then the iteration scheme for this method is
)(
1
)(
1
)(
1
)(
3
)(
33
3
)1(
)(
2
)(
22
2
)1(
)(
1
)(
11
1
)1(
rrr
rrr
rrr
ybxad
c
z
zcxad
b
y
zcybd
a
x






The iteration is stopped when the values x, y, z start repeating with the desired degree of accuracy.
Gauss-Seidel method
This method is only a refinement of Gauss-Jacobi method .In this method ,once a new
value for a unknoen is found ,it is used immediately for computing the new values of the
unknowns.
If the rth
iterates are ,then the iteration scheme for this method is
)(
1
)(
1
)(
1
)1(
3
)1(
33
3
)1(
)(
2
)1(
22
2
)1(
)(
1
)(
11
1
)1(






rrr
rrr
rrr
ybxad
c
z
zcxad
b
y
zcybd
a
x
Hence finding the values of the unknowns, we use the latest available values on the R.H.S
The process of iteration is continued until the convergence is obtained with desired accuracy.
Conditions for convergence:
Gauss-seidel method will converge if in each equation of the given system ,the absolute
values o the largest coefficient is greater than the absolute values of all the remaining coefficients
niaa
n
jj
ijii .........3,2,1
1,1
 
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 38 Department of Mechanical Engineering
This is the sufficient condition for convergence of both Gauss-Jacobi and Gauss-seidel iteration
methods.
Rate of convergence:
The rate of convergence of gauss-seidel method is roughly two times that of Gauss-Jacobi
method. Further the convergences in Gauss-Seidel method is very fast in gauss-Jacobi .Since the
current values of the unknowns are used immediately in each stage of iteration for getting the
values of the unknowns.
Problems:
1.Solve by Gauss-Jacobi method, the following system
354172,24103,32428  zyxzyxzyx
Sol:
Rearranging the given system as
24103
354172
32428



zyx
zyx
zyx
The coefficient matrix is =
〈 〉 −
〈 〉
〈 〉
is diagonally dominant.
Solving for x,y,z ,we have
= [ − + ]
= [ − − ]
= [ − − ]
We start with initial values ( , , )=( , , )
The successive iteration values are tabulated as follows
Iteration X Y Z
1 1.143 2.059 2.400
2 0.934 1.360 1.566
3 1.004 1.580 1.887
4 0.983 1.508 1.826
5 0.993 1.513 1.849
6 0.993 1.507 1.847
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 39 Department of Mechanical Engineering
7 0.993 1.507 1.847
X=0.993;y=1.507;z=1.847
2.Solve by Gauss-Seidel method, the following system
11054,722156;85627  zyxzyxzyx
Sol:
The given system is diagonally dominant.
Solving for x,y,z, we get
= [ − + ]
= [ − − ]
= [ − − ]
We start with initial values ( , , )=( , , )
The successive iteration values are tabulated as follows
Iteration X Y Z
1 3.148 3.541 1.913
2 2.432 3.572 1.926
3 2.426 3.573 1.926
4 2.425 3.573 1.926
5 2.425 3.573 1.926
X=2.425;y=3.573;z=1.926
Exercise:
1.Solve by Gauss-Seidel method, the following system
780.2;341.1;89.0:
221032,442302;9210


zyxAns
zyxzyxzyx
2.Solve by Gauss-Seidel method and Gauss-Jacobi method,the following system
069.1;798.2;580.2)(541.3;522.1;321.1)(:
48217,301822;753230


zyxiizyxiAns
zyxzyxzyx
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 40 Department of Mechanical Engineering
Matrix inversion:
A square matrix whose determinant value is not zero is called a non-singular matrix. Every
non-singular square matrix has an inverse matrix. In this chapter we shall find the inverse of the
non-singular square matrix A of order three. If X is the inverse of A,
Then = 	 	 	 	 	 	 	
3.4.Inversion by Gauss-Jordan method
By Gauss Jordan method, the inverse matrix X is obtained by the following steps:
 Step 1: First consider the augmented matrix ( / )
 Step 2: Reduce the matrix A in ( / ) to the identity matrix I by employing row
transformations.
The row transformations used in step 2 transform I to A-1
Finally write the inverse matrix A-1
.so the principle involved for finding A-1
is as shown
below
( / ) → /
Note
The answer can be checked using the result
. = . =
Problems:
1.Find the inverse of by Gauss-Jordan method.
Sol:
( / ) =
( / )~ −
−
→ − ; → −
~
−
−
−
→ −
( / )~
− −
−
−
→ −
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 41 Department of Mechanical Engineering
Thus ( / ) → /
Hence =
− −
−
−
2.Find the inverse of =
−
− −
−
by Gauss-Jordan method
Exercise:
1. Find the inverse of
− −
by Gauss-Jordan method.
2.By Gauss-Jordan method ,find 1
A if = −
−
3.5.Eigen value of a Matrix
For every square matrix A, there is a scalar  and a non-zero column vector X such
that XAX  .Then the scalar  is called an Eigen value of A and X, the corresponding Eigen
vector. We have studied earlier the computation of Eigen values and the Eigen vectors by means of
analytical method. In this chapter, we will discuss an iterative method to determine the largest
Eigen value and the corresponding Eigen vector.
Power method (Von Mise’s power method)
Power method is used to determine numerically largest Eigen value
and the corresponding Eigen vector of a matrix A
Working Procedure
(For a × square matrix)
 Assume the initial vector = ( , , )
 Then find = , = , , … … ..
 Normalize the vector to get a new vector
(i.e) = , 	 is the largest component in magnitude of
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 42 Department of Mechanical Engineering
 Repeat steps (2) and (3) till convergence is achieved.
 The convergence of mi and Xi will give the dominant Eigen value  and the
corresponding Eigen vector X Thus
 
 
ni
X
Y
ik
ik
........2,1,0,lim 1
1  

And X is the required Eigen vector.
Problems
1.Use the power method to find the dominant value and the corresponding Eigen vector of
the matrix A =
9 1 8
7 4 1
1 7 9
Sol:
Let X = (1,1,1)
AX =
9 1 8
7 4 1
1 7 9
1
1
1
=
18
12
17
= 18
1.00
0.67
0.94
= 1 1X
AX =
9 1 8
7 4 1
1 7 9
1.00
0.67
0.94
=
17.94
10.62
14.15
= 17.19
1.00
0.67
0.82
= 2 2X
AX =
9 1 8
7 4 1
1 7 9
1.00
0.67
0.82
=
16.18
10.30
12.72
= 16.18
1.00
0.64
0.79
= 3 3X
AX =
9 1 8
7 4 1
1 7 9
1.00
0.64
0.79
=
15.96
10.35
12.59
= 15.96
1.00
0.65
0.79
= 4 4X
AX =
9 1 8
7 4 1
1 7 9
1.00
0.65
0.79
=
15.97
10.39
12.66
= 15.97
1.00
0.65
0.79
= 5 5X
Hence the dominant Eigen value is 15.97 and the corresponding Eigen vector is
[1.00,0.65,0.79]
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 43 Department of Mechanical Engineering
2. Determine the dominant Eigen value and the corresponding Eigen vector of
A =
4 1 0
1 20 1
0 1 4
Using power method.
Exercise:
1. Find the dominant Eigen value and the corresponding Eigen vector of
A=
1 6 1
1 2 0
0 0 3
														Find also the other two Eigen values.
2. Find the dominant Eigen value of the corresponding Eigen vector of A =
4 1
1 3
By power method. Hence find the other Eigen value also.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 44 Department of Mechanical Engineering
CHAPTER 4
INTERPOLATION AND APPROXIMATION
4.1 Interpolation with Unequal intervals
Introduction
Interpolation is a process of estimating the value of a function at ana
intermediate point when its value are known only at certain specified points.It is based on
the following assumptions:
(i) Given equation is a polynomial or it can be represented by a polynomial
with a good degree of approximation.
(ii) Function should vary in such a way that either it its increasing or decreasing
in the given range without sudden jumps or falls of functional values in the
given interval.
We shall discuss the concept of interpolation from a set of tabulated
values of y = f(x) when the values of x are given intervals or at
unequal intervals .First we consider interpolation with unequal
intervals.
4.2.Lagrange’s Interpolation formula
y = 	f(x) =
( )( )….( )
( )( )….( )
y +
( )( )….( )
( )( )….( )
y +
																																																																																																		…
( )( )….( )
( )( )….( )
y
This is called the Lagrange’s formula for Interpolation.
Problems:
1. Using Lagrange’s interpolation formula, find the value of y corresponding to x=10
from the following data
X 5 6 9 11
Y 12 13 14 16
Sol:
Given x = 5;x = 6;x = 9; x = 11
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 45 Department of Mechanical Engineering
y = 12; y = 13;y = 14;y = 16
By Lagrange’s interpolation formula
y = 	f(x) =
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y +
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y
+
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y +
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y
Using x=10 and the given data,
y (10) =14.67
2. Using Lagrange’s interpolation formula, find the value of y corresponding to x=6 from
the following data
X 3 7 9 10
Y 168 120 72 63
Sol:
Given x = 3; x = 7; x = 9;x = 10
y = 168;y = 120;y = 72;y = 63
By Lagrange’s interpolation formula
y = 	f(x) =
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y +
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y
+
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y +
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y
Using x=6 and the given data, y(6)=147
3.Apply Lagrange’s formula to find f(5),given that f(1)=2,f(2)=4,f(3)=8 and f(7)=128
Sol:
Given x = 1; x = 2; x = 3;x = 7
y = 2;y = 4;y = 8; y = 128
By Lagrange’s interpolation formula
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 46 Department of Mechanical Engineering
y = 	f(x) =
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y +
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y
+
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y +
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
y
Using x=5 and the given data,
y(5)=32.93
Exercise
1.Find the polynomial degree 3 fitting the following data
X -1 0 2 3
Y -2 -1 1 4
Ans:y = [x − x + 4x − 6]
2.Given u = 6;u = 9; u = 33	and	u = −15. Find	u
Ans: u = 20
Inverse Interpolation by Lagrange’s interpolating polynomial
Lagrange’s interpolation formula can be used find a value of x corresponding to a given
y which is not in the table. The process of finding such of x is called inverse interpolation.
If x is the dependent variable and y is the independent variable, we can write a
formula for x as a function of y.
The Lagrange’s interpolation formula for inverse interpolation is
x =
(y − y )(y − y )… . (y − y )
(y − y )(y − y ) … (y − y )
x +
(y − y )(y − y ) … (y − y )
(y − y )(y − y ) … (y − y )
x
+
(y − y )(y − y ) … . (y − y )
(y − y )(y − y ) … (y − y )
x
+ ⋯ . +
(y − y )(y − y ) … .(y − y )
(y − y )(y − y ) … (y − y )
x
Problems
1.Apply Lagrange’s formula inversely to obtain the root of the equation f(x) = 0
Given that f(0) = −4,f(1) = 1,f(3) = 29,f(4) = 52
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 47 Department of Mechanical Engineering
Sol:
Given that x = 0,x = 1, x = 3, x = 4
y = −4, y = 1,y = 29,y = 52
To find x such that f(x) = 0
Applying Lagrange’s interpolation formula inversely ,we get
x =
(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )
x +
(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )
x
+
(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )
x +
(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )
x
=0.8225
∴ x = 0.8225
2.Given data
x 3 5 7 9 11
y 6 24 58 108 174
Find the value of x corresponding to y=100.
Sol:
Given that x = 3,x = 5,x = 7, x = 9, x = 11
y = 6, y = 24, y = 58, y = 108, y = 174
x =
(y − y )(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )(y − y )
x +
(y − y )(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )(y − y )
x
+
(y − y )(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )(y − y )
x
+
(y − y )(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )(y − y )
x
+
(y − y )(y − y )(y − y )(y − y )
(y − y )(y − y )(y − y )(y − y )
x
Using the given data and y=100, we get
X=8.656
The value of x corresponding to y=100 is 8.656
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 48 Department of Mechanical Engineering
4.3. Divided Difference –Newton Divided Difference Interpolation Formula
If the values of x are given at unequal intervals, it is convenient to introduce the
idea of divided differences. The divided difference are the differences of y=f(x) defined,
taking into consideration the changes in the values of the argument .Using divided
differences of the function y=f(x),we establish Newton’s divided difference interpolation
formula, which is used for interpolation which the values of x are at unequal intervals and
also for fitting an approximate curve for the given data.
Divided difference
Let the function y = f(x) assume the values f(x ), f(x ) … … f(x )
Corresponding to the arguments nxxxx ,.....,, 321 respectively, where the intervals
x − x , x − x ,… . x − x need to be equal.
Definitions
The first divided difference of f(x) for the argumentsx ,x is defined by
f(x , x ) = ∆ f(x ) =
f(x ) − f(x )
x − x
It is also denoted by [x ,x ]
Similarly for arguments x 	and	x 		f(x ,x ) = ∆ f(x ) =
( ) ( )
and so on.
The second divided divided differences of f(x) for three arguments 210 ,, xxx
Is defined as
f(x , x , x ) = ∆ f(x ) =
f(x , x ) − f(x ,x )
x − x
The third divided difference of f(x) for the four arguments 3210 ,,, xxxx
Is defined as
f(x ,x , x ) =
f(x ,x , x ) − f(x , x , x )
x − x
And so on .
Representation by Divided difference table
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 49 Department of Mechanical Engineering
Arguments
x
Entryf(x) First Divided difference	∆ f(x) Second D-D
∆ f(x)
Third D-D
∆ f(x)
x
x
x
x
x
f(x )
f(x )
f(x )
f(x )
f(x )
f(x , x ) = ∆ f(x ) =
f(x ) − f(x )
x − x
f(x , x ) = ∆ f(x ) =
f(x ) − f(x )
x − x
f(x , x ) = ∆ f(x ) =
f(x ) − f(x )
x − x
f(x , x ) = ∆ f(x ) =
f(x ) − f(x )
x − x
f(x , x ,x )
f(x , x ,x )
f(x , x ,x )
f(x ,x ,x , x )
f(x ,x ,x , x )
Properties of divided difference
 The divided differences are symmetrical in all their arguments.
 The operator ∆ is linear.
 The nth
divided differences of a polynomial of nth
degree are constants.
Problems
1.If f(x) = find the divided difference f(a,b, c, d)(or)∆ ( )
Sol:
f(x) =
1
x
f(a) =
1
a
f(a,b) =
( ) ( )
= = −
f(a,b, c) =
f(b,c) − f(a,b)
c − a
= =
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 50 Department of Mechanical Engineering
f(a, b, c, d) =
f(b,c,d) − f(a,b,c)
d − a
=−
2.Find the third differences with arguments 2,4,9,10 for the function f(x) = x − 2x
Newton’s Divided difference Formula (Or) Newton’s Interpolation Formula for unequal
intervals
f(x) = f(x ) + (x − x )f(x ,x ) + (x − x )(x − x )f(x ,x ,x )
+ (x − x )(x − x )(x − x )f(x ,x ,x , x ) + ⋯ … … ….
Problems
1.Find the polynomial equation y = f(x) passing through(-1,3),(0,-
6),(3,39),(6,822),(7,1611)
Sol:
Given data
x -1 0 3 6 7
y 3 -6 39 822 1611
The divided difference table is given as follows
x f(x) ∆ f(x) ∆ f(x) ∆ f(x) ∆ f(x)
-1
0
3
6
7
3
-6
39
822
1611
-9
15
261
789
6
41
132
5
13
1
By Newton’s formula,
f(x) = f(x ) + (x − x )f(x ,x ) + (x − x )(x − x )f(x ,x ,x )
+ (x − x )(x − x )(x − x )f(x ,x ,x , x ) + ⋯ … … ….
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 51 Department of Mechanical Engineering
y = f(x) = 3 + (x + 1)(−9) + (x + 1)x(6) + (x + 1)x(x − 3)5
+ (x + 1)x(x − 3)(x − 6)1
y = x − 3x + 5x − 6
Is the required polynomial.
2. Given the data
Find the form of the function .Hence find f(3).
Ans:
f(3)=35
Interpolating with a cubic spline-cubic spline Interpolation:
We consider the problem of interpolation between given data points (xi, yi),
i=0, 1, 2, 3….n where a= bxxxx n  .....321 by means of a smooth polynomial
curve. By means of method of least squares, we can fit a polynomial but it is
appropriate.”Spline fitting” is the new technique recently developed to fit a smooth curve
passing he given set of points.
Definition of Cubic spline:
A cubic spline s(x) is defined by the following properties.
 S(xi)=yi,i=0,1,2,…..n
 S(x),s’(x),s”(x) are continuous on [a,b]
 S(x) is a cubic polynomial in each sub-interval(xi,xi+1),i=0,1,2,3…..n=1
Conditions for fitting spline fit:
The conditions for a cubic spline fit are that we pass a set of cubic through
the points, using a new cubic in each interval. Further it is required both the slope and the
curvature be the same for the pair of cubic that join at each point.
Natural cubic spline:
A cubic spline s(x) such that s(x) is linear in the intervals
),(),( 1  nxandx
i.e. s1=0 and sn=0 is called a natural cubic spline
where 1s =second derivative at ),( 11 yx
ns Second derivative at ),( nn yx
x 0 1 2 5
f(x) 2 3 12 147
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 52 Department of Mechanical Engineering
Note:
The three alternative choices used are
 01 s and 0ns i.e. the end cubics approach linearity at their extremities.
 121 ;  nn ssss i.e. the end cubics approaches parabolas at their extremities
 Take 1s as a linear extrapolation from 2s and nandss3 is a linear extrapolation from
21  nn andss .with the assumption, for a set of data that are fit by a single cubic
equation their cubic splines will all be this same cubic
 For equal intervals ,we have hhh ii 1 ,the equation becomes
]2[
6
4 11211   iiiiii yyy
h
sss for i=1,2,3,….n-1
Problems
1.Fit a natural cubic spline to the following data
x 1 2 3
y -8 -1 18
And compute (i) y(1.5) (ii) y’(1)
Solution:
Here n=2 ,the given data )18,3(),(),1,2(),(),8,1(),( 332211  yxyxyx
For cubic natural spline, 0&0 31  ss .The intervals are equally spaced.
For equally spaced intervals,the relation on 321 &, sss is given by
]2[
1
6
4 3212321 yyysss  ]1[ h
182 s
For the interval ]2[21 1  xxx ,the cubic spline is given by
111
2
11
3
11 )()()( dxxcxxbxxay 
The values of 1111 ,,, dcba are given by
]1[ ih11
21
121
1
1
12
1 ),
6
2
()(,
2
,
6
yd
ss
yyc
s
b
ss
a 




www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 53 Department of Mechanical Engineering
8,4,0,3 1111  dcba
The cubic spline for the interval 21  x is
8
45
)5.1()5.1(
8)14(4)1(3)( 3


sy
xxxs
The first derivative of s(x) is given by
)(
1
)2(
6
)( 11
1
ii
i
iii yy
h
ss
h
xs  
Taking i=1, )()2(
6
1
)1( 1221 yysss 
]1[ ih
4)1(  s
4)1(  y
We note that the tabulated function is 93
 xy and hence the actual values of )5.1(y and
)1(y
are respectively
8
45
 and 3.
2.The following values of x and y are given ,obtain the natural cubic spline which agree
with y(x) at the set of data points
x 2 3 4
y 11 49 123
Hence compute (i) y(2.5) and (ii) )2(y
Exercise:
1.Fit the following data by a cubic spline curve
x 0 1 2 3 4
y -8 -7 0 19 56
Using the end condition that 51 & ss are linear extrapolations.
2.Fit a natural cubic spline to 2
51
20
)(
x
xf

 on the interval [-2,-1].Use five equispaced
points of the function at x=-2(1)2.hence find y(1.5).
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 54 Department of Mechanical Engineering
4.4. Interpolation with equal intervals
(Newton’s Forward and Backward Difference formulas)
If a function y=f(x) is not known explicitly the value of y can be obtained when s
set of values of  ii yx , i=1,2,3….n are known by using methods based on the principles of
finite differences ,provided the function y=f(x) is continuous.
Assume that we have a table of values  ii yx , i=1,2,3….n of any function, the values of
x being equally spaced, niihxxei i ,....2,1,0,.,. 0 
Forward differences:
If nyyyy ,......,, 210 denote a set of values of y,then the first forward differences of
y=f(x) are defined by 11121010 .;.........;   nnn yyyyyyyyy
Where  is called the forward difference operator.
Backward differences:
The differences 01 yy  , 12 yy  ,……….. 1 nn yy are called first backward
differences and they are denoted by 9.2 ny
1122011 .;.........;  nnn yyyyyyyyy
Where  is called the backward difference operator.In similar way second, third and
higher order backward differences are defined.
........;.........; 344
2
233
2
122
2
yyyyyyyyy 
3
2
4
2
4
3
2
2
3
2
3
3
; yyyyyy  and so on.
Fundamental Finite Difference operators
Forward Difference operator  ( 010 yyy  )
If =f(x) then )()( xfhxfy 
Where h is the interval of differencing,
Backward Difference operator( 011 yyy  )
The operator  is defined by )()()( hxfxfxf 
Shift operator
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 55 Department of Mechanical Engineering
The shift operator is defined by 1 rr yEy
i.e the effect of E is to shift functional value ry to the next value 1ry .Also 2
2
 rr yyE
In general rnr
n
yyE 
The relation between  and E is given by
 1)(1 EorE
Also the relation between and E-1
is given by
1
1 
 E
Newton’s Forward Interpolation formula
Let y=f(x) be a function which takes the values nyyyy ,......,, 210
corresponding to the values nxxxx ,......,, 210 where the values of x are equally spaced.
i.e. niihxxi ,.......,2,1,0,0 
h
xx
p
ppp
y
pp
ypyyp
0
0
2
00 ...........
!3
)2)(1(
!2
)1(







This formula is called Newton-Gregory forward interpolation formula.
Newton’s Backward Interpolation formula
This formula is used for interpolating a value of y for given x near the end
of a table of values .Let nyyyy ,......,, 210 be the values of y =f(x) for nxxxxx ,......,, 210
where
niihxxi ,.......,2,1,0,0 
......
!3
)2)(1(
!2
)1(
)( 32




 nnnnn y
ppp
y
pp
ypyphxy
h
xx
p n

This formula is called Newton Backward interpolation formula.
We can also use this formula to extrapolate the values of y, a short distance ahead of yn.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 56 Department of Mechanical Engineering
Problems:
1.Using Newton’s Forward interpolation formula ,find f(1.02) from the following data
X 1.0 1.1 1.2 1.3 1.4
F(x) 0.841 0.891 0.932 0.964 0.985
Sol:
Forward difference table:
x )(xfy  y y2
 y3

1.0
1.1
1.2
1.3
1.4
0.841
0.891
0.932
0.964
0.985
0.050
0.041
0.032
0.021
-0.009
-0.009
-0.011
0
-0.002
009.0,050.0,841.0 0
2
00  yyy
Let 02.1&0.10  xx
h
xx
p 0

2.0 p
By Newton’s Forward interpolation formula,
.........
!2
)1(
)02.1( 0
2
00 

 y
pp
ypyy
=0.852
)02.1(y =0.852
2.Using Newton’s Forward interpolation formula, find the value of sin52 given that
.8660.060sin,8192.055sin,7660.050sin,7071.045sin 0000

Ans:0.7880
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 57 Department of Mechanical Engineering
3.Using Newton’s Backward interpolation formula, find y when x=27,from the following
data
x 10 15 20 25 30
y 35.4 32.2 29.1 26.0 23.1
Sol:
Backward difference table
x y y y2
 y3
 y4

10
15
20
25
30
35.4
32.2
29.1
26.0
23.1
-3.2
-3.1
-3.1
-2.9
0.1
0
0.2
-0.1
0.2
0.3
Here ,1.23,30  nn yx 9.2 ny ,2.02
 ny 2.03
 ny , 3.04
 ny
By Newton’s backward interpolation formula,
......
!3
)2)(1(
!2
)1(
)( 32




 nnnnn y
ppp
y
pp
ypyphxy
Here x=27,
h
xx
p n

6.0 p
y(27)=24.8
4.Find the cubic polynomial which takes the value y(0)=1,y(1)=0,y(2)=1,y(3)=10.Hence or
otherwise ,obtain y(4).
Ans:y(4)=33
Exercise:
1.Given the data
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 58 Department of Mechanical Engineering
X 0 1 2 3 4
Y 2 3 12 35 78
Find the cubic function of x,using Newton’s backward interpolation formula.
Ans: 2)( 23
 xxxxy
2.Using Newton’s Gregory backward formula, find 9.1
e from the following data
x 1.00 1.25 1.50 1.75 2.00
x
e 0.3679 0.2865 0.2231 0.1738 0.1353
Ans: 9.1
e =0.1496
3.Estimate exp(1.85) from the following table using Newton’s Forward interpolation
formula
x 1.7 1.8 1.9 2.0 2.1 2.2 2.3
x
e 5.474 6.050 6.686 7.839 8.166 9.025 9.974
Ans:6.3601
4.Find the polynomial which passes through the points (7,3)(8,1)(9,1)(10,9)using Newton’s
interpolation formula.
Tutorial Problems
Tutorial 1
1.Apply Lagrange’s formula inversely to obtain the root of the equation f(x)=0,given that
f(0)=-4,f(1)=1,f(3)=29,f(4)=52.
Ans: 0.8225
2.Using Lagrange’s formula of interpolation ,find y(9.5) given the data
X 7 8 9 10
Y 3 1 1 9
Ans: 3.625
3.Use Lagrange’s formula to find the value of y at x=6 from the following data
X 3 7 9 10
Y 168 120 72 63
Ans: 147
4.If log(300)=2.4771,log(304)=2.4829,log(305)=2.4843,log(307)=2.4871find log(301)
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 59 Department of Mechanical Engineering
Ans: 2.8746
5. Given Finduuuu ..15,33,9,6 7310  2u
Ans:9
Tutorial 2
1.Given the data
X 0 1 2 5
F(x) 2 3 12 147
Find the form of the function. Hence find f(3).
Ans:35
2.Find f(x) as a polynomial in powers of(x-5) given the following table
X 0 2 3 4 7 9
Y 4 26 58 112 466 922
Ans: 194)5(98)5(17)5()( 23
 xxxxf
3.from the following table,find f(5)
X 0 1 3 6
F(x) 1 4 88 1309
Ans:676
4.Fit the following data by a cubic spline curve
X 0 1 2 3 4
Y -8 -7 0 19 56
Using the end condition that s1 and s5 are linearextrapolations.
Ans:-8
5.Given the data
X 1 2 3 4
Y 0.5 0.333 0.25 0.20
Find y(2.5) using cubic spline function.
Ans:0.2829
Tutorial 3
1.from the following table,find the number of students who obtained less than 45 marks
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 60 Department of Mechanical Engineering
Marks 30-40 40-50 50-60 60-70 70-80
No of students 31 42 51 35 31
Ans:48
2.Find tan(0.26) from the following valuesof tanx for 30.010.0  x
X 0.10 0.15 0.20 0.25 0.30
Tanx 0.1003 0.1511 0.2027 0.2553 03093
Ans:0.2662
3.Using newton’s interpolation formula find (i) y when x=48 (ii) y when x=84 from the
following data
X 40 50 60 70 80 90
Y 184 204 226 250 276 304
Ans:199.84,286.96
4.Find the value of f(22) and f(42) from the following data
X 20 25 30 35 40 45
F(x) 354 332 291 260 231 204
Ans:352,219
5.Estimate 0
38sin from the following data given below
X 0 10 20 30 40
Sinx 0 0.1736 0.3240 0.5000 0.6428
Ans:12.7696
4.5. NUMERICAL DIFFERENTIATION AND INTEGRATION
Numerical differentiation is the process of computing the value of
, , … ..
For some particular value of x from the given data (xi,yi), i=1, 2, 3…..n where y=f(x) is not
known explicitly. The interpolation to be used depends on the particular value of x which
derivatives are required. If the values of x are not equally spaced, we represent the function
by Newton’s divided difference formula and the derivatives are obtained. If the values of x
are equally spaced, the derivatives are calculated by using Newton’s Forward or backward
interpolation formula. If the derivatives are required at a point near the beginning of the
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 61 Department of Mechanical Engineering
table, we use Newton’s Forward interpolation formula and if the derivatives are required at
a point near the end of table. We use backward interpolation formula.
Derivatives using divided differences
Principle
First fit a polynomial for the given data using Newton’s divided difference
interpolation formula and compute the derivatives for a given x.
Problems
1.Compute )4()5.3( fandf  given that f(0)=2,f(1)=3;f(2)=12 and f(5)=147
Sol:
Divided difference table
x f ∆ f f
2
1 f
3
1
0
1
2
5
2
3
12
147
1
9
45
4
9
1
Newton’s divided difference formula is
.......),,())((),()()()( 210101000  xxxfxxxxxxfxxxfxf
Here ,2)(,2;,1;0 0210  xfxxx ),( 10 xxf =1, 1),,,(;4),,( 3210210  xxxxfxxxf
2)( 23
 xxxxf
26)(
123)( 2


xxf
xxxf
.26)4(,75.42)5.3(  ff
2.Find the values )5()5( fandf  using the following data
X 0 2 3 4 7 9
F(x) 4 26 58 112 466 22
Ans: 98 and 34.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 62 Department of Mechanical Engineering
Exercise
Derivatives using Finite differences
Newton’s Forward difference Formula
........]..........
2
3
[
1
........]
12
11
[
1
.......]
432
[
1
0
4
0
3
33
3
0
4
0
3
0
2
22
2
0
4
0
3
0
2
0
0
0
0



























yy
hdx
yd
yyy
hdx
yd
yyy
y
hdx
dy
xx
xx
xx
Newton’s Backward difference formula
........]..........
2
3
[
1
...]..........
12
11
[
1
]..........
432
[
1
43
33
3
432
22
2
432



























nn
xx
nnn
xx
nnn
n
xx
yy
hdx
yd
yyy
hdx
yd
yyy
y
hdx
dy
n
n
n
Problems
1.Find the first two derivatives of y at x=54 from the following data
x 50 51 52 53 54
y 3.6840 3.7083 3.7325 3.7563 3.7798
Sol:
Difference table
x y y y2
 y3
 y4

50
51
52
53
3.6840
3.7083
3.7325
3.7563
0.0244
0.0241
0.0238
0.0235
-0.0003
-0.0003
-0.0003
0
0
0
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 63 Department of Mechanical Engineering
54 3.7798
By Newton’s Backward difference formula
]..........
432
[
1 432













nnn
n
xx
yyy
y
hdx
dy
n
Here h=1; ny =0.0235; 0003.02
 ny
02335.0
54






xdx
dy
............
12
11
[
1 432
2
54
2
2







nnn
x
yyy
hdx
yd
=-0.0003
2.Find first and second derivatives of the function at the point x=12 from the following data
x 1 2 3 4 5
y 0 1 5 6 8
Sol:
Difference table
X y y y2
 y3
 y4

1
2
3
4
0
1
5
6
1
4
1
2
3
-3
1
-6
4
10
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 64 Department of Mechanical Engineering
5 8
We shall use Newton’s forward formula to compute the derivatives since x=1.2 is at the
beginning.
For non-tabular value phxx  0 ,we have
.......
12
31192
6
263
2
12
[
1
0
4
23
0
3
2
0
2
0 





 y
ppp
y
pp
y
p
y
hdx
dy
Here 0x =1, h=1, x=1.2
2.0
0



p
h
xx
p
17.14
773.1
2.1
2
2
2.1














x
x
dx
yd
dx
dy
Exercise:
1.Find the value of 0
31sec using the following data
X 31 32 33 34
Tanx 0.6008 0.6249 0.6494 0.6745
Ans:1.1718
2.Find the minimum value of y from the following table using numerical differentiation
X 0.60 0.65 0.70 0.75
Y 0.6221 0.6155 0.6138 0.6170
Ans: minimum y=0.6137
Numerical integration
(Trapezoidal rule & Simpson’s rules ,Romberg integration)
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 65 Department of Mechanical Engineering
The process of computing the value of a definite integral ∫ ydx from a set of
values (xi,yi),i=0,1,2,….. Where 0x =a; bxn  of the function y=f(x) is called Numerical
integration.
Here the function y is replaced by an interpolation formula involving finite differences and
then integrated between the limits a and b, the value∫ ydx is found.
General Quadrature formula for equidistant ordinates
(Newton cote’s formula)
On simplification we obtain
.......]
24
)2(
12
)32(
2
[ 0
3
2
0
2
00
0




 y
nn
y
nn
y
n
ynhydx
nx
x
This is the general Quadrature formula
By putting n=1, Trapezoidal rule is obtained
By putting n=2, Simpson’s 1/3 rule is derived
By putting n=3, Simpson’s 3/8 rule is derived.
Note:
The error in Trapezoidal rule is of order h2
and the total error E is given by E =
−
( )
h y”((x)) is the largest of y ….
Simpson’s 1/3 rule
)]......(2)......(4)[(
3
264215310
0
  n
x
x
nn yyyyyyyyyy
h
ydx
n
Error in Simpson’s 1/3 rule
The Truncation error in Simpson’s 13 rule is of order h4
and the total error is given by
)()(
180
)( 4
xwhereyxyh
ab
E iviv
 is the largest of the fourth derivatives.
Simpson’s 3/8 rule
......)](2......)(3)[(
8
3
9634210
0
 yyyyyyyy
h
ydx
nx
x
n
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 66 Department of Mechanical Engineering
Note:
The Error of this formula is of order h5
and the dominant term in the error is given by
)(
80
3 5
xyh iv

Problems
1.Evaluate 

0
sin xdx by dividing the interval into 8 strips using (i) Trapezoidal rule
(ii) Simpson’s 1/3 rule
Sol:
For 8 strips ,the values of y=sinx are tabulated as follows :
X 0
8

4

8
3
2

8
5
4
3
8
7 
Sinx 0 0.3827 0.7071 0.9239 1 0.9239 0.7071 0.3827 0
(i)Trapezoidal rule


0
sin xdx = ]2)9239.07071.03827.0(4[
16


=1.97425
(ii)Simpson’s 1/3 rule


0
sin xdx = )]7071.017071.0(2)03827923.023.03827.0(4[
24


=2.0003
2.Find  
1
0
2
1 x
dx
by using Simpsons 1/3 and 3/8 rule. Hence obtain the approximate value
of π in each case.
Sol:
We divide the range (0,1) into six equal parts, each of size h=1/6.The values of
2
1
1
x
y


at each point of subdivision are as follows.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 67 Department of Mechanical Engineering
X 0 1/6 2/6 3/6 4/6 5/6 1
Y 1 0.9730 0.9 0.8 0.623 0.5902 0.5
By Simpson’s 1/3 rule,
)](2)(4)[(
31
4253160
1
0
2
yyyyyyy
h
x
dx


)]5923.1(2)3632.2(45.1[
18
1

=0.7854 (1)
By Simpson’s 3/8 rule,
]2)(3)[(
8
3
1
3542160
1
0
2
yyyyyyy
h
x
dx


]6.1)1555.3(35.1[
16
1

=0.7854 (2)
But
)0(tan)1(tan)(tan
1
111
0
1
1
0
2


 x
x
dx
=
From equation (1) and (2), we have = 0.7854
π=3.1416
Exercise:
1.Evaluate dxe x


2.1
0
2
using (i) Simpson’s 1/3 rule (ii) Simpson’s 3/8 rule ,taking h=0.2
Ans:
(i) dxe x


2.1
0
2
=0.80675 (ii) dxe x


2.1
0
2
=0.80674
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 68 Department of Mechanical Engineering
Unit- 5
Numerical Solution of ordinary Differential equations
Taylor’s series method
5.1.Introduction
The solution to a differential equation is to function that satisfies the differential
equation and that also satisfies certain initial conditions on the function.
The solution of this differential equation involves n constants and these constants are
determined with help of n conditions.
Single step methods:
In these methods we use information about the curve at one point and we do
not iterate the solution. The method involves more evaluation of the function. We will
discuss the Numerical solution by Taylor series method, Euler methods and Runge - Kutta
methods all require the information at a single point x=x0.
Multi step methods:
These methods required fewer evaluations of the functions to estimate the
solution at a point and iteration are performed till sufficient accuracy is achieved.
Estimation of error is possible and the methods are called Predictor-corrector methods. In
this type we mainly discuss Milne’s and Adams-Bashforth method.
In the multi step method , to compute yn+1,we need the functional values yn,yn-1, yn-2 and yn-3.
5.2 Taylor Series method
Consider the first order differential equation 00 )(),,( yxyyxf
dx
dy

……(1)
The solution of the above initial value problem is obtained in two types
 Power series solution
 Point wise solution
(i) Power series solution
y(x) = y + !
y +
( )
!
y +
( )
!
y +……. (2)
Where r
r
r
dx
yd
y 
)(
0 at(x , y )
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 69 Department of Mechanical Engineering
Using equation (1) the derivatives y ,y ,y , … … can be found by means of successive
differentiations .Expressions (2) gives the value for every value of x for which (2)
converges.
(ii)Point wise solution
y =y +
!1
h
y + !
y + !
y +…
Where r
r
r
m
dx
yd
y 
)(
at (x , y )
Where m=0,1,2,…….
Problems:
1. Using Taylor series method find y at x=0.1 if
dx
dy
=x y-1,y(0)=1.
Solution:
Given y =x y-1 and x =0,y =1,h=1
Taylor series formula for y is
y =y +
!1
h
y + !
y + !
y +…
y =x y-1 y =x y − 1=0-1=-1
y =2xy+x y y = 2x y +x y =0+0=0
y =[xy + y]+x y +2xy
=2xy +2y+x y +2xy
=2y+ 4xy +x y
y =2y +4x y +x y
=2(1)+4(0)(-1)+(0 )(0)
=2
y =2y +4[xy + y ]+x y +y 2x
=2y +4xy +4y +x y +y 2x
=6y + 6xy +x y
y =6y +6x y +x y
=6(-1)+6(0)(0)+(0)(2)
=-6
(1)	y =1+
.
!
(-1)+
( . )
!
(0)+
( . )
!
(2)+
( . )
!
(−6)+…
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 70 Department of Mechanical Engineering
Y(0.1)=1-(0.1)+
( . )
−
( . )
+…
=1-0.1+0.00033-0.000025=0.900305
2. Find the Taylor series solution with three terms for the initial value
problem. =x +y,y(1)=1.
Solution:
Given y =x +y,	x =1,	y =1.
y =x +y y =x +y =1+1=2
y =3x +y y = 3x +y
=3(1)+2
=5
y =6x+y y =6x +y
=6(1)+5
=11
Taylor series formula
Y=y +
!
y +
( )
!
y +
( )
!
y +…….
=1+(x-1)(2)+	
( )
!
(5)+	
( )
!
(11)(app)
=1+2(x-1)+ (x − 1) + (x − 1)
Exercise:
1.Find y(0.2),y(0.4) given =xy +1,y(0)=1
[Ans:-1.226,1.5421 ]
2.Find y(0.1) given y =x y-1,y(0)=1
[Ans:- 0.9003 ]
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 71 Department of Mechanical Engineering
5.3.Euler’s Method:
1.using Euler’s method compute y in the range 0≤ x ≤ 0.5 if y satisfies
=3x+y ,y(0)=1.
Solution:
Here f(x,y) = 3x+y ,	x =0,	y =1
By Euler’s method
y = y +f(x ,y ),n=0,1,2,3,…… (1)
Choosing h=0.1, we compute the value of y using (1)
y = y +f(x ,y ),n=0,1,2,3,……
y(0.1) = y =y +hf(x ,y )=1+(0.1)[3(0)+(1) ] =1.1
y(0.2) = y =y +hf(x ,y )=1.1+(0.1)[0.3+(1.1) ] =1.251
y(0.3) = y =y +hf(x , y )=1.251+(0.1)[0.6+(1.251) ] =1.4675
y(0.4) = y =y +hf(x ,y )=1.4675+(0.1)[0.9+(1.4675) ] =1.7728
y(05) = y =y +hf(x , y )=1.7728+(0.1)[1.2+(1.7728) ] =2.2071
MODIFIED EULER’S METHOD:
1. Given =-xy , y(0)=2. Using Euler’s modified method, find y(0.2)in two steps of 0.1
each.
Solution:
Let 	x =	x +h. here 	x = 0,		y = 2 and h=0.1
The value of y at x=	x is 	y
By modified Euler method,
y
( )
= 	y +hf(	x , 	y )
	y = 	y + [f(	x , 	y ) + f(	x , y
( )
)]
Here f(x,y) = -xy
f(	x , 	y )= -	x , y =0
y
( )
=2+(0.1)(0)=2
	y =2+
.
[f(0,2)+f(0.1,2)]
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 72 Department of Mechanical Engineering
=2+0.05[0+(-0.1)(4)]
	y =1.98
Y(0.1)=1.98
To find y(0.2)
y
( )
= 	y + hf(	x , 	y )
=1.98 –(0.1)(0.1)(1.98)=1.9602
	y = 	y + [f(	x , 	y ) + f(	x ,y
( )
)]
=1.9602-(0.05)[(0.198)+(0.39204)]
	y = 1.9307
Hence y(0.2)=1.9307
5.4.Runge-kutta method
The Taylor’s series method of solving differential equations numerically is
restricted because of the evaluation of the higher order derivatives.Runge-kutta methods of
solving intial value problems do not require the calculations of higher order derivatives and
give greater accuracy.The Runge-Kutta formula posses the advantage of requiring only the
function values at some selected points.These methods agree with Taylor series solutions
upto the term in hr
where r is called the order of that method.
Fourth-order Runge-Kutta method
This only is commonly used for solving initial values problem
00 )(),,( yxyyxf
dx
dy

Solution of Boundary value problems in ODE
The solution of a differential equation of second order of the form
0),,,(  yyyxF contains two arbitrary constants. These constants are determined by
means of two conditions. The conditions on y and 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.
In this chapter ,we consider the finite difference method of solving linear boundary value
problems of the form.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 73 Department of Mechanical Engineering
5.5.Finite difference approximations to derivatives
First derivative approximations
)(
)()(
)( hO
h
xyhxy
xy 

 (Forward difference)
)(
)()(
)( hO
h
hxyxy
xy 

 (Backward difference)
)(
2
)()(
)( 2
hO
h
xhyhxy
xy 

 (Central difference)
Second derivative approximations
)(
)()(2)(
)( 2
2
hO
h
hxyxyhxy
xy 

 (Central difference)
Third derivative approximations
]22[
2
1
)( 21123   iiii
iii
yyyy
h
xy
Fourth derivative approximations
]464[
1
)( 21124   iiiii
iv
yyyyy
h
xy
Solution of ordinary differential equations of Second order
h
yy
y ii
i
2
11  


2
11 2
h
yyy
y iii
i
 


Problems
1. Solve 2)2(,1)1(,0  yyyyx with h=0. And h=0.25 by using finite difference
method.
Sol:
(i) Divide the interval[1,2] into two sub-intervals with h=(2-1)/2=0.5
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 74 Department of Mechanical Engineering
X0=1 x1=1.5 x2=2
Let hxx ii 1 ,
Here 2,5.1,1 210  xxx
By Boundary conditions are 2)2(,1)1(  yy
2,1 20  yy
We have to determine 1y for 1x =1.5
Replacing the derivative y  by 2
11 2
h
yyy
y iii  

 0]2[ 112
  iiii
i
yyyy
h
x
(1)
Put i=1 we get 0]2[4 12101  yyyyx
Using 1x =1.5, 2,1 20  yy we get,
11
18
1 y
y(1.5)=1.6364
(ii) With h=0.25 ,we have the number of intervals =4
X0=1 x1=1.25 x2=1.5 x3=1.75
x4=2
By boundary condition, 2,1 40  yy
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 75 Department of Mechanical Engineering
We find the unknown from the relation,
....3,2,1,0)2(16 11   iyyyyx iiiii (2)
Put i=1 in (2), 202039 21  yy
Put i=2 in (2), 0244728 321  yyy
Put i=3 in (2), 0565528 32  yy
We have the system of equations ,
202039 21  yy
0244728 321  yyy
565528 32  yy
Solution of Gauss-Elimination method
																																																						( ⁄ )=	
−
−
−
	
−
~
− .
− .
− .
.
−
→ , → , →
~
− .
− .
− .
.
− .
−
→ −
~
− .
− .
− .
.
− .
− .
→ + .
The equivalent system is
403.3838.1
513.0445.1
513.0513.0
3
32
21



y
yy
yy
By back substitution, the solution is 851.13 y , 635.12 y , 351.11 y
Hence y(1.25)=1.351,y(1.5)=1.635,y(1.75)=1.851
www.Vidyarthiplus.com
www.Vidyarthiplus.com
KIT
MA6452 STATISTICS AND NUMERICAL METHODS
SCE 76 Department of Mechanical Engineering
Exercise:
1. Solve by finite difference method, the boundary value problem 02
2
 y
dx
yd
with y
(0) =0 and y (2) =4.
Ans: 3583.23 y , 3061.12 y , 5805.01 y
2. Solve 1)2(0)1(,0  andyyyyx with h=0.5
www.Vidyarthiplus.com
www.Vidyarthiplus.com

More Related Content

What's hot

FIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement AlgorithmFIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement AlgorithmArijitRoy118
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisJaclyn Kokx
 
Data Visualization and Dashboard Design
Data Visualization and Dashboard DesignData Visualization and Dashboard Design
Data Visualization and Dashboard DesignJacques Warren
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithmsPiyush Rochwani
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashingsathish sak
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regressiondessybudiyanti
 
Independent Component Analysis
Independent Component Analysis Independent Component Analysis
Independent Component Analysis Ibrahim Amer
 
Regression Analysis Poster
Regression Analysis PosterRegression Analysis Poster
Regression Analysis PosterCindy Villamil
 
Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSSLNIPE
 
Data Stream Management
Data Stream ManagementData Stream Management
Data Stream Managementk_tauhid
 
Overview of the Possibilities of Quantitative Methods in Political Science
Overview of the Possibilities of Quantitative Methods in Political ScienceOverview of the Possibilities of Quantitative Methods in Political Science
Overview of the Possibilities of Quantitative Methods in Political Scienceenvironmentalconflicts
 
System Analysis and Design 6th edition chapter 14
System Analysis and Design 6th edition chapter 14System Analysis and Design 6th edition chapter 14
System Analysis and Design 6th edition chapter 14Matthew McKenzie
 
Computer Graphics C Version - Hearn & Baker.pdf
Computer Graphics C Version - Hearn & Baker.pdfComputer Graphics C Version - Hearn & Baker.pdf
Computer Graphics C Version - Hearn & Baker.pdfSUSHIL KUMAR
 

What's hot (20)

FIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement AlgorithmFIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement Algorithm
 
CO Module 5
CO Module 5CO Module 5
CO Module 5
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant Analysis
 
Data Visualization and Dashboard Design
Data Visualization and Dashboard DesignData Visualization and Dashboard Design
Data Visualization and Dashboard Design
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashing
 
OLAP
OLAPOLAP
OLAP
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regression
 
Independent Component Analysis
Independent Component Analysis Independent Component Analysis
Independent Component Analysis
 
Rough K Means - Numerical Example
Rough K Means - Numerical ExampleRough K Means - Numerical Example
Rough K Means - Numerical Example
 
Regression Analysis Poster
Regression Analysis PosterRegression Analysis Poster
Regression Analysis Poster
 
Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSS
 
Data Stream Management
Data Stream ManagementData Stream Management
Data Stream Management
 
Overview of the Possibilities of Quantitative Methods in Political Science
Overview of the Possibilities of Quantitative Methods in Political ScienceOverview of the Possibilities of Quantitative Methods in Political Science
Overview of the Possibilities of Quantitative Methods in Political Science
 
Status register
Status registerStatus register
Status register
 
Correlation analysis
Correlation analysis Correlation analysis
Correlation analysis
 
System Analysis and Design 6th edition chapter 14
System Analysis and Design 6th edition chapter 14System Analysis and Design 6th edition chapter 14
System Analysis and Design 6th edition chapter 14
 
Computer Graphics C Version - Hearn & Baker.pdf
Computer Graphics C Version - Hearn & Baker.pdfComputer Graphics C Version - Hearn & Baker.pdf
Computer Graphics C Version - Hearn & Baker.pdf
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 

Similar to Mech ma6452 snm_notes

Mb0040 statistics for management
Mb0040   statistics for managementMb0040   statistics for management
Mb0040 statistics for managementsmumbahelp
 
RESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATA
RESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATARESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATA
RESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATAorajjournal
 
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docxmercysuttle
 
1. A law firm wants to determine the trend in its annual billings .docx
1. A law firm wants to determine the trend in its annual billings .docx1. A law firm wants to determine the trend in its annual billings .docx
1. A law firm wants to determine the trend in its annual billings .docxmonicafrancis71118
 
General Factor Factorial Design
General Factor Factorial DesignGeneral Factor Factorial Design
General Factor Factorial DesignNoraziah Ismail
 
Descriptive Statistics Formula Sheet Sample Populatio.docx
Descriptive Statistics Formula Sheet    Sample Populatio.docxDescriptive Statistics Formula Sheet    Sample Populatio.docx
Descriptive Statistics Formula Sheet Sample Populatio.docxsimonithomas47935
 
Anova by Hazilah Mohd Amin
Anova by Hazilah Mohd AminAnova by Hazilah Mohd Amin
Anova by Hazilah Mohd AminHazilahMohd
 
Week8 livelecture2010
Week8 livelecture2010Week8 livelecture2010
Week8 livelecture2010Brent Heard
 
Week8 Live Lecture for Final Exam
Week8 Live Lecture for Final ExamWeek8 Live Lecture for Final Exam
Week8 Live Lecture for Final ExamBrent Heard
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptxmahamoh6
 

Similar to Mech ma6452 snm_notes (20)

Factorial Experiments
Factorial ExperimentsFactorial Experiments
Factorial Experiments
 
Chapter07.pdf
Chapter07.pdfChapter07.pdf
Chapter07.pdf
 
Mb0040 statistics for management
Mb0040   statistics for managementMb0040   statistics for management
Mb0040 statistics for management
 
RESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATA
RESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATARESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATA
RESIDUALS AND INFLUENCE IN NONLINEAR REGRESSION FOR REPEATED MEASUREMENT DATA
 
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx1  FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docx
 
1. A law firm wants to determine the trend in its annual billings .docx
1. A law firm wants to determine the trend in its annual billings .docx1. A law firm wants to determine the trend in its annual billings .docx
1. A law firm wants to determine the trend in its annual billings .docx
 
General Factor Factorial Design
General Factor Factorial DesignGeneral Factor Factorial Design
General Factor Factorial Design
 
Descriptive Statistics Formula Sheet Sample Populatio.docx
Descriptive Statistics Formula Sheet    Sample Populatio.docxDescriptive Statistics Formula Sheet    Sample Populatio.docx
Descriptive Statistics Formula Sheet Sample Populatio.docx
 
Anova by Hazilah Mohd Amin
Anova by Hazilah Mohd AminAnova by Hazilah Mohd Amin
Anova by Hazilah Mohd Amin
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
 
Week8 livelecture2010
Week8 livelecture2010Week8 livelecture2010
Week8 livelecture2010
 
f and t test
f and t testf and t test
f and t test
 
One-Way ANOVA
One-Way ANOVAOne-Way ANOVA
One-Way ANOVA
 
Anova.ppt
Anova.pptAnova.ppt
Anova.ppt
 
Week8 Live Lecture for Final Exam
Week8 Live Lecture for Final ExamWeek8 Live Lecture for Final Exam
Week8 Live Lecture for Final Exam
 
Design of experiments(
Design of experiments(Design of experiments(
Design of experiments(
 
ANOVA.pptx
ANOVA.pptxANOVA.pptx
ANOVA.pptx
 
SNM-1.pdf
SNM-1.pdfSNM-1.pdf
SNM-1.pdf
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 

More from KIT-Kalaignar Karunanidhi Institute of Technology

More from KIT-Kalaignar Karunanidhi Institute of Technology (20)

Unit 1 automotive engine auxiliary systems
Unit 1 automotive engine auxiliary systemsUnit 1 automotive engine auxiliary systems
Unit 1 automotive engine auxiliary systems
 
Unconventional machining processes
Unconventional machining processesUnconventional machining processes
Unconventional machining processes
 
TOTAL QUALITY MANAGEMENT
TOTAL QUALITY MANAGEMENTTOTAL QUALITY MANAGEMENT
TOTAL QUALITY MANAGEMENT
 
PROCESS PLANNING AND COST ESTIMATION
PROCESS PLANNING AND COST ESTIMATIONPROCESS PLANNING AND COST ESTIMATION
PROCESS PLANNING AND COST ESTIMATION
 
INTRODUCTION TO ROBOTICS
INTRODUCTION TO ROBOTICSINTRODUCTION TO ROBOTICS
INTRODUCTION TO ROBOTICS
 
Cmm
CmmCmm
Cmm
 
Basic of metrology
Basic of metrology Basic of metrology
Basic of metrology
 
ME6403 - ENGINEERING MATERIALS AND METALLURGY BY Mr.ARIVUMANI RAVANAN /AP/MEC...
ME6403 - ENGINEERING MATERIALS AND METALLURGY BY Mr.ARIVUMANI RAVANAN /AP/MEC...ME6403 - ENGINEERING MATERIALS AND METALLURGY BY Mr.ARIVUMANI RAVANAN /AP/MEC...
ME6403 - ENGINEERING MATERIALS AND METALLURGY BY Mr.ARIVUMANI RAVANAN /AP/MEC...
 
ME6302 MANUFACTURING TECHNOLOGY – I BY Mr.K.SIVAKUMAR /AP/MECH/KIT/CBE
ME6302 MANUFACTURING TECHNOLOGY – I BY Mr.K.SIVAKUMAR /AP/MECH/KIT/CBEME6302 MANUFACTURING TECHNOLOGY – I BY Mr.K.SIVAKUMAR /AP/MECH/KIT/CBE
ME6302 MANUFACTURING TECHNOLOGY – I BY Mr.K.SIVAKUMAR /AP/MECH/KIT/CBE
 
ME2036- ENGINEERING THERMODYNAMICS BY Mr.P.SATHISH
ME2036- ENGINEERING THERMODYNAMICS BY Mr.P.SATHISHME2036- ENGINEERING THERMODYNAMICS BY Mr.P.SATHISH
ME2036- ENGINEERING THERMODYNAMICS BY Mr.P.SATHISH
 
ME2041 ADVANCED I.C. ENGINES BY Mr.P.BALAKRISHNAN/AP/MECH/KIT/CBE
ME2041 ADVANCED I.C. ENGINES BY Mr.P.BALAKRISHNAN/AP/MECH/KIT/CBEME2041 ADVANCED I.C. ENGINES BY Mr.P.BALAKRISHNAN/AP/MECH/KIT/CBE
ME2041 ADVANCED I.C. ENGINES BY Mr.P.BALAKRISHNAN/AP/MECH/KIT/CBE
 
ME6004 - UNCONVENTIONAL MACHINING PROCESS BY Mr.P.HARIPRASAD/AP/MECH/KIT/CBE
ME6004 - UNCONVENTIONAL MACHINING PROCESS BY Mr.P.HARIPRASAD/AP/MECH/KIT/CBEME6004 - UNCONVENTIONAL MACHINING PROCESS BY Mr.P.HARIPRASAD/AP/MECH/KIT/CBE
ME6004 - UNCONVENTIONAL MACHINING PROCESS BY Mr.P.HARIPRASAD/AP/MECH/KIT/CBE
 
ME 2029 - DESIGN OF JIGS AND FIXTURES NOTES BY Mr.K.SATHISHKUMAR/AP/MECH/KIT/CBE
ME 2029 - DESIGN OF JIGS AND FIXTURES NOTES BY Mr.K.SATHISHKUMAR/AP/MECH/KIT/CBEME 2029 - DESIGN OF JIGS AND FIXTURES NOTES BY Mr.K.SATHISHKUMAR/AP/MECH/KIT/CBE
ME 2029 - DESIGN OF JIGS AND FIXTURES NOTES BY Mr.K.SATHISHKUMAR/AP/MECH/KIT/CBE
 
Mech MA6351 tpde_notes
Mech MA6351 tpde_notes Mech MA6351 tpde_notes
Mech MA6351 tpde_notes
 
Mech GE6351 ESE_notes
Mech GE6351 ESE_notesMech GE6351 ESE_notes
Mech GE6351 ESE_notes
 
Mech GE6075 PEE_notes
Mech GE6075 PEE_notesMech GE6075 PEE_notes
Mech GE6075 PEE_notes
 
Mech EE6365 EE lab_manual
Mech EE6365 EE lab_manualMech EE6365 EE lab_manual
Mech EE6365 EE lab_manual
 
Mech EE6351 EDC_notes
Mech EE6351 EDC_notesMech EE6351 EDC_notes
Mech EE6351 EDC_notes
 
Mech CE6461 FMM lab_manual
Mech CE6461 FMM lab_manualMech CE6461 FMM lab_manual
Mech CE6461 FMM lab_manual
 
Mech CE6451 fmm_notes
Mech CE6451 fmm_notesMech CE6451 fmm_notes
Mech CE6451 fmm_notes
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

Mech ma6452 snm_notes

  • 1. KIT MA6452 STATISTICS AND NUMERICAL METHODS 6 SCE Department of Mechanical Engineering Unit-I Testing of Hypothesis 1.1.Introduction: A statistical hypothesis is an assertion or conjecture concerning one or more populations. To prove that a hypothesis is true, or false, with absolute certainty, we would need absolute knowledge. That is, we would have to examine the entire population. Instead, hypothesis testing concerns on how to use a random sample to judge if it is evidence that supports or not the hypothesis. Hypothesis testing: Hypothesis testing is formulated in terms of two hypotheses: • H0 : the null hypothesis; • H1 : the alternate hypothesis. Types of error: Because we are making a decision based on a finite sample, there is a possibility that we will make mistakes. The possible outcomes are: H0 is true H1 is true Do not Correct Type II reject H0 Decision error Reject H0 Type I Correct Error Decision 1.2.Sampling Distribution: There are two types of samples in Testing of Hypothesis i) Small Sample (n <30) ii) Large Sample (n >30) Small Sample: (n <30) Type 1:Student’s ‘t’ test Single Mean (S.D given directly) Single Mean (S.D is not given directly) Difference of Means Type 2: F – test Type 3: Chi-Square test Goodness of fit Large Sample: (n >30) Type 1: Single Mean Type 2: Single Proportion www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 2. KIT MA6452 STATISTICS AND NUMERICAL METHODS 7 SCE Department of Mechanical Engineering Type 3: Difference of Mean Type 4: Difference of Proportion Problems: 1.A Random sample of 25cups from a certain coffee dispensing machine yields a mean x=6.9ounces per cup.Use a=0.05level of against the null hypothesis that, on the average, machine dispense µ˂7 ounces. Assume that the distribution of ounces per cup is normal, and that the variance is the known quantity σ2 =0.01 ounces. Sol: Given: n-25,x = 6.9 µo = 7,σ2 = 0.01, s = σ = 0.1 1.parameter of interest is µ. 2.Ho:µ=7.0 3.H1:µ˂7.0 4.significanc level a=0.05 5.The test statistic is z= ̅ µ /√ . 6.Reject Ho if |z|˃1.645 at *a=0.05 7.Compensation Z = . [ . √ ] = (-0.1)( . ) = -5 Conclusion: Here |z|=5˃1.645 Hence reject to HO: µ=7. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 3. KIT MA6452 STATISTICS AND NUMERICAL METHODS 8 SCE Department of Mechanical Engineering 1.3.Normal Distribution: The test statistic is z= ̅ µ /√ . Problems: 1. An insurance agent has claimed that the average age of policy holders who insure through him is less than the average for all agents which is 30.5years.A random sample of 100 policy holders who had insured through him reveal that hte mean and s.d are 28.8 years and 6.35 years respectively.Test his claim at 5% level of significance> Solution: N=100,m0=30.5,x=28.8,σ=s=6.35. 1.parameter of interest is µ 2.H0:=:µ=30.5 3.H1:µ˂30.5 4.a=0.05 5.The test statistic is Z = ̅ µ /√ . 6.Reject H0 is|z|˃1.645 7.Computations: Z= ( . )( ) . |z|=2.68 Conclusion: |z|=2.68˃1.645. Hence reject H0:µ=30.5 Hence the claim of the agent is valid. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 4. KIT MA6452 STATISTICS AND NUMERICAL METHODS 9 SCE Department of Mechanical Engineering 2.A study shows that 16 out of 200 tractors produced on one αshipped,while the same was true for 14 out of 400 tractors produced on another assembly line. At the 0.01 level of significance,doesthis support the claim that the second production line does support work? r1=200 n2=400 P1= =0.08 P2= =0.035 P= = ( )( . ) ( )( . ) = 0.05 q = 1-p = 1-0.05 = 0.95 1.H0: p1 = p2 2.H1: p1≠p2 3.α = 0.01,table z = 2.58 4.Calculate z Z = Z = . . = 2.36 Cal z< tab Z Accept Ho. 1.4.Students-t- Distribution: Z= Problems: 1.Two horses A and B were tested according to the time (in seconds) to run a particular race with the following results Horse A 28 30 32 33 33 29 34 Horse B 29 30 30 24 27 29 Test whether horse A is running faster than B at 5% level. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 5. KIT MA6452 STATISTICS AND NUMERICAL METHODS 10 SCE Department of Mechanical Engineering Solution: Given: =7, =6 28 784 29 841 30 900 30 900 32 1024 30 900 33 1089 24 576 33 1089 27 729 29 841 29 841 34 1156 219 6883 169 4787 S2 = = ( . ) ( . ) = . . = 5.03 1.the parameter of interest is µ and µ 2.H0= µ = µ [there is no significant difference] = ∑ = = 31.29 ; = ∑ = = 28.17 = ∑ -( ) = - 31.292 = 4.23, = ∑ -( ) = - 28.172 = 4.28 3.H0= µ >µ [keyword A faster than B] 4.α = 0.05,d.f = n1+n2-2 = 7+6-2 =11 5.The test statistic is t = 6.Reject H0 if |t|>1.796[from table ‘t’ we get t = 1.796] 7.Computations: t = . . . = 2.498 8.Conclusion: Since |t|=2.498>1.796,so we reject H0 at 5% level of significance Hence there is a significant difference between the two samples. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 6. KIT MA6452 STATISTICS AND NUMERICAL METHODS 11 SCE Department of Mechanical Engineering 1.5. CHI-SQUARE DISTRIBUTION: Goodness of fit: The test statistic is ℵ = ∑ ( ) Where O – Observed frequency, E – Expected frequency Problems: 1.The following data are collected on two characters. Smokers Non-Smokers Literaters: 83 57 Illiterates: 45 68 Based on this,can you say that there is no relation between smoking and literacy? Solution: 1.The parameter of interest is ℵ 2.Ho :No relation between smoking and literacy. 3.H1: There is a relation between both 4.α = 0.05,d.f = (r-1)(s-1) = (2-1)(2-1) = 1 5.The test statistic is ℵ = ( ) ( ) ( )( )( )( ) 6.Reject H0 if ℵ >3.84 7.Computation ℵ = [( )( ) ( )( ) [ ] ( )( )( )( ) = = 9.4758 ℵ =9.48 8.Conclution: Since ℵ =9.48>3.84 Hence we reject H0 at 5% level of significance. There is some association between literacy and smoking. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 7. KIT MA6452 STATISTICS AND NUMERICAL METHODS 12 SCE Department of Mechanical Engineering 1.6. F-DISTRIBUTION: F = , = , = Problems: 1.Two random samples drawn from two normal populations are given below: Sample I: 24 27 26 21 25 Sample II: 27 30 32 36 28 23 Test if the two populations have the same variance. Solution: Given n1=5, n2=6 X1 X2 24 576 27 729 27 729 30 900 26 676 32 1024 21 441 36 1296 25 625 28 784 23 529 123 3047 176 5262 = = 24.6 , = = 29.33 = ∑ -( )2 = -(24.6)2 = 609.4-605.16 = 4.24 = ∑ -( )2 = -(29.33)2 = 16.7511 = = ( )( . ) = 5.3, = = ( )( . ) = 20.10 > H0: = , H1: ≠ Α=5%=0.05 d.f :v1 = n1-1= 4, v2 = n2-1 = 5 F = = . . = 3.79 F(5,4=6.26) ∴ Cal F<Table F So we accept H0. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 8. KIT MA6452 STATISTICS AND NUMERICAL METHODS 13 SCE Department of Mechanical Engineering 2.1 Introduction yield of paddy. Here the quantity of manure used and the amount of yield of paddy UNIT II Design of Experiments and quality of seeds (will also affect the yield of paddy, which are not under study) are called extraneous variables. Aim of design of experiments: In any statistical experiment we will have both experimental variables and extraneous variables. The aim of the design of experiments is to control extraneous variables and hence to minimize the error so that the results of experiments could be attributed only to the experimental variables. Basic principles of experimental design: 1. Randomization 2.Replication 3.Local control. Consider an agricultural experiment. To analyze the effect of a manure in the yield of paddy, we use the manure in some plots of same size(group of experimental units) is called experimental group and the some other group of plots in which the manure is used and which will provide a basis for comparison is called the control group. By grouping, we mean combining sets of homogeneous plots into groups, so that different manures may be used in different groups. By blocking, we mean assigning the same number of plots in different blocks. . By balancing, we mean adjusting the procedures of grouping, blocking and assigning the manures in such a manner that a balanced configuration is obtained. By 'experiment' we mean the collection of data (which usually consists of a series according to a certain specified sampling procedures. Consider the example of agricultural experiment which may be performed to verify the claim that a particular manure has got the effect of increasing the are known as experimental variables. And factors such as rainfall, quality of soil www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 9. KIT MA6452 STATISTICS AND NUMERICAL METHODS 14 SCE Department of Mechanical Engineering In order to study the effects of different manures on the yield are studied, each manure is used in more than one plot. In other words, we resort to replication which means repetition. Basic designs of experiments. I. Completely Randomized Design ( ANOVA one way classification) 2. Randomized Block Design ( ANOVA two way classification) 3. Latin Square Design ( ANOVA three way classification) ANOVA: ANOVA enables us to divide the total variation (represented by variance) in a group into parts which are accounted to different factors and a residual random variation which could be accounted for by any of these factors. The variation due to any specific factor is compared with the residual variation for significance, and hence the effect of the factors are concluded. 2.2. Completely Randomized Design (CRD) Consider an experiment of agriculture in which "h" treatments (manures) and "n" plots are available. To control the extraneous variables treatment "I" should be replicated on "n I" plots, treatment 2 should be replicated on "n2" plots and so on. To reduce the error we have to randomize this process that is which nl plots b'e used treatment I and so on. For this we number the plots (from I to n) and write the numbers on cards and shuffle well. Now, we select nl cards (as cards are selected at random the numbers will not be in order) on which treatments I will be used and so on. This process and design is called completely randomized design. 2.3. Randomized Block Design (RBD) Consider an experiment of agriculture in which effects of "k" treatments on the yield of paddy used. For this we select "n" plots. If the quality of soil of these "n" plots is known, then these plots are divided into "h" blocks (each with one quality). Each of these "h" blocks are divided into "k" times (n = hk) and in each one of this "k" plots are applied the "k" treatments in a perfectly randomized manner such that that each treatment occurs only once in any of the block. This design is called randomized block design. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 10. KIT MA6452 STATISTICS AND NUMERICAL METHODS 15 SCE Department of Mechanical Engineering 2.4. Latin Square Design (LSD) Consider an agricultural experiment, in which n2 plots are taken and arranged in the form of an n X n square, such that plots in each row will be homogeneous as far as possible with respect to one factor of classification, say, quality of soil and plots in each column will be homogeneous with respect to another factor of classification, say, seed quality. Then "n" treatments are given to these plots such that each treatment occurs only once in each tow and only once in each column. The various possible arrangements obtained in this manner are known as Latin squares of order "n" and the design is called Latin Square Design. Note: In a 2 X 2 LSD, the degree of freedom for the residual variation is en -2) = 0 which is not possible. Therefore a 2 X 2 LSD is not possible. Problems 1. The following table shows the lives in hours of four brands of electric lamps: Brand A: 1610 1610 1650 1680 1700 1720 1800 B: 1580 1640 1640 1700 1750 C: 1460 1550 1600 1620 1640 1660 1740 1820 D: 1510 1520 1530 1570 1600 1680 Perform an analysis of variance and test the homogeneity of the mean lives of the four brands of lamps. Solution: We are going to discuss mean lives of bulbs according to brands (only one factor). So, let us use ANOV A one way classification. Step 1 : Null Hypothesis Ho: There is no significant difference in the mean life of bulbs according to brands.(J..l]= J..l2= J..l3= /14) Step 2: Test Statistic (Calculating F ratio) As the data given is numerically larger, let us subtract all values given by 1640 and then divide them by 10 to make them simpler for calculation ease www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 11. KIT MA6452 STATISTICS AND NUMERICAL METHODS 16 SCE Department of Mechanical Engineering www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 12. KIT MA6452 STATISTICS AND NUMERICAL METHODS 17 SCE Department of Mechanical Engineering SSE = SST - SSC = 1950.62 - 452.25 = 1498.37 ANOVA table is Step 3: Level of significance: Not given. So, let us take 5 % = 0.05 a Step 4: Degrees of Freedom: ( 3,22) Step 5: Table value : Fo.os(3,22)= 3.05 Step 6: Conclusion: Comparing the F - value calculated at step 2 with table value of step 5 Fcal < Flab,we accept the Null hypothesis. That is there is no difference in the mean life time of the lamps due to brands. 2. A completely randomized design experiment with 10 plots and 3 treatments gave the following results: www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 13. KIT MA6452 STATISTICS AND NUMERICAL METHODS 18 SCE Department of Mechanical Engineering Analyze the results for treatment effects. Solution: All the plots are not applied with the same number of treatments and we are to analyze the treatment effects only, we apply One way classification. Re arranging the data Treatment A: 5 7 Treatment B: 4 4 Treatment C: 3 5 Step 1: Null Hypothesis Ho: There is no difference in the yield between treatments. Step 2 : Test Statistic: Total = T = 16+15+9 = 40 The square of the values are LX2 =84+81+35=200 Correction factor = 160 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 14. KIT MA6452 STATISTICS AND NUMERICAL METHODS 19 SCE Department of Mechanical Engineering SST= = 40 SSC= (16)2 + (lS)2 + (9)2 -160 = 6 SSE = SST - SSC =40 - 6 = 34 The ANOVA table is Step 3: Level of significance: Not given. So, let us take S % = O.OS Step 4: Degrees of Freedom: ( 7,2) Step 5: Table value : Fo.os(7,2)= 19.3S Step 6: Conclusion: Comparing the F - value calculated at step 2 with table value of step S Fca1 < Flab,we accept the Null hypothesis. That is there is no difference in the mean yield between the treatments. 3. Three varieties of a crop are tested in a randomized block design with four replications, the layout being as given below: The yields are given in kilograms. Analyze for significance C48 A51 B52 A49 A47 B49 C52 C51 B49 C53 A49 B50 Solution: Each blocks are applied with same number of replications and from the question (RBD) we understand that it is two way classification. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 15. KIT MA6452 STATISTICS AND NUMERICAL METHODS 20 SCE Department of Mechanical Engineering Step 1: Null Hypothesis Ho (I): There is no difference in the yield between treatments (rows). Null Hypothesis Ho (II): There is no difference in the yield between blocks( columns). Step 2: Test Statistic (Calculating F ratio) As the data given is numerically larger, let us subtract all values given by 50 make them simpler for calculation ease. Total T = - 6 +3+3+0 = 0 The square of the above values are LX2 =14+ 11 + 9 + 2 = 36 Correction factor = 0 SST = 36 SSE = SST - SSC-SSR = 36 - 18 - 8 = 10 The ANOVA table is Step 3: Level of significance: Not given. So, let us take 5 % = 0.05 Step 4: Degrees of Freedom: for rows (3,6) for columns (4,6) Step 5: Table value : Foos(2,6) = 5.14 Foos(3,6) = 4.76 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 16. KIT MA6452 STATISTICS AND NUMERICAL METHODS 21 SCE Department of Mechanical Engineering Step 6: Conclusion: Comparing the FR- value calculated at step 2 with table value of step 5 FR< Ftab,we accept the Null hypothesis I. That is there is no difference in the mean yield between the treatments(rows). Comparing the Fe - value calculated at step 2 with table value of step 5 Fe< Ftab,we accept the Null hypothesis II. That is there is no difference in the mean yield between the blocks(columns). 4. Four experiments determine the moisture content of samples of a powder, each observer taking a sample from each of six consignments. The assessments are given below: Perform an analysis of variance on these data and discuss whether there is any significant difference between consignments or between observers. Solution: From the data we understand that there are two factors. One is consignment and other is observer. So, we apply ANOV A two way classification. Step 1: Null Hypothesis Ho (I): There is no difference in the yield between treatments (rows). Null Hypothesis Ho (II): There is no difference in the yield between blocks(columns). Step 2: Test Statistic (Calculating F ratio) As the data given is numerically larger, let us subtract all values given by 10 make them simpler for calculation ease. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 17. KIT MA6452 STATISTICS AND NUMERICAL METHODS 22 SCE Department of Mechanical Engineering Total = 4 + 4 + -1 + 7 + 4 +1 = 19 The square of the above table values are, Ix2 =10+10+3+21+6+1 = 51 Correction factor = -15.04 SST= Ix - -=51-15.04 = 35.96 SSR = 15.04 SSE = SST - SSC-SSR = 35.96 - 13.13 - 9.71 = 13.12 The ANOVA table is Step 3: Level of significance: Not given. So, let us take 5 % = 0.05 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 18. KIT MA6452 STATISTICS AND NUMERICAL METHODS 23 SCE Department of Mechanical Engineering Step 4: Degrees of Freedom : for rows (3,15) for columns (5,15) Step 5: Table value : Fo.os(3,15)= 3.29 Fo.os(5,15) = 5.05 Step 6: Conclusion: Comparing the FR- value calculated at step 2 with table value of step 5 FR>Ftab,we Reject the Null hypothesis 1. That is there is significant difference in the moisture content of the powder between the observers(rows). Comparing the Fe - value calculated at step 2 with table value of step 5 Fe< Ftab, we accept the Null hypothesis II. That is there is no difference in the moisture content between the consignments( columns). 5. The following data resulted from an experiment to compare three burners BI, B2,B3. A Latin square design was used as the tests were made on 3 engines and were spread over 3 days. Test the hypothesis that there is no difference between the burners. Step 1: Null Hypothesis Ho (I): There is no difference in the mean between days (rows). Null Hypothesis Ho (II): There is no difference in the mean between Engines( columns). Null Hypothesis Ho (III): There is no difference in the mean between Burners(letters ). Step 2: Test Statistic (Calculating F ratio) As the data given is numerically larger, let us subtract all values given by 16 make them simpler for calculation ease. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 19. KIT MA6452 STATISTICS AND NUMERICAL METHODS 24 SCE Department of Mechanical Engineering Total T = 1 B1 = 0 - 1 - 4 = - 5 B2 = 1 + 0 - 3 = - 2 B3 = 4 + 5 -1 = 8 The squared values are Ix2 = 69 Correction factor = 0.1111 SST = 68.88889 SSR = 8.3333 + 5.3333 + 21.3333 - 0.1111 = 34.8888 ssc= 0.3333 + 1.3333+0- 0.1111 = 1.5556 SSL = 8.3333+1.3333+21.3333 - 0.1111 = 30. 8888 SSE = SST - SSC- SSL - SSR = 68.8889 - 34.8888 - 1.5556 - 30.8888 = 1.5557 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 20. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 25 Department of Mechanical Engineering Ftab, we accept the Null hypothesis II. That is there is no difference between the engines ( columns). Comparing the FL - value calculated at step 2 with table value of step 5 Fe>Ftab, we reject the Null hypothesis III. That is there is difference between the numbers(letters). Step 5: Table value : Fo.os(2,2) = 19 Comparing the Fe - value calculated at step 2 with table value of step 5 Fe< Step 3: Level of significance: Not given. So, let us take 5 % = 0.05 Step 4: Degrees of Freedom: for rows (2,2) for columns ( 2,2) for letters ( 2,2) Step 6: Conclusion: Comparing the FR - value calculated at step 2 with table value of step 5 FR>Ftab, we Reject the Null hypothesis I. That is there is significant difference in the due to selection of days(rows). www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 21. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 26 Department of Mechanical Engineering UNIT -3 SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS 3.1.Introduction The problem of solving the equation ( ) = is of great importance in science and Engineering. In this section, we deal with the various methods which give a solution for the equation ( ) = Solution of Algebraic and transcendental equations: The equation of the form f(x) =0 are called algebraic equations if f(x) is purely a polynomial in x.For example: − − + = & − − = are algebraic equations . If f(x) also contains trigonometric, logarithmic, exponential function etc. then the equation ( ) = is known as transcendental equation. Methods for solving the equation ( ) = The following result helps us to locate the interval in which the roots of ( ) =  Method of false position.  Iteration method  Newton-Raphson method Method of False position (Or) Regula-Falsi method (Or) Linear interpolation method In bisection method the interval is always divided into half. If a function changes sign over an interval, the function value at the mid-point is evaluated. In bisection method the interval from a to b into equal intervals ,no account is taken of the magnitude of ( ) ( ).An alternative method that exploits this graphical insights is to join ( ) ( ) by a straight line.The intersection of this line with the X-axis represents an improved estimate of the root.The replacement of the curve by a straight line gives a “false position” of the root is the origin of the name ,method of false position ,or in Latin ,Regula falsi .It is also called the linear interpolation method. Problems: 1. Find a real root of − + = that lies between 2 and 3 by the method of false position and correct to three decimal places. Sol: Let ( ) = − + ( .) = − . ( ) = The root lies between 2.5 and 3. The approximations are given by )()( )()( afbf abfbaf x    www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 22. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 27 Department of Mechanical Engineering Iteration(r) A b xr f(xr) 1 2.5 3 2.9273 -0.2664 2 2.9273 3 2.9423 -0.0088 3 2.9423 3 2.9425 -0.0054 4 2.9425 3 2.9425 0.003 2. Obtain the real root of = ,correct to four decimal places using the method of false position. Sol: Given = Taking logarithmic on both sides, 2log10 xx 2log)( 10  xxxf 00958.0)5.3( f and 000027.0)6.3( f The roots lies between 3.5 and 3.6 The approximation are given by )()( )()( afbf abfbaf x    Iteration(r)a b xr f(xr) 1 3.5 3.6 3.5973 0.000015 2 3.5 3.5973 3.5973 0 The required root is 3.5973 Exercise: 1. Determine the real root of = correct to four decimal places by Regula-Falsi method. Ans: 1.0499 2. Find the positive real root of = correct to four decimals by the method of False position . Ans: 1.8955 3.Solve the equation = − by Regula-Falsi method,correct to 4 decimal places. Ans: 2.7984 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 23. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 28 Department of Mechanical Engineering 3.2.Newton’s method (or) Newton-Raphson method (Or) Method of tangents: This method starts with an initial approximation to the root of an equation, a better and closer approximation to the root can be found by using an iterative process. Derivation of Newton-Raphson formula: Let  be the root of 0)( xf and 0x be an approximation to  .If 0xh   Then by the Tayor’s series )( )( 1 i i ii xf xf xx   ,i=0,1,2,3,……… Note:  The error at any stage is proportional to the square of the error in the previous stage.  The order of convergence of the Newton-Raphson method is at least 2 or the convergence of N.R method is Quadratic. Problems: 1.Using Newton’s method ,find the root between 0 and 1 of − + = correct five decimal places. Sol: Given − + = 46)( 3  xxxf 63)( 2  xxf By Newton-Raphson formula, we have approximation .....3,2,1,0, )( )( 1    n xf xf xx i i ii The initial approximation is 5.00 x First approximation: , )( )( 0 0 01 xf xf xx   , 25.5 125.1 5.0   =0.71429 Second approximation: www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 24. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 29 Department of Mechanical Engineering , )( )( 1 1 12 xf xf xx   , 4694.4 0787.0 71429.0   =0.7319 Third approximation , )( )( 2 2 23 xf xf xx   , 3923.4 0006.0 0.73205   =0.73205 Fourth approximation , )( )( 3 3 34 xf xf xx   , 3923.4 000003.0 0.73205   =0.73205 The root is 0.73205, correct to five decimal places. 2. Find a real root of x=1/2+sinx near 1.5, correct to 3 decimal places by newton-Raphson method. Sol: Let 2 1 sin)(  xxxf xxf cos1)(  By Newton-Raphson formula, we have approximation .....3,2,1,0, )( )( 1    n xf xf xx i i ii ,....3,2,1,0, cos1 cos5.0sin 1     n x xxx x n nnn n Let 5.10 x be the initial approximation First approximation: www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 25. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 30 Department of Mechanical Engineering 5.1cos1 )5.0)5.1sin(5.1( 5.11   x )9293.0( )0025.0( 5.1  =1.497 Second approximation: 9263.0 )00028.0( 497.11  x =1.497. The required root is 1.497 Exercise: 1. Find the real root of xex 3 ,that lies between 1 and 2 by Newton’s method ,correct to 4 decimal places. Ans:1.5121 2.Use Newton-Raphson method to solve the equation 01cos3  xx Ans:0.6071 3.Find the double root of the equation 0123  xxx by Newton’s method. Ans: 0.03226 Iteration method (Or) Method of successive approximations(Or)Fixed point method For solving the equation 0)( xf by iteration method, we start with an approximation value of the root.The equation 0)( xf is expressed as )(xx  .The equation )(xx  is called fixed point equation.The iteration formula is given by ,.....2,1,0),(1  nxx nn  called fixed point iteration formula. Theorem(Fixed point theorem) Let 0)( xf be the given equation whose exact root is . The equation 0)( xf be rewritten as )(xx  .Let I be the interval containing the root .x If 1)(  x for all x in I, then the sequence of www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 26. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 31 Department of Mechanical Engineering Approximation nxxxx ,.....,, 321 will converges to . ,If the initial starting value 0x is chosen in I. Theorem: Let . be a root of the equation )(xgx  .If 0)(0)(,.......0)(,0)( )()1(    pp andgggg .then the convergence of iteration )(1 ii xgx  is of order p. Note: The order of convergence in general is linear (i.e) =1 Problems: 1.Solve the equation 0123  xx or the positive root by iteration method ,correct to four decimal places. Sol: 1)( 23  xxxf 01)1(01)0(  andff The root lies between 0 and 1. 1)1(01 223  xxxx x x   1 1 The given equation can be expressed as x x   1 1 )( 2 3 )1(2 1 )( x x   2 3 )1(2 1 )( x x   1 24 1 )1( 2 1 )0(   and 2 3 )1(2 1 )( x x   )1,0(1)(  xx Choosing 75.00 x ,the successive approximations are 75.01 1 1  x www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 27. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 32 Department of Mechanical Engineering =0.75593 75488.0 75488.0 75487.0 75463.0 75465.0 6 5 4 3 2      x x x x x Hence the root is 0.7549 Exercise: 1. Find the cube root of 15, correct to four decimal places, by iteration method Ans: 2.4662 System of linear equation: Many problems in Engineering and science needs the solution of a system of simultaneous linear equations .The solution of a system of simultaneous linear equations is obtained by the following two types of methods  Direct methods (Gauss elimination and Gauss Jordan method)  Indirect methods or iterative methods (Gauss Jacobi and Gauss Seidel method) (a) Direct methods are those in which  The computation can be completed in a finite number of steps resulting in the exact solution  The amount of computation involved can be specified in advance.  The method is independent of the accuracy desired. (b) Iterative methods (self correcting methods) are which  Begin with an approximate solution and  Obtain an improved solution with each step of iteration  But would require an infinite number of steps to obtain an exact solution without round-off errors  The accuracy of the solution depends on the number of iterations performed. Simultaneous linear equations: The system of equations in n unknowns nxxxx ,.....,, 321 is given by 11212111 .......... bxaxaxa nn  www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 28. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 33 Department of Mechanical Engineering 22222121 .......... bxaxaxa nn  ………………………………………………………… …………………………………………………………. …………………………………………………………. nnmnnn bxaxaxa  ..........2211 This can be written as BAX  where      T n T nnnij bbbbBxxxxXaA ,.....,,;,.....,,; 321321   This system of equations can be solved by using determinants (Cramer’s rule) or by means of matrices. These involve tedious calculations. These are other methods to solve such equations .In this chapter we will discuss four methods viz. (i) Gauss –Elimination method (ii) Gauss –Jordan method (iii) Gauss-Jacobi method (iv) Gauss seidel method  Gauss-Elimination method This is an Elimination method and it reduces the given system of equation to an equivalent upper triangular system which can be solved by Back substitution. Consider the system of equations 3333232131 2323222121 1313212111 bxaxaxa bxaxaxa bxaxaxa    Gauss-algorithm is explained below: Step 1. Elimination of 1x from the second and third equations .If ,011 a the first equation is used to eliminate 1x from the second and third equation. After elimination, the reduced system is 3333232 2323222 1313212111 bxaxa bxaxa bxaxaxa    Step 2: Elimination of 2x from the third equation. If ,022 a We eliminate 2x from third equation and the reduced upper triangular system is www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 29. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 34 Department of Mechanical Engineering 3333 2323222 1313212111 bxa bxaxa bxaxaxa    Step 3: From third equation 3x is known. Using 3x in the second equation 2x is obtained. using both 2x And 3x in the first equation, the value of 1x is obtained. Thus the elimination method, we start with the augmented matrix (A/B) of the given system and transform it to (U/K) by eliminatory row operations. Finally the solution is obtained by back substitution process. Principle )/()/( lim KUBA inationeGauss     Gauss –Jordan method This method is a modification of Gauss-Elimination method. Here the elimination of unknowns is performed not only in the equations below but also in the equations above. The co-efficient matrix A of the system AX=B is reduced into a diagonal or a unit matrix and the solution is obtained directly without back substitution process. )/()/()/( KIorKDBA JordanGauss    Examples: 1.Solve the equations 33114,20238,1242  zyxzyxzyx by (1)Gauss – Elimination method (2) Gauss –Jordan method Sol: (i)Gauss-Elimination method The given system is equivalent to BAX  where = − − = and = Principle. Reduce( ⁄ ) to( ⁄ ) www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 30. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 35 Department of Mechanical Engineering ( ⁄ )= − − ~ − − ~ − − − − → − ; → − ; ~ − − − − − → + From this ,the equivalent upper triangular system of equations is 1242  zyx 28147  zy 2727  z z=1,y=2,x=3 By back substitution. The solution is x=3,y=2,z=1 (ii)Gauss –Jordan method Principle. Reduce( ⁄ ) to( ⁄ ) ( ⁄ )~ − − ~ − → × (− / ); → × ( / ); ~ − − → − ; → − www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 31. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 36 Department of Mechanical Engineering ~ → × (− / ) ~ → − ; → From this ,we have = = y = 2 z=1 ∴ = , = , = . Exercise: 1. Solve the system by Gauss –Elimination method 532,303,14225  zyxzyxzyx . Ans: x= 39.3345;y=16.793;z=18.966 2. Solve the equations 40543,13432,9  zyxzyxzyx by (1) Gauss –Elimination method (2) Gauss –Jordan method Ans: x=1; y=3; z=5 3.3.Iterative method These methods are used to solve a special of linear equations in which each equation must possess one large coefficient and the large coefficient must be attached to a different unknown in that equation.Further in each equation, the absolute value of the large coefficient of the unknown is greater than the sum of the absolute values of the other coefficients of the other unknowns. Such type of simultaneous linear equations can be solved by the following iterative methods.  Gauss-Jacobi method  Gauss seidel method 3333 2222 1111 dzcybxa dzcybxa dzcybxa    i.e., the co-efficient matrix = 〈 〉 〈 〉 〈 〉 is diagonally dominant. Solving the given system for x,y,z (whose diagonals are the largest values),we have www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 32. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 37 Department of Mechanical Engineering ][ 1 ][ 1 ][ 1 333 3 222 2 111 1 ybxad c z zcxad b y zcybd a x    Gauss-Jacobi method If the rth iterates are )()()( ,, rrr zyx ,then the iteration scheme for this method is )( 1 )( 1 )( 1 )( 3 )( 33 3 )1( )( 2 )( 22 2 )1( )( 1 )( 11 1 )1( rrr rrr rrr ybxad c z zcxad b y zcybd a x       The iteration is stopped when the values x, y, z start repeating with the desired degree of accuracy. Gauss-Seidel method This method is only a refinement of Gauss-Jacobi method .In this method ,once a new value for a unknoen is found ,it is used immediately for computing the new values of the unknowns. If the rth iterates are ,then the iteration scheme for this method is )( 1 )( 1 )( 1 )1( 3 )1( 33 3 )1( )( 2 )1( 22 2 )1( )( 1 )( 11 1 )1(       rrr rrr rrr ybxad c z zcxad b y zcybd a x Hence finding the values of the unknowns, we use the latest available values on the R.H.S The process of iteration is continued until the convergence is obtained with desired accuracy. Conditions for convergence: Gauss-seidel method will converge if in each equation of the given system ,the absolute values o the largest coefficient is greater than the absolute values of all the remaining coefficients niaa n jj ijii .........3,2,1 1,1   www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 33. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 38 Department of Mechanical Engineering This is the sufficient condition for convergence of both Gauss-Jacobi and Gauss-seidel iteration methods. Rate of convergence: The rate of convergence of gauss-seidel method is roughly two times that of Gauss-Jacobi method. Further the convergences in Gauss-Seidel method is very fast in gauss-Jacobi .Since the current values of the unknowns are used immediately in each stage of iteration for getting the values of the unknowns. Problems: 1.Solve by Gauss-Jacobi method, the following system 354172,24103,32428  zyxzyxzyx Sol: Rearranging the given system as 24103 354172 32428    zyx zyx zyx The coefficient matrix is = 〈 〉 − 〈 〉 〈 〉 is diagonally dominant. Solving for x,y,z ,we have = [ − + ] = [ − − ] = [ − − ] We start with initial values ( , , )=( , , ) The successive iteration values are tabulated as follows Iteration X Y Z 1 1.143 2.059 2.400 2 0.934 1.360 1.566 3 1.004 1.580 1.887 4 0.983 1.508 1.826 5 0.993 1.513 1.849 6 0.993 1.507 1.847 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 34. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 39 Department of Mechanical Engineering 7 0.993 1.507 1.847 X=0.993;y=1.507;z=1.847 2.Solve by Gauss-Seidel method, the following system 11054,722156;85627  zyxzyxzyx Sol: The given system is diagonally dominant. Solving for x,y,z, we get = [ − + ] = [ − − ] = [ − − ] We start with initial values ( , , )=( , , ) The successive iteration values are tabulated as follows Iteration X Y Z 1 3.148 3.541 1.913 2 2.432 3.572 1.926 3 2.426 3.573 1.926 4 2.425 3.573 1.926 5 2.425 3.573 1.926 X=2.425;y=3.573;z=1.926 Exercise: 1.Solve by Gauss-Seidel method, the following system 780.2;341.1;89.0: 221032,442302;9210   zyxAns zyxzyxzyx 2.Solve by Gauss-Seidel method and Gauss-Jacobi method,the following system 069.1;798.2;580.2)(541.3;522.1;321.1)(: 48217,301822;753230   zyxiizyxiAns zyxzyxzyx www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 35. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 40 Department of Mechanical Engineering Matrix inversion: A square matrix whose determinant value is not zero is called a non-singular matrix. Every non-singular square matrix has an inverse matrix. In this chapter we shall find the inverse of the non-singular square matrix A of order three. If X is the inverse of A, Then = 3.4.Inversion by Gauss-Jordan method By Gauss Jordan method, the inverse matrix X is obtained by the following steps:  Step 1: First consider the augmented matrix ( / )  Step 2: Reduce the matrix A in ( / ) to the identity matrix I by employing row transformations. The row transformations used in step 2 transform I to A-1 Finally write the inverse matrix A-1 .so the principle involved for finding A-1 is as shown below ( / ) → / Note The answer can be checked using the result . = . = Problems: 1.Find the inverse of by Gauss-Jordan method. Sol: ( / ) = ( / )~ − − → − ; → − ~ − − − → − ( / )~ − − − − → − www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 36. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 41 Department of Mechanical Engineering Thus ( / ) → / Hence = − − − − 2.Find the inverse of = − − − − by Gauss-Jordan method Exercise: 1. Find the inverse of − − by Gauss-Jordan method. 2.By Gauss-Jordan method ,find 1 A if = − − 3.5.Eigen value of a Matrix For every square matrix A, there is a scalar  and a non-zero column vector X such that XAX  .Then the scalar  is called an Eigen value of A and X, the corresponding Eigen vector. We have studied earlier the computation of Eigen values and the Eigen vectors by means of analytical method. In this chapter, we will discuss an iterative method to determine the largest Eigen value and the corresponding Eigen vector. Power method (Von Mise’s power method) Power method is used to determine numerically largest Eigen value and the corresponding Eigen vector of a matrix A Working Procedure (For a × square matrix)  Assume the initial vector = ( , , )  Then find = , = , , … … ..  Normalize the vector to get a new vector (i.e) = , is the largest component in magnitude of www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 37. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 42 Department of Mechanical Engineering  Repeat steps (2) and (3) till convergence is achieved.  The convergence of mi and Xi will give the dominant Eigen value  and the corresponding Eigen vector X Thus     ni X Y ik ik ........2,1,0,lim 1 1    And X is the required Eigen vector. Problems 1.Use the power method to find the dominant value and the corresponding Eigen vector of the matrix A = 9 1 8 7 4 1 1 7 9 Sol: Let X = (1,1,1) AX = 9 1 8 7 4 1 1 7 9 1 1 1 = 18 12 17 = 18 1.00 0.67 0.94 = 1 1X AX = 9 1 8 7 4 1 1 7 9 1.00 0.67 0.94 = 17.94 10.62 14.15 = 17.19 1.00 0.67 0.82 = 2 2X AX = 9 1 8 7 4 1 1 7 9 1.00 0.67 0.82 = 16.18 10.30 12.72 = 16.18 1.00 0.64 0.79 = 3 3X AX = 9 1 8 7 4 1 1 7 9 1.00 0.64 0.79 = 15.96 10.35 12.59 = 15.96 1.00 0.65 0.79 = 4 4X AX = 9 1 8 7 4 1 1 7 9 1.00 0.65 0.79 = 15.97 10.39 12.66 = 15.97 1.00 0.65 0.79 = 5 5X Hence the dominant Eigen value is 15.97 and the corresponding Eigen vector is [1.00,0.65,0.79] www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 38. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 43 Department of Mechanical Engineering 2. Determine the dominant Eigen value and the corresponding Eigen vector of A = 4 1 0 1 20 1 0 1 4 Using power method. Exercise: 1. Find the dominant Eigen value and the corresponding Eigen vector of A= 1 6 1 1 2 0 0 0 3 Find also the other two Eigen values. 2. Find the dominant Eigen value of the corresponding Eigen vector of A = 4 1 1 3 By power method. Hence find the other Eigen value also. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 39. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 44 Department of Mechanical Engineering CHAPTER 4 INTERPOLATION AND APPROXIMATION 4.1 Interpolation with Unequal intervals Introduction Interpolation is a process of estimating the value of a function at ana intermediate point when its value are known only at certain specified points.It is based on the following assumptions: (i) Given equation is a polynomial or it can be represented by a polynomial with a good degree of approximation. (ii) Function should vary in such a way that either it its increasing or decreasing in the given range without sudden jumps or falls of functional values in the given interval. We shall discuss the concept of interpolation from a set of tabulated values of y = f(x) when the values of x are given intervals or at unequal intervals .First we consider interpolation with unequal intervals. 4.2.Lagrange’s Interpolation formula y = f(x) = ( )( )….( ) ( )( )….( ) y + ( )( )….( ) ( )( )….( ) y + … ( )( )….( ) ( )( )….( ) y This is called the Lagrange’s formula for Interpolation. Problems: 1. Using Lagrange’s interpolation formula, find the value of y corresponding to x=10 from the following data X 5 6 9 11 Y 12 13 14 16 Sol: Given x = 5;x = 6;x = 9; x = 11 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 40. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 45 Department of Mechanical Engineering y = 12; y = 13;y = 14;y = 16 By Lagrange’s interpolation formula y = f(x) = (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y Using x=10 and the given data, y (10) =14.67 2. Using Lagrange’s interpolation formula, find the value of y corresponding to x=6 from the following data X 3 7 9 10 Y 168 120 72 63 Sol: Given x = 3; x = 7; x = 9;x = 10 y = 168;y = 120;y = 72;y = 63 By Lagrange’s interpolation formula y = f(x) = (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y Using x=6 and the given data, y(6)=147 3.Apply Lagrange’s formula to find f(5),given that f(1)=2,f(2)=4,f(3)=8 and f(7)=128 Sol: Given x = 1; x = 2; x = 3;x = 7 y = 2;y = 4;y = 8; y = 128 By Lagrange’s interpolation formula www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 41. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 46 Department of Mechanical Engineering y = f(x) = (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y + (x − x )(x − x )(x − x ) (x − x )(x − x )(x − x ) y Using x=5 and the given data, y(5)=32.93 Exercise 1.Find the polynomial degree 3 fitting the following data X -1 0 2 3 Y -2 -1 1 4 Ans:y = [x − x + 4x − 6] 2.Given u = 6;u = 9; u = 33 and u = −15. Find u Ans: u = 20 Inverse Interpolation by Lagrange’s interpolating polynomial Lagrange’s interpolation formula can be used find a value of x corresponding to a given y which is not in the table. The process of finding such of x is called inverse interpolation. If x is the dependent variable and y is the independent variable, we can write a formula for x as a function of y. The Lagrange’s interpolation formula for inverse interpolation is x = (y − y )(y − y )… . (y − y ) (y − y )(y − y ) … (y − y ) x + (y − y )(y − y ) … (y − y ) (y − y )(y − y ) … (y − y ) x + (y − y )(y − y ) … . (y − y ) (y − y )(y − y ) … (y − y ) x + ⋯ . + (y − y )(y − y ) … .(y − y ) (y − y )(y − y ) … (y − y ) x Problems 1.Apply Lagrange’s formula inversely to obtain the root of the equation f(x) = 0 Given that f(0) = −4,f(1) = 1,f(3) = 29,f(4) = 52 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 42. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 47 Department of Mechanical Engineering Sol: Given that x = 0,x = 1, x = 3, x = 4 y = −4, y = 1,y = 29,y = 52 To find x such that f(x) = 0 Applying Lagrange’s interpolation formula inversely ,we get x = (y − y )(y − y )(y − y ) (y − y )(y − y )(y − y ) x + (y − y )(y − y )(y − y ) (y − y )(y − y )(y − y ) x + (y − y )(y − y )(y − y ) (y − y )(y − y )(y − y ) x + (y − y )(y − y )(y − y ) (y − y )(y − y )(y − y ) x =0.8225 ∴ x = 0.8225 2.Given data x 3 5 7 9 11 y 6 24 58 108 174 Find the value of x corresponding to y=100. Sol: Given that x = 3,x = 5,x = 7, x = 9, x = 11 y = 6, y = 24, y = 58, y = 108, y = 174 x = (y − y )(y − y )(y − y )(y − y ) (y − y )(y − y )(y − y )(y − y ) x + (y − y )(y − y )(y − y )(y − y ) (y − y )(y − y )(y − y )(y − y ) x + (y − y )(y − y )(y − y )(y − y ) (y − y )(y − y )(y − y )(y − y ) x + (y − y )(y − y )(y − y )(y − y ) (y − y )(y − y )(y − y )(y − y ) x + (y − y )(y − y )(y − y )(y − y ) (y − y )(y − y )(y − y )(y − y ) x Using the given data and y=100, we get X=8.656 The value of x corresponding to y=100 is 8.656 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 43. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 48 Department of Mechanical Engineering 4.3. Divided Difference –Newton Divided Difference Interpolation Formula If the values of x are given at unequal intervals, it is convenient to introduce the idea of divided differences. The divided difference are the differences of y=f(x) defined, taking into consideration the changes in the values of the argument .Using divided differences of the function y=f(x),we establish Newton’s divided difference interpolation formula, which is used for interpolation which the values of x are at unequal intervals and also for fitting an approximate curve for the given data. Divided difference Let the function y = f(x) assume the values f(x ), f(x ) … … f(x ) Corresponding to the arguments nxxxx ,.....,, 321 respectively, where the intervals x − x , x − x ,… . x − x need to be equal. Definitions The first divided difference of f(x) for the argumentsx ,x is defined by f(x , x ) = ∆ f(x ) = f(x ) − f(x ) x − x It is also denoted by [x ,x ] Similarly for arguments x and x f(x ,x ) = ∆ f(x ) = ( ) ( ) and so on. The second divided divided differences of f(x) for three arguments 210 ,, xxx Is defined as f(x , x , x ) = ∆ f(x ) = f(x , x ) − f(x ,x ) x − x The third divided difference of f(x) for the four arguments 3210 ,,, xxxx Is defined as f(x ,x , x ) = f(x ,x , x ) − f(x , x , x ) x − x And so on . Representation by Divided difference table www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 44. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 49 Department of Mechanical Engineering Arguments x Entryf(x) First Divided difference ∆ f(x) Second D-D ∆ f(x) Third D-D ∆ f(x) x x x x x f(x ) f(x ) f(x ) f(x ) f(x ) f(x , x ) = ∆ f(x ) = f(x ) − f(x ) x − x f(x , x ) = ∆ f(x ) = f(x ) − f(x ) x − x f(x , x ) = ∆ f(x ) = f(x ) − f(x ) x − x f(x , x ) = ∆ f(x ) = f(x ) − f(x ) x − x f(x , x ,x ) f(x , x ,x ) f(x , x ,x ) f(x ,x ,x , x ) f(x ,x ,x , x ) Properties of divided difference  The divided differences are symmetrical in all their arguments.  The operator ∆ is linear.  The nth divided differences of a polynomial of nth degree are constants. Problems 1.If f(x) = find the divided difference f(a,b, c, d)(or)∆ ( ) Sol: f(x) = 1 x f(a) = 1 a f(a,b) = ( ) ( ) = = − f(a,b, c) = f(b,c) − f(a,b) c − a = = www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 45. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 50 Department of Mechanical Engineering f(a, b, c, d) = f(b,c,d) − f(a,b,c) d − a =− 2.Find the third differences with arguments 2,4,9,10 for the function f(x) = x − 2x Newton’s Divided difference Formula (Or) Newton’s Interpolation Formula for unequal intervals f(x) = f(x ) + (x − x )f(x ,x ) + (x − x )(x − x )f(x ,x ,x ) + (x − x )(x − x )(x − x )f(x ,x ,x , x ) + ⋯ … … …. Problems 1.Find the polynomial equation y = f(x) passing through(-1,3),(0,- 6),(3,39),(6,822),(7,1611) Sol: Given data x -1 0 3 6 7 y 3 -6 39 822 1611 The divided difference table is given as follows x f(x) ∆ f(x) ∆ f(x) ∆ f(x) ∆ f(x) -1 0 3 6 7 3 -6 39 822 1611 -9 15 261 789 6 41 132 5 13 1 By Newton’s formula, f(x) = f(x ) + (x − x )f(x ,x ) + (x − x )(x − x )f(x ,x ,x ) + (x − x )(x − x )(x − x )f(x ,x ,x , x ) + ⋯ … … …. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 46. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 51 Department of Mechanical Engineering y = f(x) = 3 + (x + 1)(−9) + (x + 1)x(6) + (x + 1)x(x − 3)5 + (x + 1)x(x − 3)(x − 6)1 y = x − 3x + 5x − 6 Is the required polynomial. 2. Given the data Find the form of the function .Hence find f(3). Ans: f(3)=35 Interpolating with a cubic spline-cubic spline Interpolation: We consider the problem of interpolation between given data points (xi, yi), i=0, 1, 2, 3….n where a= bxxxx n  .....321 by means of a smooth polynomial curve. By means of method of least squares, we can fit a polynomial but it is appropriate.”Spline fitting” is the new technique recently developed to fit a smooth curve passing he given set of points. Definition of Cubic spline: A cubic spline s(x) is defined by the following properties.  S(xi)=yi,i=0,1,2,…..n  S(x),s’(x),s”(x) are continuous on [a,b]  S(x) is a cubic polynomial in each sub-interval(xi,xi+1),i=0,1,2,3…..n=1 Conditions for fitting spline fit: The conditions for a cubic spline fit are that we pass a set of cubic through the points, using a new cubic in each interval. Further it is required both the slope and the curvature be the same for the pair of cubic that join at each point. Natural cubic spline: A cubic spline s(x) such that s(x) is linear in the intervals ),(),( 1  nxandx i.e. s1=0 and sn=0 is called a natural cubic spline where 1s =second derivative at ),( 11 yx ns Second derivative at ),( nn yx x 0 1 2 5 f(x) 2 3 12 147 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 47. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 52 Department of Mechanical Engineering Note: The three alternative choices used are  01 s and 0ns i.e. the end cubics approach linearity at their extremities.  121 ;  nn ssss i.e. the end cubics approaches parabolas at their extremities  Take 1s as a linear extrapolation from 2s and nandss3 is a linear extrapolation from 21  nn andss .with the assumption, for a set of data that are fit by a single cubic equation their cubic splines will all be this same cubic  For equal intervals ,we have hhh ii 1 ,the equation becomes ]2[ 6 4 11211   iiiiii yyy h sss for i=1,2,3,….n-1 Problems 1.Fit a natural cubic spline to the following data x 1 2 3 y -8 -1 18 And compute (i) y(1.5) (ii) y’(1) Solution: Here n=2 ,the given data )18,3(),(),1,2(),(),8,1(),( 332211  yxyxyx For cubic natural spline, 0&0 31  ss .The intervals are equally spaced. For equally spaced intervals,the relation on 321 &, sss is given by ]2[ 1 6 4 3212321 yyysss  ]1[ h 182 s For the interval ]2[21 1  xxx ,the cubic spline is given by 111 2 11 3 11 )()()( dxxcxxbxxay  The values of 1111 ,,, dcba are given by ]1[ ih11 21 121 1 1 12 1 ), 6 2 ()(, 2 , 6 yd ss yyc s b ss a      www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 48. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 53 Department of Mechanical Engineering 8,4,0,3 1111  dcba The cubic spline for the interval 21  x is 8 45 )5.1()5.1( 8)14(4)1(3)( 3   sy xxxs The first derivative of s(x) is given by )( 1 )2( 6 )( 11 1 ii i iii yy h ss h xs   Taking i=1, )()2( 6 1 )1( 1221 yysss  ]1[ ih 4)1(  s 4)1(  y We note that the tabulated function is 93  xy and hence the actual values of )5.1(y and )1(y are respectively 8 45  and 3. 2.The following values of x and y are given ,obtain the natural cubic spline which agree with y(x) at the set of data points x 2 3 4 y 11 49 123 Hence compute (i) y(2.5) and (ii) )2(y Exercise: 1.Fit the following data by a cubic spline curve x 0 1 2 3 4 y -8 -7 0 19 56 Using the end condition that 51 & ss are linear extrapolations. 2.Fit a natural cubic spline to 2 51 20 )( x xf   on the interval [-2,-1].Use five equispaced points of the function at x=-2(1)2.hence find y(1.5). www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 49. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 54 Department of Mechanical Engineering 4.4. Interpolation with equal intervals (Newton’s Forward and Backward Difference formulas) If a function y=f(x) is not known explicitly the value of y can be obtained when s set of values of  ii yx , i=1,2,3….n are known by using methods based on the principles of finite differences ,provided the function y=f(x) is continuous. Assume that we have a table of values  ii yx , i=1,2,3….n of any function, the values of x being equally spaced, niihxxei i ,....2,1,0,.,. 0  Forward differences: If nyyyy ,......,, 210 denote a set of values of y,then the first forward differences of y=f(x) are defined by 11121010 .;.........;   nnn yyyyyyyyy Where  is called the forward difference operator. Backward differences: The differences 01 yy  , 12 yy  ,……….. 1 nn yy are called first backward differences and they are denoted by 9.2 ny 1122011 .;.........;  nnn yyyyyyyyy Where  is called the backward difference operator.In similar way second, third and higher order backward differences are defined. ........;.........; 344 2 233 2 122 2 yyyyyyyyy  3 2 4 2 4 3 2 2 3 2 3 3 ; yyyyyy  and so on. Fundamental Finite Difference operators Forward Difference operator  ( 010 yyy  ) If =f(x) then )()( xfhxfy  Where h is the interval of differencing, Backward Difference operator( 011 yyy  ) The operator  is defined by )()()( hxfxfxf  Shift operator www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 50. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 55 Department of Mechanical Engineering The shift operator is defined by 1 rr yEy i.e the effect of E is to shift functional value ry to the next value 1ry .Also 2 2  rr yyE In general rnr n yyE  The relation between  and E is given by  1)(1 EorE Also the relation between and E-1 is given by 1 1   E Newton’s Forward Interpolation formula Let y=f(x) be a function which takes the values nyyyy ,......,, 210 corresponding to the values nxxxx ,......,, 210 where the values of x are equally spaced. i.e. niihxxi ,.......,2,1,0,0  h xx p ppp y pp ypyyp 0 0 2 00 ........... !3 )2)(1( !2 )1(        This formula is called Newton-Gregory forward interpolation formula. Newton’s Backward Interpolation formula This formula is used for interpolating a value of y for given x near the end of a table of values .Let nyyyy ,......,, 210 be the values of y =f(x) for nxxxxx ,......,, 210 where niihxxi ,.......,2,1,0,0  ...... !3 )2)(1( !2 )1( )( 32      nnnnn y ppp y pp ypyphxy h xx p n  This formula is called Newton Backward interpolation formula. We can also use this formula to extrapolate the values of y, a short distance ahead of yn. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 51. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 56 Department of Mechanical Engineering Problems: 1.Using Newton’s Forward interpolation formula ,find f(1.02) from the following data X 1.0 1.1 1.2 1.3 1.4 F(x) 0.841 0.891 0.932 0.964 0.985 Sol: Forward difference table: x )(xfy  y y2  y3  1.0 1.1 1.2 1.3 1.4 0.841 0.891 0.932 0.964 0.985 0.050 0.041 0.032 0.021 -0.009 -0.009 -0.011 0 -0.002 009.0,050.0,841.0 0 2 00  yyy Let 02.1&0.10  xx h xx p 0  2.0 p By Newton’s Forward interpolation formula, ......... !2 )1( )02.1( 0 2 00    y pp ypyy =0.852 )02.1(y =0.852 2.Using Newton’s Forward interpolation formula, find the value of sin52 given that .8660.060sin,8192.055sin,7660.050sin,7071.045sin 0000  Ans:0.7880 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 52. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 57 Department of Mechanical Engineering 3.Using Newton’s Backward interpolation formula, find y when x=27,from the following data x 10 15 20 25 30 y 35.4 32.2 29.1 26.0 23.1 Sol: Backward difference table x y y y2  y3  y4  10 15 20 25 30 35.4 32.2 29.1 26.0 23.1 -3.2 -3.1 -3.1 -2.9 0.1 0 0.2 -0.1 0.2 0.3 Here ,1.23,30  nn yx 9.2 ny ,2.02  ny 2.03  ny , 3.04  ny By Newton’s backward interpolation formula, ...... !3 )2)(1( !2 )1( )( 32      nnnnn y ppp y pp ypyphxy Here x=27, h xx p n  6.0 p y(27)=24.8 4.Find the cubic polynomial which takes the value y(0)=1,y(1)=0,y(2)=1,y(3)=10.Hence or otherwise ,obtain y(4). Ans:y(4)=33 Exercise: 1.Given the data www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 53. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 58 Department of Mechanical Engineering X 0 1 2 3 4 Y 2 3 12 35 78 Find the cubic function of x,using Newton’s backward interpolation formula. Ans: 2)( 23  xxxxy 2.Using Newton’s Gregory backward formula, find 9.1 e from the following data x 1.00 1.25 1.50 1.75 2.00 x e 0.3679 0.2865 0.2231 0.1738 0.1353 Ans: 9.1 e =0.1496 3.Estimate exp(1.85) from the following table using Newton’s Forward interpolation formula x 1.7 1.8 1.9 2.0 2.1 2.2 2.3 x e 5.474 6.050 6.686 7.839 8.166 9.025 9.974 Ans:6.3601 4.Find the polynomial which passes through the points (7,3)(8,1)(9,1)(10,9)using Newton’s interpolation formula. Tutorial Problems Tutorial 1 1.Apply Lagrange’s formula inversely to obtain the root of the equation f(x)=0,given that f(0)=-4,f(1)=1,f(3)=29,f(4)=52. Ans: 0.8225 2.Using Lagrange’s formula of interpolation ,find y(9.5) given the data X 7 8 9 10 Y 3 1 1 9 Ans: 3.625 3.Use Lagrange’s formula to find the value of y at x=6 from the following data X 3 7 9 10 Y 168 120 72 63 Ans: 147 4.If log(300)=2.4771,log(304)=2.4829,log(305)=2.4843,log(307)=2.4871find log(301) www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 54. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 59 Department of Mechanical Engineering Ans: 2.8746 5. Given Finduuuu ..15,33,9,6 7310  2u Ans:9 Tutorial 2 1.Given the data X 0 1 2 5 F(x) 2 3 12 147 Find the form of the function. Hence find f(3). Ans:35 2.Find f(x) as a polynomial in powers of(x-5) given the following table X 0 2 3 4 7 9 Y 4 26 58 112 466 922 Ans: 194)5(98)5(17)5()( 23  xxxxf 3.from the following table,find f(5) X 0 1 3 6 F(x) 1 4 88 1309 Ans:676 4.Fit the following data by a cubic spline curve X 0 1 2 3 4 Y -8 -7 0 19 56 Using the end condition that s1 and s5 are linearextrapolations. Ans:-8 5.Given the data X 1 2 3 4 Y 0.5 0.333 0.25 0.20 Find y(2.5) using cubic spline function. Ans:0.2829 Tutorial 3 1.from the following table,find the number of students who obtained less than 45 marks www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 55. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 60 Department of Mechanical Engineering Marks 30-40 40-50 50-60 60-70 70-80 No of students 31 42 51 35 31 Ans:48 2.Find tan(0.26) from the following valuesof tanx for 30.010.0  x X 0.10 0.15 0.20 0.25 0.30 Tanx 0.1003 0.1511 0.2027 0.2553 03093 Ans:0.2662 3.Using newton’s interpolation formula find (i) y when x=48 (ii) y when x=84 from the following data X 40 50 60 70 80 90 Y 184 204 226 250 276 304 Ans:199.84,286.96 4.Find the value of f(22) and f(42) from the following data X 20 25 30 35 40 45 F(x) 354 332 291 260 231 204 Ans:352,219 5.Estimate 0 38sin from the following data given below X 0 10 20 30 40 Sinx 0 0.1736 0.3240 0.5000 0.6428 Ans:12.7696 4.5. NUMERICAL DIFFERENTIATION AND INTEGRATION Numerical differentiation is the process of computing the value of , , … .. For some particular value of x from the given data (xi,yi), i=1, 2, 3…..n where y=f(x) is not known explicitly. The interpolation to be used depends on the particular value of x which derivatives are required. If the values of x are not equally spaced, we represent the function by Newton’s divided difference formula and the derivatives are obtained. If the values of x are equally spaced, the derivatives are calculated by using Newton’s Forward or backward interpolation formula. If the derivatives are required at a point near the beginning of the www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 56. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 61 Department of Mechanical Engineering table, we use Newton’s Forward interpolation formula and if the derivatives are required at a point near the end of table. We use backward interpolation formula. Derivatives using divided differences Principle First fit a polynomial for the given data using Newton’s divided difference interpolation formula and compute the derivatives for a given x. Problems 1.Compute )4()5.3( fandf  given that f(0)=2,f(1)=3;f(2)=12 and f(5)=147 Sol: Divided difference table x f ∆ f f 2 1 f 3 1 0 1 2 5 2 3 12 147 1 9 45 4 9 1 Newton’s divided difference formula is .......),,())((),()()()( 210101000  xxxfxxxxxxfxxxfxf Here ,2)(,2;,1;0 0210  xfxxx ),( 10 xxf =1, 1),,,(;4),,( 3210210  xxxxfxxxf 2)( 23  xxxxf 26)( 123)( 2   xxf xxxf .26)4(,75.42)5.3(  ff 2.Find the values )5()5( fandf  using the following data X 0 2 3 4 7 9 F(x) 4 26 58 112 466 22 Ans: 98 and 34. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 57. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 62 Department of Mechanical Engineering Exercise Derivatives using Finite differences Newton’s Forward difference Formula ........].......... 2 3 [ 1 ........] 12 11 [ 1 .......] 432 [ 1 0 4 0 3 33 3 0 4 0 3 0 2 22 2 0 4 0 3 0 2 0 0 0 0                            yy hdx yd yyy hdx yd yyy y hdx dy xx xx xx Newton’s Backward difference formula ........].......... 2 3 [ 1 ...].......... 12 11 [ 1 ].......... 432 [ 1 43 33 3 432 22 2 432                            nn xx nnn xx nnn n xx yy hdx yd yyy hdx yd yyy y hdx dy n n n Problems 1.Find the first two derivatives of y at x=54 from the following data x 50 51 52 53 54 y 3.6840 3.7083 3.7325 3.7563 3.7798 Sol: Difference table x y y y2  y3  y4  50 51 52 53 3.6840 3.7083 3.7325 3.7563 0.0244 0.0241 0.0238 0.0235 -0.0003 -0.0003 -0.0003 0 0 0 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 58. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 63 Department of Mechanical Engineering 54 3.7798 By Newton’s Backward difference formula ].......... 432 [ 1 432              nnn n xx yyy y hdx dy n Here h=1; ny =0.0235; 0003.02  ny 02335.0 54       xdx dy ............ 12 11 [ 1 432 2 54 2 2        nnn x yyy hdx yd =-0.0003 2.Find first and second derivatives of the function at the point x=12 from the following data x 1 2 3 4 5 y 0 1 5 6 8 Sol: Difference table X y y y2  y3  y4  1 2 3 4 0 1 5 6 1 4 1 2 3 -3 1 -6 4 10 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 59. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 64 Department of Mechanical Engineering 5 8 We shall use Newton’s forward formula to compute the derivatives since x=1.2 is at the beginning. For non-tabular value phxx  0 ,we have ....... 12 31192 6 263 2 12 [ 1 0 4 23 0 3 2 0 2 0        y ppp y pp y p y hdx dy Here 0x =1, h=1, x=1.2 2.0 0    p h xx p 17.14 773.1 2.1 2 2 2.1               x x dx yd dx dy Exercise: 1.Find the value of 0 31sec using the following data X 31 32 33 34 Tanx 0.6008 0.6249 0.6494 0.6745 Ans:1.1718 2.Find the minimum value of y from the following table using numerical differentiation X 0.60 0.65 0.70 0.75 Y 0.6221 0.6155 0.6138 0.6170 Ans: minimum y=0.6137 Numerical integration (Trapezoidal rule & Simpson’s rules ,Romberg integration) www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 60. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 65 Department of Mechanical Engineering The process of computing the value of a definite integral ∫ ydx from a set of values (xi,yi),i=0,1,2,….. Where 0x =a; bxn  of the function y=f(x) is called Numerical integration. Here the function y is replaced by an interpolation formula involving finite differences and then integrated between the limits a and b, the value∫ ydx is found. General Quadrature formula for equidistant ordinates (Newton cote’s formula) On simplification we obtain .......] 24 )2( 12 )32( 2 [ 0 3 2 0 2 00 0      y nn y nn y n ynhydx nx x This is the general Quadrature formula By putting n=1, Trapezoidal rule is obtained By putting n=2, Simpson’s 1/3 rule is derived By putting n=3, Simpson’s 3/8 rule is derived. Note: The error in Trapezoidal rule is of order h2 and the total error E is given by E = − ( ) h y”((x)) is the largest of y …. Simpson’s 1/3 rule )]......(2)......(4)[( 3 264215310 0   n x x nn yyyyyyyyyy h ydx n Error in Simpson’s 1/3 rule The Truncation error in Simpson’s 13 rule is of order h4 and the total error is given by )()( 180 )( 4 xwhereyxyh ab E iviv  is the largest of the fourth derivatives. Simpson’s 3/8 rule ......)](2......)(3)[( 8 3 9634210 0  yyyyyyyy h ydx nx x n www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 61. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 66 Department of Mechanical Engineering Note: The Error of this formula is of order h5 and the dominant term in the error is given by )( 80 3 5 xyh iv  Problems 1.Evaluate   0 sin xdx by dividing the interval into 8 strips using (i) Trapezoidal rule (ii) Simpson’s 1/3 rule Sol: For 8 strips ,the values of y=sinx are tabulated as follows : X 0 8  4  8 3 2  8 5 4 3 8 7  Sinx 0 0.3827 0.7071 0.9239 1 0.9239 0.7071 0.3827 0 (i)Trapezoidal rule   0 sin xdx = ]2)9239.07071.03827.0(4[ 16   =1.97425 (ii)Simpson’s 1/3 rule   0 sin xdx = )]7071.017071.0(2)03827923.023.03827.0(4[ 24   =2.0003 2.Find   1 0 2 1 x dx by using Simpsons 1/3 and 3/8 rule. Hence obtain the approximate value of π in each case. Sol: We divide the range (0,1) into six equal parts, each of size h=1/6.The values of 2 1 1 x y   at each point of subdivision are as follows. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 62. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 67 Department of Mechanical Engineering X 0 1/6 2/6 3/6 4/6 5/6 1 Y 1 0.9730 0.9 0.8 0.623 0.5902 0.5 By Simpson’s 1/3 rule, )](2)(4)[( 31 4253160 1 0 2 yyyyyyy h x dx   )]5923.1(2)3632.2(45.1[ 18 1  =0.7854 (1) By Simpson’s 3/8 rule, ]2)(3)[( 8 3 1 3542160 1 0 2 yyyyyyy h x dx   ]6.1)1555.3(35.1[ 16 1  =0.7854 (2) But )0(tan)1(tan)(tan 1 111 0 1 1 0 2    x x dx = From equation (1) and (2), we have = 0.7854 π=3.1416 Exercise: 1.Evaluate dxe x   2.1 0 2 using (i) Simpson’s 1/3 rule (ii) Simpson’s 3/8 rule ,taking h=0.2 Ans: (i) dxe x   2.1 0 2 =0.80675 (ii) dxe x   2.1 0 2 =0.80674 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 63. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 68 Department of Mechanical Engineering Unit- 5 Numerical Solution of ordinary Differential equations Taylor’s series method 5.1.Introduction The solution to a differential equation is to function that satisfies the differential equation and that also satisfies certain initial conditions on the function. The solution of this differential equation involves n constants and these constants are determined with help of n conditions. Single step methods: In these methods we use information about the curve at one point and we do not iterate the solution. The method involves more evaluation of the function. We will discuss the Numerical solution by Taylor series method, Euler methods and Runge - Kutta methods all require the information at a single point x=x0. Multi step methods: These methods required fewer evaluations of the functions to estimate the solution at a point and iteration are performed till sufficient accuracy is achieved. Estimation of error is possible and the methods are called Predictor-corrector methods. In this type we mainly discuss Milne’s and Adams-Bashforth method. In the multi step method , to compute yn+1,we need the functional values yn,yn-1, yn-2 and yn-3. 5.2 Taylor Series method Consider the first order differential equation 00 )(),,( yxyyxf dx dy  ……(1) The solution of the above initial value problem is obtained in two types  Power series solution  Point wise solution (i) Power series solution y(x) = y + ! y + ( ) ! y + ( ) ! y +……. (2) Where r r r dx yd y  )( 0 at(x , y ) www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 64. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 69 Department of Mechanical Engineering Using equation (1) the derivatives y ,y ,y , … … can be found by means of successive differentiations .Expressions (2) gives the value for every value of x for which (2) converges. (ii)Point wise solution y =y + !1 h y + ! y + ! y +… Where r r r m dx yd y  )( at (x , y ) Where m=0,1,2,……. Problems: 1. Using Taylor series method find y at x=0.1 if dx dy =x y-1,y(0)=1. Solution: Given y =x y-1 and x =0,y =1,h=1 Taylor series formula for y is y =y + !1 h y + ! y + ! y +… y =x y-1 y =x y − 1=0-1=-1 y =2xy+x y y = 2x y +x y =0+0=0 y =[xy + y]+x y +2xy =2xy +2y+x y +2xy =2y+ 4xy +x y y =2y +4x y +x y =2(1)+4(0)(-1)+(0 )(0) =2 y =2y +4[xy + y ]+x y +y 2x =2y +4xy +4y +x y +y 2x =6y + 6xy +x y y =6y +6x y +x y =6(-1)+6(0)(0)+(0)(2) =-6 (1) y =1+ . ! (-1)+ ( . ) ! (0)+ ( . ) ! (2)+ ( . ) ! (−6)+… www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 65. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 70 Department of Mechanical Engineering Y(0.1)=1-(0.1)+ ( . ) − ( . ) +… =1-0.1+0.00033-0.000025=0.900305 2. Find the Taylor series solution with three terms for the initial value problem. =x +y,y(1)=1. Solution: Given y =x +y, x =1, y =1. y =x +y y =x +y =1+1=2 y =3x +y y = 3x +y =3(1)+2 =5 y =6x+y y =6x +y =6(1)+5 =11 Taylor series formula Y=y + ! y + ( ) ! y + ( ) ! y +……. =1+(x-1)(2)+ ( ) ! (5)+ ( ) ! (11)(app) =1+2(x-1)+ (x − 1) + (x − 1) Exercise: 1.Find y(0.2),y(0.4) given =xy +1,y(0)=1 [Ans:-1.226,1.5421 ] 2.Find y(0.1) given y =x y-1,y(0)=1 [Ans:- 0.9003 ] www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 66. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 71 Department of Mechanical Engineering 5.3.Euler’s Method: 1.using Euler’s method compute y in the range 0≤ x ≤ 0.5 if y satisfies =3x+y ,y(0)=1. Solution: Here f(x,y) = 3x+y , x =0, y =1 By Euler’s method y = y +f(x ,y ),n=0,1,2,3,…… (1) Choosing h=0.1, we compute the value of y using (1) y = y +f(x ,y ),n=0,1,2,3,…… y(0.1) = y =y +hf(x ,y )=1+(0.1)[3(0)+(1) ] =1.1 y(0.2) = y =y +hf(x ,y )=1.1+(0.1)[0.3+(1.1) ] =1.251 y(0.3) = y =y +hf(x , y )=1.251+(0.1)[0.6+(1.251) ] =1.4675 y(0.4) = y =y +hf(x ,y )=1.4675+(0.1)[0.9+(1.4675) ] =1.7728 y(05) = y =y +hf(x , y )=1.7728+(0.1)[1.2+(1.7728) ] =2.2071 MODIFIED EULER’S METHOD: 1. Given =-xy , y(0)=2. Using Euler’s modified method, find y(0.2)in two steps of 0.1 each. Solution: Let x = x +h. here x = 0, y = 2 and h=0.1 The value of y at x= x is y By modified Euler method, y ( ) = y +hf( x , y ) y = y + [f( x , y ) + f( x , y ( ) )] Here f(x,y) = -xy f( x , y )= - x , y =0 y ( ) =2+(0.1)(0)=2 y =2+ . [f(0,2)+f(0.1,2)] www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 67. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 72 Department of Mechanical Engineering =2+0.05[0+(-0.1)(4)] y =1.98 Y(0.1)=1.98 To find y(0.2) y ( ) = y + hf( x , y ) =1.98 –(0.1)(0.1)(1.98)=1.9602 y = y + [f( x , y ) + f( x ,y ( ) )] =1.9602-(0.05)[(0.198)+(0.39204)] y = 1.9307 Hence y(0.2)=1.9307 5.4.Runge-kutta method The Taylor’s series method of solving differential equations numerically is restricted because of the evaluation of the higher order derivatives.Runge-kutta methods of solving intial value problems do not require the calculations of higher order derivatives and give greater accuracy.The Runge-Kutta formula posses the advantage of requiring only the function values at some selected points.These methods agree with Taylor series solutions upto the term in hr where r is called the order of that method. Fourth-order Runge-Kutta method This only is commonly used for solving initial values problem 00 )(),,( yxyyxf dx dy  Solution of Boundary value problems in ODE The solution of a differential equation of second order of the form 0),,,(  yyyxF contains two arbitrary constants. These constants are determined by means of two conditions. The conditions on y and 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. In this chapter ,we consider the finite difference method of solving linear boundary value problems of the form. www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 68. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 73 Department of Mechanical Engineering 5.5.Finite difference approximations to derivatives First derivative approximations )( )()( )( hO h xyhxy xy    (Forward difference) )( )()( )( hO h hxyxy xy    (Backward difference) )( 2 )()( )( 2 hO h xhyhxy xy    (Central difference) Second derivative approximations )( )()(2)( )( 2 2 hO h hxyxyhxy xy    (Central difference) Third derivative approximations ]22[ 2 1 )( 21123   iiii iii yyyy h xy Fourth derivative approximations ]464[ 1 )( 21124   iiiii iv yyyyy h xy Solution of ordinary differential equations of Second order h yy y ii i 2 11     2 11 2 h yyy y iii i     Problems 1. Solve 2)2(,1)1(,0  yyyyx with h=0. And h=0.25 by using finite difference method. Sol: (i) Divide the interval[1,2] into two sub-intervals with h=(2-1)/2=0.5 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 69. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 74 Department of Mechanical Engineering X0=1 x1=1.5 x2=2 Let hxx ii 1 , Here 2,5.1,1 210  xxx By Boundary conditions are 2)2(,1)1(  yy 2,1 20  yy We have to determine 1y for 1x =1.5 Replacing the derivative y  by 2 11 2 h yyy y iii     0]2[ 112   iiii i yyyy h x (1) Put i=1 we get 0]2[4 12101  yyyyx Using 1x =1.5, 2,1 20  yy we get, 11 18 1 y y(1.5)=1.6364 (ii) With h=0.25 ,we have the number of intervals =4 X0=1 x1=1.25 x2=1.5 x3=1.75 x4=2 By boundary condition, 2,1 40  yy www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 70. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 75 Department of Mechanical Engineering We find the unknown from the relation, ....3,2,1,0)2(16 11   iyyyyx iiiii (2) Put i=1 in (2), 202039 21  yy Put i=2 in (2), 0244728 321  yyy Put i=3 in (2), 0565528 32  yy We have the system of equations , 202039 21  yy 0244728 321  yyy 565528 32  yy Solution of Gauss-Elimination method ( ⁄ )= − − − − ~ − . − . − . . − → , → , → ~ − . − . − . . − . − → − ~ − . − . − . . − . − . → + . The equivalent system is 403.3838.1 513.0445.1 513.0513.0 3 32 21    y yy yy By back substitution, the solution is 851.13 y , 635.12 y , 351.11 y Hence y(1.25)=1.351,y(1.5)=1.635,y(1.75)=1.851 www.Vidyarthiplus.com www.Vidyarthiplus.com
  • 71. KIT MA6452 STATISTICS AND NUMERICAL METHODS SCE 76 Department of Mechanical Engineering Exercise: 1. Solve by finite difference method, the boundary value problem 02 2  y dx yd with y (0) =0 and y (2) =4. Ans: 3583.23 y , 3061.12 y , 5805.01 y 2. Solve 1)2(0)1(,0  andyyyyx with h=0.5 www.Vidyarthiplus.com www.Vidyarthiplus.com