Sie sind auf Seite 1von 18

UNIVERSITY OF CEBU LAPULAPU & MANDAUE

Every Evening @ 503 Instructor: Engr. Jonah Aubrey Delani


Romel D. Nedamo BSECE - IV
0. Midterm Period Date: VIII-XXI-MMXIV
Curve Fitting

Find the least-squares line y = f(x) = Ax + B

yk xk
6.8 -8
5 -2
2.2 0
0.5 4
-1.3 6

SOLUTION(1) TO PROBLEMS:
Automatically by built-in graph of Excel, we Have:

yk
8

= - 0.585x + 2.64 7
0.9512415454 6
5
4
3
2
1
0
4 2 0 -2 -4 -6 -8 -10
-1
-2

yk Linear (yk)

SOLUTION TO PROBLEM:
By this formula to solve A and B, we have:
y x xy
6.8 -8 -54.4
5 -2 -10
2.2 0 0
0.5 4 2
-1.3 6 -7.8

13.2 0 -70.2

120 A + 0B = -70.2
0A + 5B = 13.2

By SOLVER to solve two unknowns, we have the values of A && B:

-70.2 -70.2 -0.585 A


13.2 13.2 2.64 B

y =
UNIVERSITY OF
Numerical Methods 1 Every Evening @
Romel D
Assignment 10. Midterm Pe
C

1
s of a pully block, Find the least-
P and W Using this data.

SOLUTION(1) TO
Automatic

f(x) = - 0.585x + 2.64


R = 0.9512415454

30
y
25

20
P 8 6 4 2
15
Linear (P)
10

0
50 40
SOLUTION TO P
By this form
0
50 40

x^2
64
4
0
16
36

SUM 120

The Equations is Here:

By SOLVER to solv

So that,
Curve Fitting

If P is the pull required to lift a load W by means of a pully block,


find a linear load of the form P = mW + C connecting P and W Using this data.

P W
12 50
15 70
21 100
25 120

where P and W are taken in kg-wt.

SOLUTION(1) TO PROBLEMS

Automatically by built-in graph of Excel, we Have:

P
30

25
f(x) = 0.1879310345x + 2.275862069
R = 0.9968118131 20
P
P 15
Linea
10

0
130 120 110 100 90 80 70 60 50 40

W
0
130 120 110 100 90 80 70 60 50 40

SOLUTION(2) TO PROBLEMS
By this formula to solve A and B, we have:

W^2 P W PW
2500 12 50 600
4900 15 70 1050
14400 25 120 3000
21800 52 240 4650

e Equations is Here: 21800 m + 240 c = 4650


240 m + c
3 = 52

By SOLVER to solve two unknowns, we have the values of W && C:

4643.10347 4650 0.18793101 W


51.9310357 52 2.27586481 C

So that,
P 0.18793101
= W +2.27586481
3

&& y = ax^3 for the following.


e fits best.
xy x^2*y (x^2)^2 (x^3)*y
2.98 2.98 1 2.98
8.52 17.04 16 34.08
15.63 46.89 81 140.67
24.4 97.6 256 390.4
34 170 625 850

85.53 334.51 979 1418.13

x^2

x^3

130
130

e curve that best fits is:


x^3

s less error than the other.

SUM
.5 y3 3.5 4 4.5 5 5.5
The Equations is Here:

By SOLVER

So tha
Curve Fitting

Find the power fits y = ax^2 && y = ax^3 for the following
Determine which curve fits best.
(x^2)^3 x^2 y x
1 1 2.98 1
64 4 4.26 2
729 9 5.21 3
4096 16 6.1 4
15625 25 6.8 5

20515 55 25.35 15

For y=Ax^2

A= 0.3416853933
So that,
y = 0.3416853933

For y=Ax^3

A= 0.0691264928
So that,
y = 0.0691264928
The curve that best fits is:
y = 0.0691264928

It has less error than the other.

0
0.5 1 1.5 2 2.5 y3 3.5 4 4.5
nds is givenby the following table.
of the form V=ae^kt to the data.
f(x)
t
0
2
4
6

12
sum

formula TO SOLVE a && b.


t and y as V. We, have.
#REF!

e^ 119.68t
Curve Fitting

4. The voltage across a capacitor at time t seconds is givenby the following


Use the principle of least squares to fit a curve of the form V=ae^kt to the

vt v^2 t^2 V
0 22500 0 150
126 3969 4 63
112 784 16 28
72 144 36 12

sum 310 27397 56 253

V=ae^kt
ln(V)=kt+ln(a)
let y=ln(V); X=t; B= ln(a)

Using the above formula TO SOLVE a && b


making x as t and y as V. We, have.

a #REF!
b #REF!

So that,
V=ae^kt
ANSWER y= #REF! x +

or
V= #REF!
Curve Fitting

Find the least-squares parabola f(x)=Ax^2 + Bx +C.

Xk^3 Xk^4 Xk^2*Yk Xk*Yk


-8 16 -23.2 11.6
-1 1 1.1 -1.1
0 0 0 0
1 1 3.3 3.3 N 5
8 16 -6 -3

Using the above formula, we Have:.

#REF! B + #REF! C = #REF!


B + C =
B + 5C =

#VALUE!
Eq.1 34A+10C=-24.8
Eq.2 10A+5C=0.9

34A+10C=-24.8
- 20A+10C=1.8 -26.6

14A=-26.6

14 A = -26.6

A= -1.9
Substitute to Eq.1 to solve C:
C= #REF!

y = -1.9x^2 + 1.08x +3.98


Curve Fitting

Find the least-sq

Yk Xk Xk^2
-5.8 -2 4
1.1 -1 1
3.8 0 0
3.3 1 1
-1.5 2 4

Using the above formula, w

#REF! A +
A +
A +

from this, B is obviously B =


Substitute to Eq.1 to

So that,
ANSWER y = -1.9x^2 +