0% found this document useful (0 votes)
9 views

cpp notes

The document discusses empirical laws and curve fitting, focusing on the relationship between two quantities in experiments. It explains the concept of linear relationships, methods for deriving empirical equations, and the evaluation of constants using various approaches, including graphical and analytical methods. Additionally, it provides examples and exercises to illustrate the application of these concepts in determining relationships between data sets.

Uploaded by

vinithvinith2211
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

cpp notes

The document discusses empirical laws and curve fitting, focusing on the relationship between two quantities in experiments. It explains the concept of linear relationships, methods for deriving empirical equations, and the evaluation of constants using various approaches, including graphical and analytical methods. Additionally, it provides examples and exercises to illustrate the application of these concepts in determining relationships between data sets.

Uploaded by

vinithvinith2211
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1

Empirical Laws and Curve


Fittings
1.1. Introduction
In practical life and also in Engineering and Science, we come acrOSS
experiments which involve two quantities. An anxiety arises in us to know
the relationship which connects the two quantities. For example, we
measure the heights and weights of students in our class and represent
those values by x, and y,, i =1,2, ..., n (assume there are n students). Now,
we would like to know whether there is any relation between x and y. This
relation, when written as an equation y =f (x), is called an emperical
equation. Many times we may not be abie to get an exact relation but we
may get only an approximate curve. This approximating curve is an
empirical equation and the method of finding such an approximating
curve is called curve fitting. The constants occuring in the equation of the
approximating curve can be found by various methods If (x,, y),
i=1,2, .,n are the n paired data which are plotted on the graph sheet, it
is possible to draw a number of smooth curves passing through the points.
So, the approximnating curve is not unique.
1.2. The linear law
Suppose that the relationship between the variables x and y is linear.
Assume it to be y= ax+b ...(1)
That is, if the points (x, y) are plotted in the graph-sheet, they should
lie on a straight line. 'a' is the slope of the straight and b Is the y-intercept.
Taking any two points (x,, y}) and (x, yz) which are apart, slope of the
straight line a = :b can be found by knowing the y-intercept or by
Substituting any point on the line. Substituting a and b in (), we get the
straight line required.
L.3. Laws reducible to linear law
(1) Law of the pattern y= ax where a and n are constants
Let y = ax be the law.
Numerical Methods-1y
Empirical Laws and Curve Fittings 3

on both sides, Value of y at x = 500 is 115.


Taking logarithm
logo* andX= lop..
logo)=logjo a + n Y= logo)', A = logo Q
Note. The cquation is not unique since the answer depends upon our
approach. One can give a number approximating straight lines. Hence,
Y=A+n X where
i.e.. explained carlier. graphical approach is not accurate. Hence we will go to analytical
be found as
Now Aand n can known. approach rather than graphical approach.
Hence, aand n are are constants.
the pattern y=ae where a, b EXERCISE 1.1
(2) Law of sides,
both
Taking logarithm on
logo=logo a+ bar 1. Find the relation of the form y= +b from the data using the graph:
log,oy= Y, A =log,o a
iE.. Y=A + br where 1.95 2-46 3 3-44 3.96
get again a and b. 67 63 59-6 58 56
After getting A, b we b
know. 2. Find the relation of the form y=a+ given
Hence, =ae is
and a, b are
=a+ br where n is known
(3) Law of the pattern y 36-8 31-5 26-3 21-0 15-8 12-6 84
unknown constants. 12-5 12-9 13-1 13-3 14-1 14-5 16-3
which is linear in y and u.
Setting x'=u, we have y =a+ bu, 3. Plot the points and obtain a st. line fit from the graph.
be found out. The linear fit y =a+ bu
Since x is given, u can 2 3 5

can be got as explained earlier. y 1200 900 600 200 110 50


b 4. For the following data, fit a curve of the form, yx = k from the data given
The forms y=a+br. y =a+blr, y=a+ are all of this type below:

cxplaincd above. 15 30 60 100 200 400


