Documente Academic
Documente Profesional
Documente Cultură
1. (25 p) The upward velocity of a rocket is given as a function of time in the following Table:
Determine the value of the velocity at t = 16 seconds using second order polynomial interpolation using
Newton’s divided difference polynomial method.
8 x1 + 4 x 2 − x3 = 11
− 2 x1 + 5 x 2 + x3 = 4
2 x1 − x 2 + 6 x3 = 7
3.(25 p) Use the Gauss-Seidel method without relaxation to solve the following system to a tolerance of ε s = 5% . If
necessary, rearrange the equations to achieve convergence:
− 3 x1 + x 2 + 12 x3 = 50
6 x1 − x 2 − x3 = 3
6 x1 + 9 x 2 + x3 = 40
4.(25 p) You are working for a start-up computer assembly company and have been asked to determine the
minimum number of computers that the shop will have to sell to make a profit. The equation that gives the
minimum number of computers ‘n’ to be sold after considering the total costs and the total sales is:
f(n) = 40n1.5 − 875n + 35000 = 0
Use the bisection method of finding roots of equations to find
a) The minimum number of computers that need to be sold to make a profit. Conduct three iterations to
estimate the root of the above equation.
b) Find the absolute relative approximate error at the end of each iteration.
[
f xi , x j =] f ( xi ) − f (x j )
[
; f xi , x j , x k = ] [
f xi , x j − f x j − x k ] [ ]
xi − x j xi − x k
f [ x n , x n −1 ,........, x 2 ] − f [ x n −1 , x n − 2 ,........, x1 ]
f [x n , x n −1 ,...., x 2 , x1 ] =
x n − x1
1)From: http://numericalmethods.eng.usf.edu/
For quadratic interpolation, the velocity is given by
f 2 ( x) = v(t ) = b1 + b2 (t − t1 ) + b3 (t − t1 )(t − t 2 )
Since we want to find the velocity at t = 16, we need to choose the three data points that are closest to
t = 16 and that also bracket t = 16 . These three points are t1 = 10, t 2 = 15, and t 3 = 20 .
t1 = 10, v(t1 ) = 227.04 ,
t 2 = 15, v(t 2 ) = 362.78 ,
t 3 = 20, v(t 3 ) = 517.35 ,
then
b1 = v(t1 )
= 227.04
v(t ) − v(t1 )
b2 = 2
t 2 − t1
362.78 − 227.04
=
15 − 10
= 27.148
v(t 3 ) − v(t 2 ) v(t 2 ) − v(t1 )
−
t3 − t 2 t 2 − t1
b3 =
t 3 − t1
517.35 − 362.78 362.78 − 227.04
−
= 20 − 15 15 − 10
20 − 10
30.914 − 27.148
=
10
= 0.37660
Then
f 2 ( x) = v(t ) = b1 + b2 (t − t1 ) + b3 (t − t1 )(t − t 2 )
= 227.04 + 27.148(t − 10) + 0.37660(t − 10)(t − 15), 10 ≤ t ≤ 20
At t = 16,
v(16) = 227.04 + 27.148(16 − 10) + 0.37660(16 − 10)(16 − 15)
= 392.19 m/s
If we expand,
v(t ) = 227.04 + 27.148(t − 10) + 0.37660(t − 10)(t − 15), 10 ≤ t ≤ 20
we get
v(t ) = 12.05 + 17.733t + 0.37660t 2 , 10 ≤ t ≤ 20
2. From: Chapra&Canale/Pr.10.3
The coefficient a21 is eliminated by multiplying row 1 by f21 = –2/8 = –0.25 and subtracting the result from
row 2. a31 is eliminated by multiplying row 1 by f31 = 2/8 = 0.25 and subtracting the result from row 3.
The factors f21 and f31 can be stored in a21 and a31.
8 4 −1
− 0.25 6 0.75
0.25 − 2 6.25
8 4 −1
− 0.25 6 0.75
0.25 − 0.33333 6.5
1 0 0 8 4 − 1
[L] = − 0.25 1 0 [U ] = 0 6 0.75
0.25 − 0.33333 1 0 0 6.5
1 0 0 d 1 11
− 0.25 1 0 d 2 = 4
0.25 − 0.33333 1 d 3 7
Back substitution:
8 4 − 1 x1 11
0 6 0.75 x 2 = 6.75
0 0 6.5 x3 6.5
6. 5
x3 = =1
6. 5
6.75 − 0.75(1)
x2 = =1
6
11 − (−1)(1) − 4(1)
x1 = =1
8
6 x1 − x 2 − x 3 = 3
6 x1 + 9 x 2 + x 3 = 40
− 3 x1 + x 2 + 12 x 3 = 50
3+ 0+0
x1 = = 0. 5
6
40 − 6(0.5) − 0
x2 = = 4.11111
9
50 + 3(0.5) − 4.11111
x3 = = 3.949074
12
Second iteration:
3 + 4.11111 + 3.949074
x1 = = 1.843364
6
40 − 6(1.843364) − 3.949074
x2 = = 2.776749
9
50 + 3(1.843364) − 2.776749
x3 = = 4.396112
12
1.843364 − 0.5
ε a ,1 = × 100% = 72.88%
1.843364
2.776749 − 4.11111
ε a, 2 = × 100% = 48.05%
2.776749
4.396112 − 3.949074
ε a ,3 = × 100% = 10.17%
4.396112
The remainder of the calculation proceeds until all the errors fall below the stopping criterion of 5%. The
entire computation can be summarized as
Thus, after 4 iterations, the maximum error is 0.13% and we arrive at the result: x1 = 1.696789, x2 =
2.829356 and x3 = 4.355084.
4. From: http://numericalmethods.eng.usf.edu/
Prof. Dr. Hüseyin Oğuz MATH302 Spring 08-09 MT Makeup
Page 5 / 7
Assuming initial values of n to be n = 50 and n = 100 ,
that is
nl = 50, nu = 100
So there is at least one root between nl and nu that is between 50 and 100.
Iteration 1
The estimate of the root is
n + nu
nr = l
2
50 + 100
=
2
= 75
f (n r ) = f (75) = 40(75)1.5 − 875(75) + 35000 = −4.6443 x 10 3
( )
f (nl ) f (nr ) = f (50) f (75) = (5392.14 ) − 4.6442 x 10 3 < 0
Hence the root is bracketed between nl and nu, that is, between 50 and 75. So, the lower and upper limit of
the new bracket are
nl = 50, nu = 75
At this point, the absolute relative approximate error ∈a cannot be calculated, as we do not have a previous
approximation.
Iteration 2
The estimate of the root is
n l + nu
nr =
2
50 + 75
=
2
= 62.5
f (n r ) = f (62.5) = 40(62.5)1.5 − 875(62.5) + 35000 = 76.7354
f (nl ) f (nr ) = f (50 ) f (62.5) = (5392.14 )(76.7354 ) > 0
Hence, the root is bracketed between nr and nu , that is, between 62.5 and 75. So the lower and upper limit
of the new bracket is
n new − n rold
∈a = r
× 100
n rnew
62.5 − 75
= × 100
62.5
= 20%
None of the significant digits are at least correct in the estimated root of
n r = 62.5
Iteration 3
n l + nu
nr =
2
62.5 + 75
=
2
= 68.75
f (n r ) = f (68.75) = 40(68.75)1.5 − 875(68.75) + 35000 = −2.3545 x 10 3
( )
f (nl ) f (nr ) = f (62.5) f (68.75) = (76.734 ) − 2.3545 x 10 3 < 0
Hence, the root is bracketed between nl and n r , that is, between 62.5 and 68.75. So the lower and upper
limit of the new bracket is
nl = 62.5, nu = 68.75
n new − n rold
∈a = r
× 100
n rnew
68.75 − 62.5
= × 100
68.75
= 9.0909%
Still none of the significant digits are at least correct in the estimated root of the equation, as the absolute
relative approximate error is greater than 5%.
Seven more iterations can be conducted and these iterations are shown in the table below.
Root of f(x)=0 as function of number of iterations for bisection method.
Iteration nl nu nm ∈a % f(nm)
2 50 75 62.5 20 76.7354
Hence the number of significant digits at least correct is given by the largest value of ‘m’ for which
∈a <∈s = 0.5 x10 2− m
0.1558 < 10 2− m
log(0.1558) < 2 − m
So
m = 2.
The number of significant digits at least correct in the estimated root of 62.6465 is 2.