Question

o fit the best Curve fit among the following formulas for the given datain >C: 2 3 5 الدكتور سلمان حسین عباس 1.5 2 3.5 Y: 0.5
0 0
Add a comment Improve this question Transcribed image text
Answer #1

(1)

x y T T T T x^2y Y=ln(y) T
1 0.5 0.5 1 1 1 0.5 -0.69315 -0.69315
2 1 2 4 8 16 4 0 0
3 1.5 4.5 9 27 81 13.5 0.405465 1.216395
4 2 8 16 64 256 32 0.693147 2.772589
5 3.5 17.5 25 125 625 87.5 1.252763 6.263815
total 15 8.5 32.5 55 225 979 137.5 1.658228 9.559652

To fit a linear curve. n=5

We need to fit the curve of the type:

y=ax+b

So the normal Equations are given as

\\\sum y=a\sum x+nb \\\sum xy=a\sum x^2+b\sum x\\ \\i.e. \begin{bmatrix} \sum y\\ \sum xy \end{bmatrix}=\begin{bmatrix} \sum x &n \\ \sum x^2& \sum x \end{bmatrix}\begin{bmatrix} a\\ b \end{bmatrix} \cdots (1)

We have to solve for a and b by substituting the values

\begin{bmatrix} \8.5\\ \32.5 \end{bmatrix}=\begin{bmatrix} \15 &5\\ \55& \15 \end{bmatrix}\begin{bmatrix} a\\ b \end{bmatrix} \\ R_1\rightarrow R_1 /5\, \& \,R_2\rightarrow R_2/5\\ \begin{bmatrix} \1.7\\ \6.5 \end{bmatrix}=\begin{bmatrix} \3 &1\\ \11& \3 \end{bmatrix}\begin{bmatrix} a\\ b \end{bmatrix}

On solving by Cramer's rule, we get

a=\frac{\begin{vmatrix} 1.7& 1\\ 6.5&3 \end{vmatrix}}{\begin{vmatrix} 3 &1 \\ 11&3 \end{vmatrix}}=\frac{-1.4}{-2}=0.7

and b=\frac{\begin{vmatrix} 3& 1.7\\ 11&6.5 \end{vmatrix}}{\begin{vmatrix} 3 &1 \\ 11&3 \end{vmatrix}}=\frac{0.8}{-2}=-0.4

Thus the linear curve is y=0.7x-0.4

Now to fit a second-degree polynomial y= ax^2+bx+c

Now the normal equations are ,

\\\sum y= a\sum x^2+b\sum x+nc \\ \sum xy=a\sum x^3+b\sum x^2+c\sum x\\ \sum x^2y=a\sum x^4 +b\sum x^3+c\sum x^2 \\ \\ i.e. \begin{bmatrix} \sum x^2&\sum x &n \\ \sum x^3& \sum x^2&\sum x \\ \sum x^4& \sum x^3 & \sum x^2 \end{bmatrix}\begin{bmatrix} a\\ b\\ c \end{bmatrix}=\begin{bmatrix} \sum y\\ \sum xy \\ \sum x^2y \end{bmatrix}

We substitute the values and solve for a,b and c22

\begin{bmatrix} \55&15 &5 \\ \225& 55&15\\ \979&225 &55 \end{bmatrix}\begin{bmatrix} a\\ b\\ c \end{bmatrix}=\begin{bmatrix} 8.5\\ 32.5 \\137.5\end{bmatrix}

We write the systen as Augmented matrix and solve by gauss elimination method for a ,b and c.

55 15 5 8.5 225 55 15 32.5 979 225 55 | 137.5

PerformR_1 \rightarrow R_1/5

1595009034919_blob.png

Peform R_2 \rightarrow R_2-225 R_1 and R_3 \rightarrow R_3-979 R_1

3 1 17 1 110 25 11 11 70 60 0 11 11 0 -42 -34 11 -13.8

Now, PerformR_2 \rightarrow \frac{-11}{70}R_2

3 17. 1 1 11 11 110 6 5 0 1 14 7 0 -42 -34 | -13.8

Now performR_1\rightarrow R_1- \frac{3}{11}R_2 \, and \, R_3\rightarrow R_3+42R_2

1 2 1 0 7 35 5 6 0 1 7 0 0 2 14 1.2

PerformR_3 \rightarrow R_3 /2

1 2 1 0 7 35 6 5 0 1 7 14 0 0 1 0.6

PerformR_2 \rightarrow R_2-\frac{ 6}{7}R_3 \,\&\,R_1\rightarrow R_1 +\frac{1}{7}R_3

1 10 0 7 11 010 70 001 0.6

Thus a=\frac{1}{7} ; b=\frac{-11}{70}; c=0.6

