National University of Computer & Emerging Sciences,
Karachi
Department of Computer Science
Final Exam, SUMMER-2022
11th August, Thursday, 2022,
9:30 am – 12:30 pm
Course Code: CS-2008 Course Name: Numerical Computing
Instructor Name: Nadeem khan
Student Roll No: Section:
Instructions:
• Solve all the questions according to the sequence given in the question paper.
• Read each question completely before answering it. There are 8 questions and 2 pages.
• In order to receive full credit, you must show your all necessary work.
• Display answers correct up to 5 numbers of decimal places. Scientific calculator is allowed.
Time: 180 Minutes Max. Marks: 100
Question Number 1 CLO1 [5+5=10 Marks]
i) Evaluate the polynomial 𝒇(𝒙) = 𝒙𝟑 − 𝟓𝒙𝟐 + 𝟔𝒙 + 𝟎. 𝟓𝟓 at 𝒙 = 𝟏. 𝟑𝟕 also find 𝒇(𝒙)in
term of nested manner. Use 3-digit arithmetic with chopping. Evaluate the percentage
relative error.
ii) Use fix point iteration method to locate roots of 𝒚 = 𝒙𝟑 + 𝒙𝟐 − 𝟏 corrected up to 5 decimal places.
Question Number 2 CLO2 [5+5+10=20 Marks]
2
i) Approximate ∫0 𝑥 2 𝑙𝑛(𝑥 2 + 1)𝑑𝑥 using ℎ = 0.25 use
a) Composite trapezoidal
b) Composite Simpsons rule
ii) Use numerical differentiation complete the given table.
𝑥 𝑓(𝑥) 𝑓’(𝑥)
1.1 9.02501
1.2 11.02318
1.3 13.46374
1.4 16.44465
Question Number 3 CLO2 [2+4+4=10 Marks]
Solve the following initial value problem over the interval from 𝑡 = 0 to 𝑡 = 2
Where 𝑦(0) = 1.
𝒚′ = 𝒚𝒕𝟐 − 𝟏. 𝟏𝒚
i) Analytically
ii) Euler’s method with ℎ = 0.5
iii) fourth order RK method with ℎ = 0.5
1|P age
Question Number 4 CLO2 [5+5=10 Marks]
i) Construct the divided difference table.
ii) Estimate 𝑓(0.1).
𝑥 -0.1 0 0.2 0.3
𝑓(𝑥) 5.30 2.00 3.19 1.00
Question Number 5 CLO2 [10+10=20 Marks]
Solve following the system of equation using both Gauss siedel and relaxation method. Do four iteration
of each. (Display five decimal places).
4𝑥 + 11𝑦 − 𝑧 = 33
8𝑥 − 3𝑦 + 2𝑧 = 20
6𝑥 + 3𝑦 + 12𝑧 = 35
Question Number 6 CLO2 [10 Marks]
Solve 𝑨𝒙 = 𝒃 using Crout’s method or Doolittle method of factorization.
𝟐 𝟏 𝟒 𝒙 𝟐
𝒚
A=[𝟖 −𝟑 𝟐 ], x=[ ], b = [𝟎].
𝟒 𝟏𝟏 −𝟏 𝒛 𝟑
Question Number 7 CLO2 [3+7=10 Marks]
Determine whether the given matrix is
(a) singular
(b) Strictly diagonally dominant
(c) Positive definite or not
And also determine LDLt Factorization of following matrix.
𝟐 −𝟏 𝟎
[−𝟏 𝟐 −𝟏]
𝟎 −𝟏 𝟐
Question Number 8 CLO2 [5+5=10 Marks]
i).Apply Power method to find the dominant Eigen value and corresponding Eigen vector up to
Three decimal places for the following matrix.
𝟒 −𝟏 𝟏
[−𝟏 𝟑 −𝟐]
𝟏 −𝟐 𝟑
Associated with unit Eigen vector 𝑽 = (𝟏, −𝟏, 𝟏) 𝒕 .
ii).If ∆, 𝛁, 𝜹, 𝑬 and 𝜇 denote forward,backward and central operators,shift operator,average operators
respectively with eqaul spacing show that
∆+𝜵 𝟏
𝜹
a).𝜹𝝁 = b).𝑬 𝟐 = 𝝁 +
𝟐 𝟐
2|P age
Formula Sheet
Rk method
3|P age