10 5-6 3-2 2-1 12 0-7
In general. getting an emperical equation, depends upon : 1.4. Evaluation of constants by the method of group averages
(i) tle determination of the form of the equation, and
(Tofit a straight line)
(iù the evaluation of the constants in the equation. Let (a;, y), i= 1,2,.,.n be n sets of observations and the law relating
Normally, the form of the equation is agreed upon from the data and
then the constants are evaluated. r and y be y=a+ bx ...(1
In this chapter, given the form of the equation, we will try to We assume that the law is a lincar one (we do not prove it is linear).
evaluate the constants.
Example 1. Plot the points on the graph and obtain a relation of the We want to determinc a and b. By assumption y = a + bx is the law, it does
form y=ar + b given the following data. Find y at x = 500. not mean the points lie on the st. line. It is only an approximating st. line
and it is possible that no point may lie on the line.
225 300 430 S60 600
60 75 y= a+ bx
100 125 145
P
Solution. Since the form is already accepted to be linear, we plot the
points on the graph-sheet and draw a smooth Px, Y,)
approximate. straight line which is only
Slope = 75- 60 = 0-2
P
300- 225 P.
Hence y = 0-2x+b
HenceSubstituting,
60 = 0
the rough form is 2(225) + b : b= 15
y=0-2x + 15 M, M, M, X
M,
Numerical Methods-IV 5
Enpirical Laws and Curve Fittings
ordinates.
4
by P,i=l,2,., n. The 2. The straight line passes through the two points , y) and
( y)
We plot the points 2, i= 1, 2,., n. U. y). Hence its equation is
straight line at
= , meets the
and , M, =a+ bu
Atx=h P, M, =y, x-X
value of y at x=X;
P,M,=y, = observed x=X,
3. In practice, we shall divide the data into two groups so that both
value of y at contain the same number of points.
M=a+ bx, =expected which is the difference
bet 4. The equations got is only an approximate fit to the data given.
MQ,= y,-(a+ bu)
d, = 2,P = M,P - expected value of y is called
the Example 2. Find a straight line fit of the form y=a+ bx, by the
and the
ween the observed value y negative. method of group averages for the following data :
general. ds may be positive or
residual at =4, In 10 15 20 25
averages is based on the principle
Principle: The method of group 12 15 17 22 24 30 (M.K.U., 1973)
residuals at all points is Zero.
(assumption) that the sum of the Solution. Let us divide the data into two groups cach containing
Sd, =0 ...(2) three sets of data.
L.e.,
b. we
to find two unknowns a and Group II:
Since we require two equations values Group I :
first one containing Ysets of 22
divide the given data into two groups, 0 12 15
values. We apply the principle
and the other containing (n -Y) sets of 15 20 24
A=0 for each group. Hence 10 17 25 30

