Docsity

Fortran Program - Computing and Numerical Methods - Exam, Exams of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Cork Institute of Technology
Bachelor of Engineering (Honours) in Mechanical Engineering – Stage 2
(NFQ – Level 8)
Summer 2006
Computing and Numerical Methods
(Time: 3 Hours)
Instructions
Answer any FOUR questions.
All questions carry equal marks
Examiners: Dr. R. Sheehy
Mr. J. E. Hegarty
Prof. M. Gilchrist
Q1. (a) The following data shows distance travelled versus time for a rocket.
t 0 1 2 3 4 5
s 0 2.1 7.8 18.2 31.9 50.3
Use central difference formulae of 0(h2) to estimate the rockets speed and acceleration at t = 3.
(6 Marks)
(b) The following data results when a metal ball heated to 90ºC is dropped into water held constant at Ta
= 20ºC. Rate of cooling )( TaTk
dt
dT −−= where T = temperature of the ball.
Time t 0 5 10 15
Temp T 90 62.5 45.8 35.6
Use difference formulae to compute dt
dT at each value of time. (9 marks)
(c) Plot
dt
dT versus )( TaT − and employ linear regression to evaluate k. (10 marks)
Q2. (a) Briefly describe both a Direct and Iterative Method of obtaining real roots of an equation.
(8 marks)
(b) Explain the terms convergence and stability as applied to numerical methods for obtaining roots and
show that in the case of linear Iteration the | g’ (α) | < 1 is a necessary condition for convergence.
(6 marks)
pf3
pf4

Partial preview of the text

Download Fortran Program - Computing and Numerical Methods - Exam and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Engineering (Honours) in Mechanical Engineering – Stage 2

(NFQ – Level 8)

Summer 2006

Computing and Numerical Methods

(Time: 3 Hours)

Instructions Answer any FOUR questions. All questions carry equal marks

Examiners: Dr. R. Sheehy Mr. J. E. Hegarty Prof. M. Gilchrist

Q1. (a) The following data shows distance travelled versus time for a rocket.

t 0 1 2 3 4 5 s 0 2.1 7.8 18.2 31.9 50. Use central difference formulae of 0(h^2 ) to estimate the rockets speed and acceleration at t = 3. (6 Marks) (b) The following data results when a metal ball heated to 90ºC is dropped into water held constant at T (^) a = 20ºC. Rate of cooling dTdt^ = − k ( T − Ta )where T = temperature of the ball.

Time t 0 5 10 15 Temp T 90 62.5 45.8 35. Use difference formulae to compute dTdt^ at each value of time. (9 marks)

(c) Plot dTdt^ versus ( T − Ta )and employ linear regression to evaluate k. (10 marks)

Q2. (a) Briefly describe both a Direct and Iterative Method of obtaining real roots of an equation.

(8 marks) (b) Explain the terms convergence and stability as applied to numerical methods for obtaining roots and show that in the case of linear Iteration the | g’ (α) | < 1 is a necessary condition for convergence. (6 marks)

(c) Write a Fortran program that searches for real roots in an interval [a, b] using step size h. Your program calls a subroutine which uses either Bisection or Newton-Rapshon Method to zone to the root. (7 marks)

(d) Illustrate, using a suitable example, an equation with multiple roots. Outline any numerical method for obtaining multiple roots. (4 marks)

Q3. (a) Describe the Gauss Seidel Method for solving a system of linear equations. Explain the use of relaxation methods to enhance convergence. (8 marks) (b) Write a Fortran subroutine which uses the Gauss Seidel Method with relaxation for solving a system of linear equations. (12 marks) (c) Illustrate, using a suitable example, an ill-conditioned system and list some techniques for improving the solution. (5 marks)

Q4. (a) Illustrate, using a suitable example, the rationale behind Lagrange Polynomials.

Derive the Lagrange form for P 1 ( x ) and state the formula for PN ( x ). (6 marks)

(b) Outline the general structure of a program for implementing Lagrange Interpolation. (7 marks)

(c) The points (0, 1) (.1, 1.1052) (.3, 1.3499) lie on the curve f ( x ) = ex.

Fit a 2 nd^ order Lagrange Interpolating Polynomial to the data and hence calculate e^0.^2. (5 marks) (d) Use the additional data points (.4, 1.4918) to estimate the error for the 2nd^ order Polynomial in (c). (7 marks)