Вы находитесь на странице: 1из 4

BS-337 Numerical Methods

Sources of Errors, Root Finding, Interpolation, Differentiation


Integration, Solving System of Equations, Eigenvalues and Eigenvectors
Assignment No. 1
Due Date: 14 May 2014 Before 1300hrs
1. Explain how many signicant digits are there in 0.0002025, 0.00202570, 0.2025000.
2. Use three-digit rounding arithmetic to perform the following Calculations. Also, compute
absolute and relative errors.
(i)
13
14

6
7
2e5.4
(ii)

22
7
1
7
(iii) f =
xcos xsin x
xsin x
, compute f(0.1)
(iv) Replace each trigonometric function with its third Maclaurins Polynomial and the com-
pute f(0.1).
3. Repeat above question with four-digit chopping.
4. Determine expression for cubic root of a, where a R
+
, using Newton-Raphsons Formula.
Compute cubic root of 9. Also nd percentage relative and percentage approximated errors.
5. You buy a Rs 25,000 piece of equipment for nothing down and Rs 5,500 per year for 6 years.
What interest rate are you paying? The formula relating present worth P, annual payments
A, number of years n, and interest rate i is
A = P
i(1 + i)
n
(1 + i)
n
1
6. Use suitable guesses to nd the root of the the following
(i) f
1
(x) = sinx + cos(1 + x
2
) 1
(ii) f
2
(x) = x
2
e
x
(iii) f
3
(x) = 8 sin(x)e
x
1
(iv) f
4
= tanx 0.5x
Using Newton-Raphsons method.
7. Repeat above question using Secant Method.
8. Repeat above question using Method of False Position.
9. Repeat above question using Bisection Method with 10
2
accuracy (take suitable interval).
E-mail address: yali@ceme.nust.edu.pk (Dr. Yasir Ali),
NUST-College of Electrical and Mechanical Engineering.
1
10. Consider the following data:
x 0.20 0.25 0.30 0.35 0.40 0.45
f(x) -1.60944 -1.38629 -1.20397 -1.04892 -0.91629 -0.79851
There is a misprint in f(x
3
) where x
3
= 0.35. Determine the correct value of f(x
3
) if it is
known that the true value of
4
f
1
= 0.00268. Construct a correct dierence table and
calculate an estimate of f(0.27) by Newtons forward dierence interpolation formula with
x
0
= 0.25.
11. Let f(x) = sin
(0.5

x)
(1+x
2
)
. Take the values of f at the points 2, 2.6, 3, 3.4, 4, 4.5 and 5 to nd
all the second degree Lagrange polynomials that interpolate f at the point 2.75. Also nd
f(2.75).
12. Let f(x) = sin
(0.5

x)
(1+x
2
)
. Take the values of f at the points 2, 2.6, 3, 3.4, 4, 4.5 and 5 to nd a
polynomial that interpolate f at the point 2.75, using Newton Divided Dierence formula.
13. Let f(x) = sin
(0.5

x)
(1+x
2
)
. Take the values of f at the points 2, 2.5, 3, 3.5, 4, 4.5 and 5 to nd
f(3.6) using Newtons Forwards Dierence Interpolation Formula with
(i) x
0
= 2
(ii) x
0
= 3.5
Calculate the percentage error in both cases.
14. In the above question nd f(4.8) using Newtons Forwards and Backwards Dierence Inter-
polation Formula. Calculate the percentage error in both cases.
15. Does the function S(x), given below, satises the cubic spline conditions with respect to the
knots -1 and 1? Give a mathematical justication for your answer
S(x) =
_

_
2
3

1
2
x
2
(2 |x|)
3
0 |x| 1
1
6
(2 |x|)
3
1 |x| 2
0 |x| > 2.
16. Let f(x) = sin
(0.5

x)
(1+x
2
)
. Take the values of f at the points 2, 2.6, 3, 3.4, 4, 4.5 and 5 to nd
f

(2.75).
17. Let f(x) = sin
(0.5

x)
(1+x
2
)
. Take the values of f at the points 2, 2.5, 3, 3.5, 4, 4.5 and 5 to nd
f

(2.75).
18. Let f(x) = sin
(0.5

x)
(1+x
2
)
. Take the values of f at the points 2, 2.5, 3, 3.5, 4, 4.5 and 5 to nd
_
5
2
f(x)dx, using Trapezoidal Rule.
19. Repeat the above question with Simpsons Rule.
20. Let f(x) = sin
(0.5

x)
(1+x
2
)
. Take the values of f at the points 2, 2.5, 3, 3.5 and 4 to nd
_
5
2
(x
2

f(x))dx
21. Drive the general formula for triangular decomposition of a matrix using Crouts Method.
2
22. Let
A
1
=
_

_
2 1 1
3 3 9
3 3 5
_

_, A
2
=
_

_
5 7 6 5
7 10 8 7
6 8 10 9
5 7 9 10
_

_
, A
3
=
_

_
2 1 0 0
1 4 1 0
0 1 4 1
0 0 1 2
_

_
, A
4
=
_

_
4 2 14
2 17 5
14 5 83
_

_
Write factorization using Doolittle Method.
23. Repeat above question with Crouts Method.
24. Repeat above question with Choleskys Method, if possible.
25. Find inverse of A
1
, A
2
, A
3
and A
4
.
26. Let B
1
= [12 40 30]
T
= B
4
, B
2
= [1 0 3 2]
T
and B
3
= [1.5 0.25 0 2.5]
T
. Write system
of equations using coecient matrices A
1
, A
2
A
3
and A
4
respectively. Find solutions in each
case.
27. Solve the system obtained in above question using Jacobis Method.
28. Repeat the above question using Gauss-Seidals Method.
29. For A
1
, A
2
A
3
and A
4
nd the largest eigenvalue and corresponding eigenvector by Power
Method
30.
3
Instructions
1. Solve each question on the sperate sheet.
2. Write formula used in each question.
3. Draw tables where they are necessary.
4. Submit one soft and one hard copy of the solution.
5. Assignment submitted late by one day and two days will result in reduction of marks by 20%
and 40%. After that no rewards will be given.
6. Following is the group-wise distribution of the questions:
Questions or Parts to solve
Group 1 1, 2(i), 2(iii), part (i) of 6 to 9, 16, 18, 20, 22 to 29 with A
1
, 30. 19
Group 2 2(ii), 2(iv), 4, part (ii) of 6 to 9, 13, 15, 19, 22 to 29 with A
2
. 18
Group 3 3 (iii), 3(i), 5, part (iii) of 6 to 9, 10, 14, 21, 22 to 29 with A
3
. 18
Group 4 3 (ii), 3(iv), part (iv) of 6 to 9, 11, 12, 17, 22 to 29 with A
4
, 30. 18
4