44 60 76
Sum : 15
}U;-(a+br)] =0 and X y-(a+ bx)]=0 15 = 14-6666
i=1 -M-
-M i=r+l
3 -=5; 3
n
60 76 = 25-3333
.: Sy=(a+ bx) and E,=2(a+ bx) 3
=20;
1 r+1 r+1
n
Substituting the average values x in y=a+bx, we get
a+ 5b= 14-6666 ...(1)
ie., Ya+b)4=X, and (n-Y)a+b =r+1 a+ 20b= 25-3333 ...(2)
r+l
(2) - (1) gives, 15b = 10-6667
b=0-71111
a= 14-6666- 5(0-71|11) = l1-||105
Hence, a+b ...(3)
Hence, the straight is y= 11-11105+ 0-7111lx
the points
n
Aliter: The required equation is the straight line joining
(5, 14-6666)-and (20, 25-3333). Its equation is,
10-6667
and a+6tJ 1+] .(4) 14-6666 25-3333- 14-6666
=
= 0-711|
20-5 15
(n-r) (n-r) X-5
That is, a+bi,=y, and a+b x= y ...(5) i.e., y = 146666 +07111lx-5 x (0-71111)
where x, y, are the averages of x's and y's of the y= 0-7l11lx+ 11-11105
the first group and Xz 2 values of x and
averages of x's and y's of the second
group. Example 3. The following table gives corresponding
Equations (5) determine ar + bx.
the a and band using
these values in (1) we get y. Obiain an equation of the form y =
relation y= 4+ bx. 2-0 40 5-5
3-2
63
Note 1. The answer is 43-8 77-3 97:8
not 53 14-2 301
ways. This is an unique since the can be done in many y:
important defect ofgrouping
this method.
Numerical Methods-v Empirical Laws and Curve Fittings
The cquations are
6 -=a+ bx, put =Y; x=X 0-77933=a+n (0- 14164)
cquation as
Rewriting the 1-20165 =a+n (0-31217)
Solution. n (0-31217-0-14164) = 1-20165 0-77933
Y=a+ bX Group lI
equation is 0-17053 n = 0-42232
Hence the Group I
n=2:47651
Y= 4-0 10-95 a=0-77933 -2.-47651 x0-14164= 0-428557
4-82 55 14-05
11 7-10 15-52 Hence C= 10 = 10°42855 =768261
2-0 63
3-2
9-4I
15-8 40-52 Law is Q=2-68261 H247651
2133
Sum :
63
},= 133= 7-11 Example 5. Using the following table, fit a curve of the form
63 2-1, 3 y= a. Find a and b and find the formula by the method of group
40-52 13-5066 averages.
60 70 80
- 158 52666, Y, = 10
1-06
20
1-33
30
1-52
40
1-68 1-81 1.91 2-0) 2-11
3
Y) is
The line joining (X. Y)and (X., (M.K.U.)
6-3966
13-5066 -7-11 = 2-02002 Solution. log y = log a+ b log x
Y-7-11 3-1666
5-2666 2-1
X-2.1
x 2-1
Let Y=logio'. A= log,o4, X=logio*
Le.,
Y= 7-11+ 2-02X -2-02 We get Y=A+ bx ...(1)
Y= 2-02X+ 2-868 Divide into two groups each containing 4 data.
y = 2-02X + 2-868 Group I Group II
X X Y

1-0 0-0253 1-6990 0-2577


i.., y= 2-02:+2-86&r is the required equation. 1-3010 0-1239 1-7782 0-2810
(Here a=2-868, b=2-02) 1-8451 0-3032
1-4771 0-1818
Example 4. The following numbers relate to the flow of water over 1-6020 0-2253 1 1-9031 0-3243
a triangular notch. Sum 5-3801 0-5563 7-2254 1-1662
1:2 14 1-6 1-8 2-0 2.4 5-3801 0-5563
23-5 X, = = 13450, Y, = = 0-1391
0: 4-2 61 8.5 11-5 14.9 4

if thelaw is Q= CH,find Cand nby the method of group averages. 7-2254 1-1662

Solution. Q= CH
X, = 4
= 1:8064, Y,2 =
4
= 0-2916

0-1391 = A + b (1-3450)
log1o =logoC+n logo H
0-2916 =A +b (1-8064)
y=a+ nx where logo Q= y, log,o H=x and a=log10
Group I .. b(1-3450 1-8064) = 0-1391 0-2916
x= logioH, y=logio Group II 0-1525
x= log1oH, y=logio b= 0-4614 = 0-3305
0-07918 0-62325 1-06070
0-25527
014163 078533 030103 1-17319 A = 0- 1391 -0-3305 x 1:3450 = -0-3054
Sum :
0-20412 0-92942 1-37107. a= 10-0305 = 0-49S0 v= 0-495 x3305
0-42493 0-3802 1
2.33800 0-9365 1 3-60496
042493 Example 6. Convert the equation y= x (x-a) to a linear form and
3 = 0-141643 2:3380 = 0-77933
0-93651 3
hence dete rmine aand b. Which will best fit the following data
3 = 031217; y, = B60496 = 1-20165
3
Numerical Methods-v
Empirical Laws and Curve Fittings
8.4 9-6 10-8
7.2 3059 4110
0-05 0-04 = 1529 = 2055
3-6
0-83
4-8
0.31
6-0
0-17
010
007

xy r-a
Hence,
2
Y,=2
Y,=a+bx, implies 66466 =a + b (399) ...(1)

Solution. Here, y= x(x-a) Similarly, 2055 =a+b (|529) ..(2)


b
i.e., I = a+ xy ..(1) b (1529- 399) =2055 - 664-6
b
1390-4 = 1-2304
b=
1130
= X a=664-66 -399 b
Take =664-66399 x 1-2304
Y= a+ bX
= 173-73
Hence
table.
We forn the
Group I
Group Il the equation is y = 173-73 + 1-2304 x
Y=x 1.5. Equations involving three constants
may
If, for a given set of data, a straight line fit is not correct, we three
Y=x
1-7007 8-4
which involve
03347 3-6
2-0833 9-6 have to fit a parabola or other types of curves how the
0-6720
4-8
2.3148 10-8 constants. W will see below some of these cases and discuss
0-9804 6-0 unknowns could be estimated.
7-2 (Parabola).
TYPE 1. (i) The equation of the form y =a+ bx + cx
1-3889 6-0988 28-8
3-3760 21-6
Sum :
We shall reduce this equation to a linear graph from which two
3-3760 = 08440 Y, = 21-6
4 5.4 unknowns can be found as in the previous article.
X, = 4 That is
28-8 Assume that a particular point (, y) satisfies the given equation.
6-0988 =2-0329 = 9-6
X, = Y, =3 y; = a+bx, + cx
5-4 = a+b (0-8440) Hence, y-y) = b (x-x) +c (a-x)
9-6 = a+b (2-0329)
y-Y1 = b+c(x+x)
b (2-0329 -0 8440) = 9-6-5-4 i.e.,
b= 3-5327, a = 2-4185
Set
y-1 -Y and x+x =X
3-5327
.:. the equation is y = x (x-2-4185)
Hence, the equation becomes,
Example 7. Fit acurve of the form y= a+ bx by the method of Y=b+ cX which is linear in X and Y.
method of group
group averages given that
Now, b and c can be found out by the previous
7 12
averages.
2300 the type
Example 8. The data given below will fit a formula of
290 560 I144 1810
Solution. Put x'= X. Then y=a+bX is the form required
y=a+ bxt cx. Find the formula. 46-7 36-9
Group I Group Il 87-5 84-0 77-8 63,-7
X=
X:
283 270 235 197 (M.K.U.)
181
X=* 292
point on the
125
343
290 1331 1810 Solution. Take the point (87-5, 292) as the particular
S60
729 curve
1144 2300 ...(1)
Sum: 1197 1994
1728
4110 y=a+ bx + c?
3059 ..2)
292 = a + (87-5) b + (87-5).c
X,399 3
1994
3
=664-66
Numerical Methods-v
11
Empirical Laws and Curve Fittings
y-5.5
gives (87-5)
() -(2) =b(u-87-5)+qa'- X- 20
-=b+c(x+ 20)
y- 292 Y= B+cx ...(3)
-292=btc(r+ 87-5) i.e.,
-875
y-292 and X=x+87:5 where and X=x+ 20 and B=b+ 20c
x-20
Y=b+cX where Y= J -87.5
of group averages dividing the Let us form the tables dividing the given set into two sets.
the method
ie.
y- 5:5
we will do this by containing three data. y- 55 x-20
Now each X-20
(wo groups Group Il
given data into Group I 20 5-5 0
X=x+87.s r=-292 y Group I :
I-875 40 3-6 20 0-18
63-7 235 151-2 2-3950 9-1
197 134-2 2-3284 60 14-9 9-4 40 0-235
875 292 46-7
1715 2-5714 124-4 2-1937 80 22-8 17-3 60 0-288
283 36-9 181
$40 2.2680 Total 180 0-703
778 270 165-3
4-8394
409-8 6-9171
336-8 4-8394 Group II:
=2-4197 100 33-3 27-8 80 0-348
=168-4 2
2 120 46-0 40-5 10 0-405
409-8 6.9171 = 2:3057 Total 220 0-753
= 136-6 3
3 180 0703
=0-234
Substituting in Y=b+ cX, we have 3
=60, 3
2-4197=b+ 168-4c ...(3)
2-3057 = b+ 136-6 c ...(4) 220
,==110, =0-3765

c (168-4- 136-6) = 2-4197 - 23057


.=0-00358 Using in (3),
31-8 c= 11-4
0-234 = B+ 60c ..(4)
b=2-4197- 168-4 c= 18168
03765 =B+ 110c ...(5)
y-292
=1:8168+0-00358X Subtracting, 50c = 0-1425, c=0-00285
I-87:5
B=0-234- 60c = 0-063
Y-292
-87.5 l8168+ (« +87-5) x 0-00358 Putting in (3), we get
=000358 x+ 2-13 y-5-5 =0-063 +000285x
x-20
y=000358 +1-81675 x+105-62
Example 9. Fit a parabola of the pattern y= a+ bx + cx to the data y= 55+000285: + (0- 063- 20 x0-00285) x-0063 ×20
given below : y=000285* +0-006x+ 424
20 40 60 This is more or less a straight line.
80 100 120
55 9.1 14-9 22-8 33-3 46-0
Solution. Assume that the point (20, 5-5) lies TYPE 2. Equation of the pattern y=ax°+c
on the parabola. First, we willget the value of c so that the points (*, Yi). ).
5-5=a+ 20b +400c ...(1)
y=a+ bx+c?
(3, y) be three points on the curve where x, X, X are in geometric
...(2) progression. (i.e., x=X4).
Subtracting.
v-55=b(-20)+c( -20) Substituting these points on the curve,
y=ax,'.+c

You might also like