Applied Mathematics for Electrical Engineering (3130908)

BE | Semester-3   Winter-2019 | 26-11-2019

Q4) (b) 

Using method of least squares, find the best fitting second degree curve to the following data.
x 1 2 3 4
y 6 11 18 27

The normal equations for the second degree polynomial y = A + Bx + Cx2 are,
 
∑y = nA+B ∑x + C∑x2
 
∑xy = A∑x+B ∑x2 + C∑x3
 
∑x2y = A∑x2+B ∑x3 + C∑x4
 
So, we need to find the value of ∑x , ∑y , ∑x2 , ∑x3 , ∑x4 , ∑xy and  , ∑x2y. To find the value of A, B and C.
 
x y x y x2 x2y x3 x4
1 6 6 1 6 1 1
2 11 22 4 44 8 16
3 18 54 9 162 27 81
4 27 108 16 432 64 256
∑x = 10 ∑y = 62 ∑x y = 190 ∑x2 = 30 ∑x2y = 644 ∑x3 = 100 ∑x4 = 354
 
The normal equations for the second degree polynomial are,
 
∑y = n A + B ∑ x + C ∑ x2 ⇒ 62 = 4 A + 10 B + 30 C ......... 1 
 
 
∑xy = A ∑x + B ∑ x2 + C ∑ x3 ⇒ 190 = 10 A + 30 B + 100 C ......... 2 
 
 
∑x2y = A ∑x2 + B ∑ x3 + C ∑ x4 ⇒ 644 = 30 A + 100 B + 354 C ......... 3 
 
By equation ( 1 ), ( 2 ) and ( 3 ), we have
 
A = 3, B = 2 and C = 1
 
Therefore, the best fit line is y = A + Bx + Cx2 .
 
Therefore, the best fit li   ⇒ y = 3 + 2x + x2