You are on page 1of 10

Curve Fitting and

Interpolation
Curve Fitting by Function Approximation

PREPARED BY: ENGR. OWEN FRANCIS A. MAONGAT


MATH 130 INSTRUCTOR
EXAMPLE NO. 1
FIT A STRAIGHT LINE y = ax + b for the following data:
X 1 3 4 6 8 9 11 14
Y 1 2 4 4 5 6 7 8

The normal equation for the fitting the straight line y = ax + b


The relevant table is

X y XY

1 1 1 1
3 2 6 9
4 4 16 16
6 4 24 36
8 5 40 64
9 7 63 81
11 8 88 121
14 9 126 196
EXAMPLE NO. 1
FIT A STRAIGHT LINE y = ax + b for the following data:
X 1 3 4 6 8 9 11 14
Y 1 2 4 4 5 6 7 8

The normal equation become Solving (Using Calculator)


40 = (a)(56) + 8(b)
36 = (526)(a) + 56(b)

We have,

a = 0.64, b = 0.55

The by substitution these values y = ax+ b

y = 0.64x + 0.55
EXAMPLE NO. 2
FIND THE EQUATION OF THE BEST FITTING STRAIGHT LINE FOR
THE
FOLLOWING DATA & HENCE ESTIMATE THE VALUE OF THE
DEPENDENT
VARIABLE
X 5 CORRESPONDING
10 15 20 25 TO THE VALUE 30 OF THE
INDEPENDENT
Y 16 19 23 26 30
VARIABLE.
The normal equation for the fitting the straight line y = ax + b
The relevant table is

X y XY

5 16 80 25
10 19 190 100
15 23 345 225
20 26 520 400
25 30 750 625
EXAMPLE NO. 2
FIND THE EQUATION OF THE BEST FITTING STRAIGHT LINE FOR
THE
FOLLWING DATA & HENCE ESTIMATE THE VALUE OF THE
DEPENDENT
VARIABLE
X 5 CORRESPONDING
10 15 20 25 TO THE VALUE 30 OF THE
Y 16 19 23 26 30
Where, x = 30
INDEPENDENT
The normal equation become
VARIABLE.
114 = (a)(75) + 5(b)
y = 0.7(30) + 12.30
1885 = (1375)(a) + 75(b) y = 33.30
We have, Solving (Using Calculator)

a = 0.70, b = 12.30
The by substitution these values y = ax+ b

y = 0.7x + 12.30
X 1 2 3 4 5
Y 10 12 13 16 19
The relevant table is

x y xy
1 10 10 10 1 1 1
2 12 24 48 4 8 16
3 13 39 117 9 27 81
4 16 64 256 16 64 256
5 19 95 475 25 125 625
X 1 2 3 4 5
Y 10 12 13 16 19
The normal equation become
(a)(55) + (15)(b) + (5)(c) = 70
(a)(225) + (55)(b) + (15)(c) = 232
(a)(979) + (225)(b) + (55)(c) = 906
We have, Solving (Using Calculator)

a = 0.29, b = 0.49, c = 9.40

You might also like