Stucor Ma3251 Aq
Stucor Ma3251 Aq
Stucor Ma3251 Aq
P
AP
R
CO
Conclusion:
(i) To test if the sample mean x differs significantly from the hypothetical value of
the population mean.
(ii) To test the significance of the difference between two sample means.
(iii) To test the significance of an observed sample correlation coefficient and sample
regression coefficient.
5. Given n1 n2 20, x1 220, x 2 250, s1 20, s2 25 . Compute the standard error for x1 x2
s12 s22
S .E ( x1 x 2 )
n 1
400 625
7.345
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
6. A random sample of size 16 has 53 as mean and the sum of the squares of the deviation taken
from Mean is 150. Can this sample be regarded as taken from the population having 56 as mean?
( t for 15 d.f at 5% level=2.13)
P
(53 56) 2
(1) t 3.8
3.162
AP
t 3.8
Since t 2.13, H 0 is rejected . The sample is not drawn from the population
Having 56 as mean
7. Two independent samples from normal pop's with equal variances gave the following results
R
Samp Size Mean S.D
CO
1 16 23.4 2.5
2 12 24.9 2.8
Test for the equations of means.
U
ST
P
AP
.
R
CO
U
ST
considered to be good. If the calculated 2 >table value, the fit is considered to be poor.
The value of 2
(O E )
i i
2
Ei
Oi : Observed frequency
Ei : Expected frequency
P
Oi : 37 44 19
Ei : 31 38 31
AP
2
(O E )
i i
2
36 36 144
6.76
Ei 61 38 31
a b
11. For 2x2 consistency table
c d
Write the formula for 2
R
(a b c d )(ad bc)2
2
(a c)(b d )(a b)(c d )
CO
(8 80)2 (24)
2 6.17
(10)(14)(12)(12)
ST
P
AP
R
CO
U
16. Two samples of sizes 9 and 8 give the sum of squares of deviations from their
respective means equal to 160 and 91 respectively. Compute the value of F.
160 91
S12 20; S22 13
8 7
here S1 S 2 ,
2 2
S12 20
F 1.5385
S 22 13
F 1.5385
P
AP
R
CO
U
ST
UNIT-II
DESIGN OF EXPERIMENTS
Design of experiments:
Design of experiments may be defined as the logical construction of the experiment in which
the degree uncertainty with which the inference as drawn may be well defined.
The purpose of experimental design is to obtain maximum information of an experiment with
the minimum experimental error, cost and labour.
P
AP
The following three basic principles are adopted when the experiments are designed.
1. Randomization.
2. Replication.
3. Local control.
Randomization
R
Randomization is a technique by which two or more treatments are applied to different group
CO
of the sample, the treatments to be applied to any group being decided by random sampling technique.
Replication
Replication means the repetition of an experiment. It means the repetition of the treatment
under investigation. It helps us in estimating the experimental error. Thus, the repetition of treatments
U
The process of reducing the experimental error by dividing the relatively the heterogeneous
experimental area into homogeneous is known as local control.
we use local control which involves “grouping”(combining homogenous set of plots) ,
“blocking”(assigning same number of plots in different blocks) and “balancing”(adjusting
grouping and blocking procedure) of experimental units.
ANALYSIS OF VARIANCE
Analysis of variance is technique, which is used to test the equality of three or more population
means by comparing the sample variances using F-distribution. This technique split up the variance
into its various components, usually into two parts
i. Variance between the samples.
ii. Variance within the samples.
P
n-Number of samples in each treatment.
STEP 1: Set up Null Hypothesis H0
AP
Set up Alternative Hypothesis H1
Prepare Table – I using the following steps:
STEP 2: Find Sum of all the items of the sample where K isnumber of
Treatments, T-total and G-Grand total.
R
STEP 3: FindSum of squares of all the items of eachtreatment
STEP 4: Find the Correction Factor (C.F) = (G-Grand total, N-Total number of obsevations)
CO
STEP9:Find Sum of squares within samples (SSW) = Total sum of squares (T.S.S) - Sum of squares
between samples(SSB)
STEP 10:FindMean square within samples
(MSW) =
P
MSB = Mean square between samples
MSW= Mean square within samples
AP
Calculated F – value
If (or)
If
R
Type-1:Reframe the table by applying the principles of experimental design.
CO
Null Hypothesis H0: There is no significant difference among the average yields in the 3 treatments.
AlternativeHypothesis H1: There is significant difference among the average yields in the 3
treatments.
Table – I (calculations for ANOVA):
Total sum of squares (T.S.S) =
Sum of squares between samples (SSB)
B 4 4 7 - 81
C 3 5 1 - 35
Grand total
C.F = 200
P
AP
Source of Sum of Degree of
Mean squares F-Ratio
variation squares freedom
Between
SSB = 6
samples
Within
SSW = 34 1.
samples
R
)
CO
Calculated value of is 1.62
There is no significant difference among the average yields in the 3 treatments.
Sum of
Source of Degree of
square Mean squares F-Ratio
variation freedom
s
ST
Column
treatment SSC
s
Row
treatment SSR
s
Error (or)
SSE
Residual
Where,
SSC = Sum of squares between blocks (columns)
SSR = Sum of squares between varieties (rows)
MSC = Mean square between blocks (columns)
MSR = Mean square between varieties (rows)
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
1. The yield of four strains of a particular variety of wheat was planted in five
randomized blocks in Kgs per plot is given below.
Blocks
Strains
1 2 3 4 5
A 32 34 34 35 36
B 33 33 36 37 34
C 30 35 35 32 35
D 29 22 30 28 28
Test for difference between blocks and difference between strains.
P
ANOVA table
AP
R
CO
Calculated value of is
Fc <Null hypothesis H0 (i) is accepted.
ST
ANOVA TABLE
Where,
SSC = Sum of squares between columns
P
SSR = Sum of squares between rows
SST = Sum of squares between rows
AP
MSC = Mean square between treatments
MSR = Mean square between rows
MST = Mean square between treatments
SSE = Residual Sum of squares = T.S.S – (S.S.C + S.S.R+S.S.T)
MSE = Mean square error
R
Problems:
1. Analyze the following results of a Latin square experiments:
CO
1 2 3 4
1 A(12) D(20) C(16) B(10)
2 D(18) A(14) B(11) C(14)
3 B(12) C(15) D(19) A(13)
4 C(16) B(11) A(15) D(20)
U
The letter A, B, C, D denotes the treatments and the figures in brackets denote the observations
Solution:
ST
P
Conclusion:(i)For Columns:Tabulated value of for (6, 3) at 5% l.o.s is 8.94. Calculated value of
is .24. < Null hypothesis H0 (i)is accepted.
AP
(ii)For Rows:Tabulated value of for (3, 6) at 5% l.o.s is 4.76. Calculated value of is
< Null hypothesis H0 (ii)is accepted.
(iii)For Treatments:Tabulated value of for (3, 6) at 5% l.o.s is 4.76. Calculated value of is
> Null hypothesis H0 (iii)is rejected.
R
22-Factorial Design:
CO
In the 22-Factorial Design we will have 2 factors each at two levels (0, 1) (say). Then there are 2×2 i.e.,
4 treatment combinations in all. This 22-Factorial Design can be performed in the form of CRD,
RBD, LSD.By Yate‟s notation “K” and “P” denote the 2 factors under study and „k‟ and „p‟ denote
U
one of the 2 levels of each corresponding factors and this is called second level. The first level of “K”
and “P” is generally expressed by the absence of the corresponding letter in the treatment
ST
combinations.
The four treatment combinations are,
– Factors “K” and “P” both at first level.
– “K” at second level and “P”at first level.
– “K” at first leveland “P”at second level
– Factors “K” and “P” both at second level.
NOTE:
1.
2.
3.
1. An experiment was planned to study the effect of sulphate of potash & super phosphate
on the yield of potatoes. All the combinations of 2 levels of super phosphate ( 0 cent (p 0) &
0 cent (p1) / acre) were studied of potash ( 0 cent (k0) and 0 cent (k1) / acre) were studied in
a randomized block design with 4 replications for each.The (1 / 70) obtained are given in
the following table. Analyze the data & give your conclusions at 1% level
Block Yields (lb per plot)
I (1)
23 25 22 38
II (1)
40 26 36 38
III (1)
29 20 30 20
IV (1)
P
34 31 24 28
AP
R
CO
U
ST
Conclusion:
NEWTON'S METHOD
The Newton-Raphson method in one variable is implemented as follows:
Given a function ƒ defined over the reals x, and its derivative ƒ ', we begin with a first
guess x0 for a root of the function f. Provided the function is reasonably well-behaved a better
approximation x1 is
Geometrically, (x1, 0) is the intersection with the x-axis of a line tangent to f at (x0, f (x0)).
P
The process is repeated as
AP
until a sufficiently accurate value is reached.
ITERATIVE FORMULA:
R
f ( xn )
xn1 xn Where n=0, 1, 2, 3.............
f ' ( xn )
CO
f(x) = x 2 6 x 4
f(0) = 4
f(1) = -1
Therefore , the root lies between 0 and 1.
Let x0=1
f ( x0 )
STEP4: 1st iter eation: x1 x0
f ' ( x0 )
Here, x0=1, f ( x0 ) = x0 2 6 x0 4 = -1, f ' ( x0 ) = 2 x0 6 =-3
x1 = 0.67
f ( x1 )
2nd itereation: x2 x1
f ' ( x1 )
Here, x1 = 0.67, f ( x1 ) = x1 2 6 x1 4 = .28, f ' ( x1 ) = 2 x1 6 =-4.65
x2 = 0.73
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
f ( x2 )
3rd itereation: x3 x2
f ' ( x2 )
Here, x2 = 0.73, f ( x2 ) = x2 2 6 x2 4 = .009, f ' ( x2 ) = 2 x2 6 =-4.4013
x1 = 0.73
Therfore, x1 = x2 = 0.73
RESULT: x=0.73
Show that the Newton Raphson formula to find a can be expressed in the
1 a
form x n 1 = x n ,n=0,1,2,3…..
2 xn
Sol:
If x = a
P
x2 = a
x2 - a = 0
AP
f(x) = x 2 -a
f ( x) 2 x
f ( xn )
xn 1 x n
f ( x n )
xn a xn a
2 2
x n 1 x n =
R 2 xn 2 xn
1 a
x n 1 = x n , n = 0, 1, 2, 3…..
CO
2 xn
1
Let x =
N
1
ST
N =
x
1
f(x) = -N
x
1
f ( x) 2
x
f ( xn )
xn 1 x n
f ( x n )
1
N
xn
= xn -
1
2
xn
1
= x n +x n 2 ( N )
xn
= 2x n -N x 2n
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
x n 1 = x n (2-N x n ).
GAUSSIAN ELIMINATION
PROBLEMS RELATED TO GAUSS ELIMINATION METHOD
1.Apply Gauss elimination method to solve the equation 10x-2y+3z=23,2x+10y-5z=-33,3x-4y+4z=41.
SOLUTION:
P
STEP3: [A,I] = 2 10 5 33
3 4 10 41
AP
10 2 3 23
0 52 28 188 R2-5R2-R1
3 4 10 41
10 2 3 23
R
0 52 28 188 R3-10R3-3R1
0 34 91 341
CO
10 2 3 23
0 52 28 188 R -52R3+34R2
3
0 0 378011340
This is an upper triangular matrix.
Therfore, 3780z = 11340
U
z = 3,
52y-28z=-188,
y =-2.
ST
10x-27+3z=23,
x =1
RESULT: x =1 y =-2. z = 3,
By performing elementary row operations on the [AI] matrix until it reaches reduced row echelon
form, the following is the final result:
P
AP
The matrix augmentation can now be undone, which gives the following:
R
A matrix is non-singular (meaning that it has an inverse matrix) if and only if the identity matrix can
be obtained using only elementary row operations.
CO
a2x+b2y+c2z=d2,
a3x+b3y+c3z=d3,
a1 c1 d1 x
ST
b1
It is equivalent to AX=B where A= a 2 b2 c 2 , B= d 2 , X= y
a3 b3 c3 d 3 z
Step: 2 To reduce the augmented matrix [A,I] into a diagonal matrix using the elementary
row operations
Step: 3 To solve the matrix without using back substitution method
PROBLEMS RELATED TO GAUSS JORDAN METHOD
1.Solve the system of equations10x-2y+3z=23, 2x+10y-5z=-33, 3x-4y+4z=41.By Gauss Jordan
method.
SOLUTION:
STEP1: Given, 10x-2y+3z=23,
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
3x-4y+4z=41.
STEP2: To solve 10x-2y+3z=23, 2x+10y-5z=-33, 3x-4y+4z=41 using Gauss Jordan method.
10 2 3 23
STEP3: [A,I] = 2 10 5 33
3 4 10 41
10 2 3 23
0 52 28 188 R2-5R2-R1
3 4 10 41
10 2 3 23
0 52 28 188 R3-10R3-3R1
0 34 91 341
P
10 2 3 23
28 188 R3-52R3+34R2
0 52
AP
0 0 378011340
12600 2520 0 17640
28 188 R1-1260R1-R3
0 52
0 0 378011340
R
12600 2520 0 17640
0 7020 0 14040
CO
R2-135R2+R3
0 0 3780 11340
88452000 0 088452000
14040
0 7020 0 R1-7020R1+2520R2
3780 11340
U
0 0
This is a diagonal matrix.
z = 3,
ST
y =-2.
x =1
RESULT: x =1 y =-2. z = 3,
2. Solve the principle used in Gauss Jordan method 5x+4y = 15, 3x+7y = 12.
Sol:
5 4 x 15
The given system is equivalent to =
3 7 y 12
A X=B
5 4 15
[A, B] =
3 7 12
5 4 15
[A, B] ~ R2 5R2 3R1
0 2315
115
0 285
0 DOWNLOADED
~ R1 23R1 4R2
23 FROM STUCOR15APP
DOWNLOADED FROM STUCOR APP
115 x = 285
x = 2.4783
23 y = 15
y = 0.6522.
JACOBI METHOD
DESCRIPTION:
where:
P
AP
Then A can be decomposed into a diagonal component D, and the remainder R:
R
CO
Note that the computation of xi(k+1) requires each element in x(k) except itself. Unlike the Gauss–
Seidel method, we can't overwrite xi(k) withxi(k+1), as that value will be needed by the rest of the
ST
x (1)
1
a1
d 1 b1 y ( 0 ) c1 z ( 0)
y (1) d 2 a 2 x ( 0 ) c 2 z ( 0 ) ..........................(3)
1
b2
z (1) d 3 a 3 x ( 0 ) b3 y ( 0 )
1
c3
This process may be repeated till the difference between two consecutive approximations is
negligible.
PROBLEMS RELATED TO GAUSS JACOBI METHOD
P
1. Solve by Jacobi iteration method correct to two decimal places 27x+6y-
z=85,x+y+54z=110,6x+15y+2z=72.
AP
SOLUTION:
STEP1:Given, 27x+6y-z=85,
x+y+54z=110, (1)
R
6x+15y+2z=72.
This is not a diagonally dominant.
CO
P
Z(5)=(110-x(5)-y(5))/54=1.927
(6th iteration)
AP
STEP7:
X(6) =(85-6y(5) +z(5))/27=2.425
Y(6)= (72-6x(5) -2z(5))/15=3.570
Z(6)=(110-x(5) -y(5))/54=1.926
Here, x5=x6=2.43,( correct to 2 decimal places)
R
Y5=y6=3.57,( correct to 2 decimal places),
Z5=z6=1.93,( correct to 2 decimal places).
CO
RESULT: x=2.43,y=3.57,z=1.93
2. Solve the system of equation by
2x-3y+20z = 25,20x+ y - 2z =17, 3x+20y –z = -18 by Gauss Jacobian method
[Only two iteration].
U
Sol:
As the coefficient matrix is not diagonally domain as it is we rewrite the equation.
20x + y - 2z = 17
3x + 20y – z = -18
ST
2x - 3y + 20 z = 25
Now the diagonal element is domain in the coefficient matrix,
We write x, y, z as following:
x=
1
17 y 2 z
20
y=
1
18 3x z
20
z=
1
25 2 x 3 y
20
Let the initial condition be x = 0, y = 0, z = 0.
First iteration:
x1
1
17 y0 2 z 0 =0.85
20.
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
y1 =
1
18 3x0 z 0 1 (18) 0.9
20 20
z1 =
1
25 2 x0 3 y0 1 (25) 1.25
20 20
Second Iteration:
x 2 =1.02
y 2 = -0.965
z 2 = 1.03.
GAUSS–SEIDEL METHOD
P
DESCRIPTION:
Given a square system of n linear equations with unknown x:
AP
where:
R
CO
Then A can be decomposed into a lower triangular component L*, and a strictly upper
triangular component U:
U
ST
The Gauss–Seidel method is an iterative technique that solves the left hand side of this expression
for x, using previous value for x on the right hand side. Analytically, this may be written as:
However, by taking advantage of the triangular form of L*, the elements of x(k+1) can be computed
sequentially using forward substitution:
Note that the sum inside this computation of xi(k+1) requires each element
in x(k) except x (k) itself.
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
The procedure is generally continued until the changes made by an iteration are below some tolerance.
WORKING PROCEDURE:
x
1
d 1 b1 y c1 z
a1
y
1
d 2 a 2 x c 2 z
b2
z
1
d 3 a 3 x b3 y .
c3
P
1
We start with the initial values y , z 0 and get x , y , z
( 0) ( 0) (1) (1)
AP
First iteration
x (1)
1
a1
d1 b1 y ( 0) c1 z ( 0)
y (1)
1
d 2 a2 x (1) c2 z ( 0)
R
b2
d 3 a3 x (1) b3 y (1)
CO
1
z (1)
c3
Second iteration
d 1 b1 y (1) c1 z (1)
U
1
x ( 2)
a1
y ( 2)
1
d 2 a 2 x ( 2 ) c2 z (1)
ST
b2
z ( 2)
1
c3
d 3 a3 x (2) b3 y ( 2)
The above process may continue for third, fourth etc..., iterations.
27x+6y-z=85,………………………(1)
6x+15y+2z=72, ……………………(2)
x+y+54z=110, ……………………..(3)
This is a diagonally dominant.
From (1), x=(85-6y+z)/27,
From (2), y=(72-6x-2z)/15
From (3), z=(110-x-y)/54.
Lety=z=0
st
STEP2: (1 iteration)
X(1) =(85-6y(0)+z(0))/27=85/27=3.148.
Y(1)= (72-6x(1) -2z(0))/15=72/15=3.541.
Z(1)=(110-x(1) -y(1))/54=110/54=1.913
STEP3: (2nd iteration)
P
X(2) =(85-6y(1) +z(1))/27=2.157.
Y(2)= (72-6x(2) -2z(1))/15=3.269
AP
Z(2)=(110-x(2) -y(2))/54=1.890
STEP4: (3rd iteration)
X(3) =(85-6y(2) +z(2))/27=2.432
Y(3)= (72-6x(3) -2z(2))/15=3.572
Z(3)=(110-x(3) -y(3) 54=1.926
STEP5:
R
(4th iteration)
X(4) =(85-6y(3)+z(3))/27=2.401.
Y(4)= (72-6x(4)-2z(3))/15=3.545
CO
Z(4)=(110-x(4)-y(4))/54=1.923
STEP6: (5th iteration)
X(5) =(85-6y(4)+z(4))/27=2.426
Y(5)= (72-6x(5)-2z(4))/15=3.573
Z(5)=(110-x(5)-y(5))/54=1.926
U
Z(6)=(110-x(6) -y(6))/54=1.926
Here, x5=x6=2.43,( correct to 2 decimal places)
Y5=y6=3.57,( correct to 2 decimal places),
Z5=z6=1.93,( correct to 2 decimal places).
RESULT: x=2.43,y=3.57,z=1.93
2. Solve by Gauss Seidel method x-2y =-3, 2x+25y = 15 correct to four decimal
places.
Sol:
x- 2y = - 3
2x + 25y = 15
x = -3 +2y
1
y= (15-2x)
25
Let be the initial value y 0 = 0
First iteration:
y DOWNLOADED
=- FROM STUCOR APP
3 + 2 (0) = -3
DOWNLOADED FROM STUCOR APP
y1 =
1
15 2 x1 =0.84
25
2 nd iteration:
x 2 = -1.32
y 2 = 0.7056
3 iteration:
x 3 = -1.5888
y 3 = 0.7271
4 iteration:
x 4 = -1.5458
y 4 = 0.7237
5 iteration:
P
x 5 = -1.5526
y 5 = 0.7242
AP
6 iteration:
x 6 = -1.5516
y 6 = 0.7241
7 iteration:
x 7 = -1.5518
y 7 = 0.7241
R
8 iteration:
x 8 = -1.5518
CO
y 8 = 0.7241
Hence x = -1.5518 and y = 0.7241
U
a1 b1 c1
Consider, A= a 2 b2 c 2 .
a3 b3 c3
Step: 2 To reduce the augmented matrix [A,I] into [A,X] using the elementary row
operations
Then , X=A-1
2 2 3
1. Find the inverse of A 2 1 1 by Gauss-Jordan method.
1 3 5
SOLUTION:
2 2 3
STEP1: Given, A 2 1 1
1 3 5
2 2 3
To Find the inverse of A 2 1 1 by Gauss-Jordan method.
P
STEP2:
1 3 5
AP
2 2 3 1 0 0
STEP3: [A,I] = 2 1 1 0 1 0
1 3 5 0 0 1
1 1 3 / 2 1 / 2 0 0
2 1 1 0 1 0 R1=R1/2
R
1 3 5 0 0 1
CO
1 1 3 / 2 1 / 2 0
0 1 2 1 1 0
0 2 7 / 2 1 / 2 0 1
1 1 3 / 2 1 / 2 0
0 1 1 0
U
2 1
0 2 7 / 2 1 / 2 0 1
1 0 1 / 2 1 / 2 1 0
ST
0 1 2 1 1 0
0 0 1 / 2 5 / 2 2 1
1 0 1 / 2 1 / 2 1 0
0 1 2 1 1 0
0 0 1 5 4 2
1 0 0 2 1 1
0 1 0 9 7 4
0 0 1 5 4 2
2 1 1
-1
Hence, A = 9 7 4
5 4 2
2 1 1
RESULT: A = 9 7
-1
4
5 4 2
WORKING PROCEDURE:
1 0 0
X1 0 (or) X 2 1 (or) X 3 0
P
0 0 1
AP
STEP1: To write the Given matrix A
STEP2: To find AX1= 1 X2
STEP3: A X2= 1 X3
STEP4: A X3= 1 X3
STEP5: A X4= 1 X5
R
……………………………………………………………
CO
…………………………………………………………..
……………………………………………………………
The above process may continue for third, fourth etc..., upto getting required values.
PROBLEMS RELATED TO POWER METHOD
U
1. Using Power method find the largest Eigen value and its corresponding Eigen
1 3 2
vector 4 4 1 .
ST
6 3 5
SOLUTION:
1 3 2
STEP1: Given, A= 4 4 1
6 3 5
1
Let, X1= 0
0
1 0.167
STEP2: AX1= 4 =6 .667 =6 X2
6 1
0.166 .021
STEP3: A X2= 2.336 =8.003 .292 =8.003 X3
8.003 1
1.145 .191
STEP4: A X3= .252 =6.002 .042 =6.002X4
6.002 1
2.065 .329
STEP5: A X4= .068 =6.272 .011 =6.272 X5
6.272 1
2.362 .34
STEP6: A X5= .272 =6.941 .039 =6.941 X6
P
6.941 1
2.223 .311
AP
STEP7: A X6= .516 =7.157 .072 =7.157 X7
7.157 1
2.095 .296
STEP8: A X7= .532 =7.082 .075 =7.082 X8
R
7.082 1
2.071 .296
CO
6.983 1
2 .1 .1 .3
ST
UNIT IV
P
y 0 = 0, y 1 = 1, y 2 = 0
AP
Step 2: To find find the quadratic polynomial Using Lagreange‟s formula
Step 3: Required formula,
y =
( x x1) ( x x 2 ) ( x x 0) ( x x2 ) ( x x 0) ( x x1 )
y0 y1 y2
(1)
( x0 x1 ) ( x0 x2 )
R ( x1 x0 ) ( x1 x2 ) ( x2 x0 ) ( x2 x1 )
Step 4: Calculations,
CO
( x 1) ( x 3) ( x 0) ( x 3) ( x 0) ( x 1)
Y = 0 1 0
(0 1) (0 3) (1 0) (1 3) (3 0) (3 1)
U
x 2 3x
=
2 2
x 2
3x
ST
RESULT : y =
2 2
2. Find the polynomial f(x) by using Lagrange formula and hence find f(3) for
x0 x1 x2 x3
x 0 1 2 5
f(x) 2 3 12 147
y0 y1 y2 y3
Solution:
( x x0 ) ( x x1 )( x x3 ) ( x x0 ) ( x x1 )( x x2 )
y2 y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )
( x 1) ( x 2)( x 5) ( x 0) ( x 2)( x 5)
y = f(x) = (2) + (3) +
(0 1)(0 2)(0 5) (1 0)(1 2)(1 5)
( x 0) ( x 1)( x 5) ( x 0) ( x 1)( x 2)
(12) (147)
(2 0)(2 1)(2 5) (5 0)(5 1)(5 2)
(3 1) (3 2)(3 5) (3 0) (3 2)(3 5)
y = f(3) = (2) + (3) +
10 4
P
(3 0) (3 1)(3 5) (3 0) (3 1)(3 2)
(12) (147)
6 60
AP
4 6 147
= (2) (3) 2(12)
10 4 10
= 35 R
3. Find the missing term in the following table using Lagrange „s interpolation
CO
x 0 1 2 3 4
y 1 3 9 - 81
Sol:
By Lagrange‟s interpolation formula
U
( x x1 ) ( x x2 )( x x3 ) ( x x0 ) ( x x2 )( x x3 )
y = f(x) = y0 + y1
( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 )
ST
( x x0 ) ( x x1 )( x x3 ) ( x x0 ) ( x x1 )( x x2 )
y2 y3
( x2 x0 )( x2 x1 )( x2 x3 ) ( x3 x0 )( x3 x1 )( x3 x2 )
Let x 0 = 0, y0 = 1
x 1 = 1, y1 = 3
x2 = 2 , y2 = 9
x3 = 4 y 3 = 81
(3 1) (3 2)(3 4) (3 0) (3 2)(3 4)
y = f(3) = (1) + (3) +
8 3
(3 0) (3 1)(3 4) (3 0) (3 1)(3 2)
(9) (81)
4 24
1 27 81
= 3
4 2 4
= 31
4.Using Lagrange‟s interpolation formula find y(10) given that y(5) = 12,
y(16) = 13,y(9) = 14, y(11) = 16.
Sol:
P
By Lagrange‟s interpolation formula
y = f(x) =
AP
( x x1 ) ( x x2 )( x x3 ) ( x x0 ) ( x x2 )( x x3 ) ( x x0 ) ( x x1 )( x x3 )
y0 + y1 y2
( x0 x1 )( x0 x2 )( x0 x3 ) ( x1 x0 )( x1 x2 )( x1 x3 ) ( x2 x0 )( x2 x1 )( x2 x3 )
( x x0 ) ( x x1 )( x x2 )
y3
( x3 x0 )( x3 x1 )( x3 x2 )
R
( x 6) ( x 9)( x 11) ( x 5) ( x 9)( x 11)
y = f(x) = (12) + (13) +
(5 6)(5 9)(5 11) (6 5)(6 9)(6 11)
CO
( x 5) ( x 6)( x 11)
(14)
(9 5)(9 6)(9 11)
( x 5) ( x 6)( x 9)
(16)
(11 5)(11 6)(11 9)
U
Putting x = 10
(4)(1)(1) (5) (1)(1) (5) (4)(1) (5) (4)(1)
y = f(10) = (12) + (13) + (14) (16)
ST
( y y 0 ) ( y y1 )( y y3 )
x2
( y 2 y 0 )( y 2 y1 )( y 2 y3 )
( y y 0 ) ( y y1 )( y y 2 )
x3
( y3 y 0 )( y3 y1 )( y3 y 2 )
P
( y 18) ( y 2 43 y 390)
(38)
7920
AP
( y 3) ( y 2 43 y 390)
+ (42)
22320
at f(x) = 0 ,y = 0 we get
21060 55080 266760 49140
=
R
26928 8432 7920 22320
= 37.230
CO
DIVIDED DIFFERENCES
Definition:
Let the function y = f(x) take the values f(x 0 ) , f(x 1 ), ……….f(x n ) Corresponding to the
necessarily be equal.
f ( x1 ) f ( x0 )
ST
f ( x0 , x1 )
x1 x0
f ( x2 ) f ( x1 )
f ( x1 , x2 , )
x2 x1
f ( x1 , x2 ) f ( x0 , x1 )
f ( x0 , x1 , x2 )
x 2 x0
f ( x2 , x3 ) f ( x1 , x2 )
f ( x1 , x2 , x3 ) and so on.
x3 x1
SOLUTION:
Step 1: Given, x : 2 5 10
y : 5 29 109
Step 2: To Find the divided difference table for the following data
Step 3: CALCULATIONS:
The divided difference table
x f(x) f(x) 2
f(x)
2 5
29 5
8
52 16 8
P
1
5 29 10 2
AP
109 29
16
10 5
10 109
x : 0 1 2 4 5
f(x) : 1 14 15 5 6
SOLUTION:
STEP 1: Given x0 = 0 , x 1 =1 , x 2 = 2 , x 3 = 4 , x 4 =5
Step 4: CALCULATIONS:
X f(x) f(x) 2
f(x) 3
f(x) 4
f(x)
0 1
14 1
13
1 14 1 0 1 13
6
20 26
1
15 14 40
1
P
2 1 5 1
2 15 2 11
4 1 0
50
AP
5 15 22
5 1
42 5 1
4 5
1 5
2
65 52
1
5 6 54
R
CO
Here x 0 =0 , f(x 0 ) =1
x1 =1 f ( x0 , x1 ) =13
x 2 =2 , f ( x0 , x1 , x2 ) =-6
U
x3 =3 , f ( x0 , x1 , x2 , x3 ) =1
ST
x 4 =4 , f ( x0 , x1 , x2 , x3 , x4 ) =0
Sol:
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
We form the divided difference table since the intervals are unequal
x f(x) f(x) 2
f(x) 3 f(x)
-
1 26
12 26
38
2 1 122 38
28
2 12 4 1
43 28
3
P
256 12 6 1
122
42
AP
4 256 294 122
43
62
844 256
294
64
6 844
R
CO
Here
x0 = 1, x 1= 2, x2 = 4, x3 = 6
ST
u(x) = -26+(x-1)38+(x-1)(x-2)28+(x-1)(x-2)(x-3)3
u(3) = -26+(2)(38)+(2)(1)(28)+(2)(1)(-1)(3)
= -26 + 76 + 56 – 6 = 100
Sol:
X f(x) f(x) 2
f(x) 3 f(x) 4
f(x)
-4 1245
33 1245
404
(1) (4)
-1 33 28 (404)
94
5 33 0 (4) 10 94
28 14
0 (1) 2 (4)
0 5
2 (28) 13 14
10 3
2 (1) 5 (4)
95
2 88 10
2 9 20 13
442 2 5 (1)
88
50
P
5 1335 1335 9
442
52
AP
R
f(x) = f(x 0 ) + ( x x0 ) f ( x0 , x1 ) ( x x0 ) ( x x1 ) f ( x0 , x1 , x 2 )
( x x0 ) ( x x1 ) ( x x 2 ) f ( x0 , x1 , x 2 , x3 )
CO
( x x0 ) ( x x1 ) ( x x 2 )( x x3 ) f ( x0 , x1 , x 2 , x3 , x 4 )
Here x0 = -4, x1 = -1, x2 = 0, x3 = 2, x4 = 5
f(x0) = 1245 , f(x0, x1) = -404, f(x0, x1, x2) = 94,f(x0, x1, x2, x3) = -14
f(x0, x1, x2, x3, x4) = 3
U
= 1245-404x-1616+(94)(x2+5x+4)-14x(x2+5x+4)+3x[(x2+5x+4)(x-2)]
= -14x3+24x2+10x+5+3x4+15x3-24x2-24x
= 3x4+x3-14x+5
X Y ΔY Δ2 Y Δ3Y
x0 y0 y1 y0 (Δ y 0 )
Δ y1 - Δ y 0 ( Δ 2 y 0 )
x1 y1 y 2 y1 (Δ y1 ) Δ 2 y1 - Δ 2 y 0 ( Δ 3 y 0 )
P
Δ y 2 - Δ y1 ( Δ 2 y1 )
y3 y 2 (Δ y 2 ) Δ 2 y 2 - Δ 2 y1 ( Δ 3 y1 )
AP
x2 y2
Δ y3 - Δ y2 ( Δ 2 y2 )
x3 y3 y 4 y3 (Δ y 3 )
….. ….. ……..
R
DEFINITION: ( Newton forward difference interpolation formula)
v
y ( x) y n
y n yn yn +…. yn .
1! 2! 3! n!
x xn
Where v
h
PROBLEMS:
1. Using Newton‟s forward interpolation formula, find the polynomial f(x) satisfying the following
data. Hence evaluate y at x = 5.
x 4 6 8 10
y 1 3 8 10
SOLUTION:
STEP 1: Given x 0 = 4 , x 1 =6 , x 2 = 8, x 3 = 10
y 0 =1 , y 1 =3 , y 2 =8 , y 3 =10
STEP 2: To find the polynomial f(x) from the following data Using Newton‟s forward
interpolation
formula. Hence evaluate y at x = 5.
P
u u (u 1) 2 u (u 1)(u 2) 3 x x0
y ( x) y 0 y 0 y0 y 0 +…… where u =
1! 2! 3! h
AP
STEP 4: CALCULATIONS
Difference Table :
x Y △y △2 y △3 y
(x0) 4 (y0) 1
3-1 = 2(△y0)
R
(x1) 6 (y1) 3 5-2 =3(△2 y0)
8-3 =5 (△y1) -3-3 = -6(△3 y0)
(x2) 8 (y2) 8 2-5 =-3(△2 y1)
CO
10-8 = 2(△y2)
(x3) 10 (y3) 10
There are only 4 data given. Hence the polynomial will be degree 3
U
x x x x x x
1 1 2
y(x) = P3 ( x) 14 (365)
5 5
(700)
5 5 5 5 (375)
1! 2! 3!
1
= 14 + x(73) + x(x-5)(14)+ x (x-5)(x-10)(3)
6
1
= 14 + 73x + 14[x 2 -5x] + x[x 2 -15x+50]
2
1
= 14x 2 +3x +14+ [x 3 -15x 2 +50x]
2
1 3
= [x +13x 2 +56x+28]
2
1
y(2) = P 3 (2) = [2 3 +13(2) 2 +56(2)+28]
2
1
= [200] = 10
2
DOWNLOADED FROM STUCOR APP
DOWNLOADED FROM STUCOR APP
P
(x1) (y1)
-0.5 - 0.024750 0.312625
AP
0.3596875 ( 3 y 3 )0.09375
(x2) (y2) ( 2 y 3 )0.400375
-0.25 0.33493750
( y 3 )0.7660625
(x3) (y3)
R
0 1.10100
CO
x x3
where v =
h
x
ST
Here x 3 = 0, h= 0.25, v = 4x
0.25
4 x(4 x 1)
Y(x) = 1.10100 + 4x(0.7660625) + (0.406375) +
2
4 x(4 x 1)(4 x 2)
(0.09375)
6
= 1.101+3.06425x+ 3.251x 2 +0.81275x+x 3 +0.75x 2 +0.125x
= x 3 +4.001 x 2 +4.002x+1.101
1
To find f(- )
3
1 1 1 1
y(- ) = (- ) 3 +4.001(- ) 2 +4.002(- )+1.101
3 3 3 3
= 0.174518518
dy 1 1 1 1
y 0 2 y 0 3 y 0 4 y 0 ...
dx x x0 h 2 3 4
d2y 1 11
2 2 2 y 0 3 y 0 4 y 0 ...
dx x x0 h 12
d3y 1 3
3 3 3 y 0 4 y 0 ...
dx x x0 h 2
PROBLEMS BASED ON NEWTON’S FORWARD DIFFERENCE FORMULA (EQUAL
INTERVALS)
P
1.For the following values of x and y , find the first derivative at x 1.05
AP
x: 1 1.05 1.1 1.15 1.2
y: 1 1.025 1.049 1.072 1.095
SOLUTION:
STEP 1: Given x 0 = 1 , x 1 =1.05 , x 2 = 1.1 , x 3 =1.15, x4 =1.2
R
y 0 =1 , y 1 = 1.025 , y 2 = 1.049 , y 3 = 1.072 , y4 = 1.095
To find Find the first and second derivatives of the function at x 0.4 using Newton‟s
CO
STEP 2:
formula.
dx x x0 h 2 3 4
d2y 1 2 11 4
dx 2
2
y 0 3 y 0 y 0 ...
x x0 h 12
ST
STEP 4: CALCULATIONS
Difference Table :
X Y △y △2 y △3 y △ 4y
(x0) 1 (y0) 1
(△y0)0.25
(x1) 1.05 (y1) 1.025 (△ 2 y0)-.001
(△ 3 y0)0
(x2) 1.1 (y2) 1.049 (△y1).024 (△ 2 y1)-.001 (△ 4 y0).001
3
(△ y1)0.001
2
(x3) 1.15 (y3) (△y2).023 (△ y2)0
1.072
(x4) 1.2 (△y2).023
(y4) 1.095
There are only5 data given. Hence the polynomial will be degree 4
Here x0 = 1.05, h=0.05 [difference]
dy 1 1 1 1
0.024 (.001) (.001) (.001) 0.493
dx x x0 .05 2 3 4
=
d2y 1 11
2 2
(.001) .001 (.001) 1.1648
dx x x0 (.05) 12
P
x 1 2 3 4
Y 1 8 27 64
AP
Sol: The forward difference table is as follows
x y 2 3
1 1
7
2 8 12
R
19 6
3 27 18
CO
37
4 64
U
dy 1 2 3
0y y0 y0 ........
dx x x 0 h 2 3
ST
dy
3
dx x 1
STEP 2: To find Find the first and second derivatives of the function at x 1.25 using Newton‟s
dy 1 1 1
y n 2 y n 3 y n ...
dx x xn h 2 3
d2y 1 2 11 4
2 2 y n y n y n ...
3
dx x xn h 12
Difference Table :
X Y y 2y 3y 4y
P
(x0) 1 (y0) 1
AP
( y0)0.25
(x1) 1.05 (y1) 1.025 ( 2 y0)-.001
( 3 y0)0
(x2) 1.1 (y2) 1.049 ( y1).024 ( 2 y1)-.001 ( 4 y0).001
( y1)0.001
3
There are only5 data given. Hence the polynomial will be degree 4
Here x0 = 1.25, h=0.05 [difference]
dy 1 1 1 1
0.023 (0) (.001) (.001) 0.4716
dx x x0 .05 2 3 4
U
=
d2y 1 11
ST
2 2
(0) .001 (.001) .764
dx x x0 (.05) 12
X Y y 2 y 3 y 4 y 5 y
3.0 -14
3.968
3.2 -10.032 0.768
4.736 -0.464
3.4 -5.296 0.304 2.048
5.04 1.584 -5.12
3.6 -0.256 1.888 -3.072
6.928 -1.488
P
3.8 6.672 0.4
7.328
AP
4.0 14
X 0 1 2 3 4
U
X Y y 2 y 3 y 4 y
0 1
1.718
1 2.718 2.945
4.663 5.097
2 7.381 8.042 8.668
12.705 13.765
3 20.086 21.807
34.512
4 54.598
x0 nh
P
y( x)dx
h
y 0 y n 2 y1 y 2 y 3 ............. y n 1 .
2
AP
x0
SOLUTION:
CO
1
dx
STEP1: Given,y(x) = & h=1/6
0 1 x
2
1
dx
STEP2: To Evaluate 1 x 2
using Trapezoidal rule
ST
x: 0 .25 .5 .75 1
So,
Y 0 .06154 .2222 .3956 .5
STEP4: calculations:
1
=0.231046
1 2
x dx 1
0 1 x 3 = 3 log(1 x )
2
P
log(1 x 2 ) 0.231046
1
x 2 dx 1
RESULT: = log(1 x 2 ) log(1 x 2 ) 0.231046
AP
0 1 x
3
3 :
1
dx
3. Using Trapezoidal rule , Evaluate 1 x
1
2
taking 8 intervals.
Sol:
1
Here y(x) =
R
1 x2
Length of the interval = 2
CO
So we divided 8 equal interval with h = 0.25
We form the table
dx
1
0.25
= [(0.5+0.5)+2(0.64+0.8+0.9412+0.8+0.64) ]
2
0.25
= [1+2(5.7624)]
2
0.25
= [12.5248]
2
= 1.5656.
2
4. Dividing the range into 10 equal parts , find the value of sin x
0
dx
X 0 2 3 4 5 10
6 7 8 9
20 20 20 20 20 20
20 20 20 20
Y= 0 0.1564 0.3090 0.4540 0.5878 0.7071 0.8090 0.8910 0.9511 0.9877 1
sinx
i) By Trapezoidal Rule
h
0 sin x dx 2 ( y0 y11 ) 2( y1 y2 ..... y10 )
= 0.9980
P
dx
0
2
AP
= 1.0000
6
dx
5. Evaluate 1 x
0
2
by (i) Trapezoidal rule (ii) Simpson’s Rule .Also check up the
X 0 1 2 3 4 5 6
1 1.00 0.500 0.200 0.100 0.058824 0.038462 0.27027
F(x)=
1 x2
U
6
dx
I= = 1/2 [ (1+0.027027)+2(0.5+0.2+0.1+0.058824+0.038462)]
0
1 x2
= 1.41079950.
ii) By Simpson‟s One – Third Rule:
I = 1 / 3[(1+0.027027)+2(0.2+0.058824)+4(0.5+0.1+0.038462)]
= 1/3 (1.027027+0.517648+2.553848)
= 1.36617433.
1.40564765
5
dx
6. Evaluate 4 x 5 by simpson’s 1/3 rule .Hence find the value of
0
log e5 (n = 10)
Sol:
1
Here y(x) = , h =1/2
4x 5
P
X 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Y(x) 0.2 0.1429 0.1111 0.0909 0.0769 0.0667 0.0588 0.0526 0.0476 0.0434 0.04
AP
By simpson‟s 1 / 3 rule :
log(4 x 5)
5 5
dx 1
0 4 x 5 = 4 0 4 log 5 ………………….(2)
from 1 and 2
U
1
log 5 0.4025
4
log 5 1.61.
ST
P
AP
R
CO
U
ST
P
AP
R
CO
U
ST
UNIT-V
NUMERICAL SOLUTION OF ORDINARY IDFFERENTIAL EQUATIONS
Solution:
In the differential equation dy f x, y the function f x, y may have a
dx
complicated algebraically structure. Then the evaluation of higher order derivatives
may become tedious. This is the demerit of this method.
Solution:
P
h2 '' h3 ''' h4 iv
ym1 ym h ym
'
ym ym ym
AP
2! 3! 4!
Here ym n denotes the r th derivative of y w.r.to x at the point xm , ym .
R
CO
U
ST
P
AP
R
dy
5. Write down the Euler algorithm to the differential equation f x, y .
dx
CO
Solution:
yn1 yn h f xn , yn When n = 0, 1, 2...
This is Euler algorithm. It can also be written as y( x h) y( x) h f ( x, y)
U
ST
P
AP
R
CO
U
ST
dy
The Runge-Kutta formula of fourth order to solve f x, y with y( xo ) yo
dx
Solution:
Let h denotes the interval between equidistant values of x . If the initial values are
( xo , yo )
the first increment in y is computed from the formulae‟s.
K1 h f ( xo , yo )
h K
K 2 h f xo , yo 1
2 2
h K
K3 h f xo , yo 2
2 2
K 4 h f xo h , yo K 3
P
1
and y K1 2 K 2 2 K3 K 4
6
AP
Then y1 yo y
The increment in y in the second interval is computed in a similar manner using the same
four formulas, using the values x1 , y1 in the place of x0 , y0 respectively.
R
Special advantages of Runge-Kutta method over Taylor series method .
CO
Solution:
Runge-Kutta methods do not require prior calculation of higher derivatives of y(x), as The
Taylor‟s method does. Since the differential equations using in application are often
U
Also, the Runge –Kutta formulas involve the computations of f(x,y) at various positions ,
instead of derivatives and this function occurs in the given equations .
P
AP
R
CO
U
ST
h 4
The error term is y 'o .
90
P
AP
R
CO
U
ST
P
Stage.
3. Since the methods require several evaluations of the function f (x, y), they are
AP
time Consuming.
4. In these methods, it is not possible to get any information about truncation
error.
xn , xn1, xn2 ,... for computing the value of y at xn1 . We first use a formula to
U
find the values of y at xn1 and this is known as a predictor formula . The vakue
251 5 (iv )
Predictor h f ( )
720
19 5 (iv )
Corrector h f ( )
720
1. To find xn1, yn1 we use only the We need past values , based on that
only we get the next value.
information at xn , yn
P
AP
R
CO
U
ST