Thus the required second-degree polynomial is y= \frac{x^2}{7}+\frac{-11x}{7}+0.6

To fit an exponential curve :

It will be of the typey=ab^{x}

Consider

y=ab^{x} \\ ln(y)=ln(a)+x ln(b)

Now putln(y)=Y \, \&\, ln(a)=A, ln(b)=B

thus Y=A+Bx

Now the normal equations are

\\\sum Y=B\sum x+nA \\\sum xY=B\sum x^2+A\sum x\\ \\i.e. \begin{bmatrix} \sum Y\\ \sum xY \end{bmatrix}=\begin{bmatrix} \sum x &n \\ \sum x^2& \sum x \end{bmatrix}\begin{bmatrix} B\\ A \end{bmatrix} \cdots (2)

we put the values and solve for A and B

\begin{bmatrix} \1.658228 \\ 9.559652 \end{bmatrix}=\begin{bmatrix} 15 &5 \\ 55&15 \end{bmatrix}\begin{bmatrix} B\\ A \end{bmatrix} \cdots (2)

on solving we get

PerformRj/15

414557 1 3 3750000 55 15 9.559652

performR2 - 55 R1

414557 نم مانيا 3750000 652403 10 0 ملا 187500

perform10 R2/ 3

1 414557 1 3 3750000 0 1 -1.0438448

performRi R2 3

10| 0.4584968 0 1|-1.0438448

Thus

B=0.4584968\, \&\, A=-1.04388448 \\ \Rightarrow ln(b)=0.4584968\, \&\, ln(a)=-1.04388448 \\ \Rightarrow b=e^{0.4584968}\, \&\, a=e^{-1.04388448} \\\Rightarrow b=1.581695 \, \&\, a=0.352084\\ y=(0.352084)(1.581695)^x

2)

х у XX ху 112.5 25 4.5 33 6.3 625 1089 2500 50 85 207.9 690 2295 3330 6635.4 13.8 27 33.3 84.9 7225 10000 100 293 Total 21439

n=5

\sum x ^{2}=21439

to Fit a straight line means to fit at curve of the type y=ax+b

So the normal Equations are given as

\\\sum y=a\sum x+nb \\\sum xy=a\sum x^2+b\sum x\\ \\i.e. \begin{bmatrix} \sum y\\ \sum xy \end{bmatrix}=\begin{bmatrix} \sum x &n \\ \sum x^2& \sum x \end{bmatrix}\begin{bmatrix} a\\ b \end{bmatrix} \cdots (1)

\begin{bmatrix} \86.9\\ 6635.4 \end{bmatrix}=\begin{bmatrix} 293 &5 \\ 21439& 293 \end{bmatrix}\begin{bmatrix} a\\ b \end{bmatrix}

Similarly solving by Cramer's rule we get

a=\frac{77153}{213460}=0.36144

b =\frac{-811231}{213460}=-3.80038

thus we get.

y=0.36144x-3.80038

3)X У XX 35 2620 50 2700 70 XXX ху 1225 42875 91700 2500 125000 135000 4900 343000 196000 7225 614125 248200 11025 1157625 3286

Required equation is y=a+bx^2

\\\sum y=b\sum x^2+na \\\sum xy=b\sum x^3+a\sum x\\ \\i.e. \begin{bmatrix} \sum y\\ \sum xy \end{bmatrix}=\begin{bmatrix} \sum x^2 &n \\ \sum x^3& \sum x \end{bmatrix}\begin{bmatrix} b\\ a \end{bmatrix} \cdots (2)

.\begin{bmatrix} 14170\\ 999550 \end{bmatrix}=\begin{bmatrix} 26875 &5 \\ 2282625& 345\end{bmatrix}\begin{bmatrix} b\\ a \end{bmatrix} \cdots (2)

on solving by cramers rule

b=2182 42825 = 0.05095 and a =4385512 1713=2560.13543

y=+0.05095x^2+2560.13543

4 problem can be done in same manner as exponential done in part 1

Add a comment
Know the answer?
Add Answer to:
o fit the best Curve fit among the following formulas for the given datain >C: 2...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Exercise 6: Given the table of the function f(x)-2" 2 X 0 3 2 f(x) 1 2 4 8 a) Write down the Newton polynomial...

    Exercise 6: Given the table of the function f(x)-2" 2 X 0 3 2 f(x) 1 2 4 8 a) Write down the Newton polynomials P1(x), P2(x), Pa(x). b) Evaluate f(2.5) by using Pa(x). c) Obtain a bound for the errors E1(x), E2(x), Es(x) Exercise 7: Consider f(x)- In(x) use the following formula to answer the given questions '(x) +16-30f+16f,- 12h a) Derive the numerical differentiation formula using Taylor Series and find the truncation error b) Approximate f'(1.2) with h-0.05...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT