Docsity

Newton-Raphson Method - Engineering Computing (Fortran) - Old Exam Paper, Exams of Materials science

Toggle sidebar
bg1
Autumn Examinations 2007/ 2008
Exam Code(s) 1BM121, 1BG121, 1EG121
Exam(s) First Year Engineering
(Mechanical, Biomedical, Undenominated)
Module Code(s) ME114
Module(s) Engineering Computing I (Fortran)
Paper No. 1
Repeat Paper -
External Examiner(s) Professor J. Fitzpatrick
Internal Examiner(s) Professor P.E. McHugh
* Dr. J.A. Eaton
Instructions:
• Answer 3 questions.
• All questions carry equal marks.
• Attached are the following information:
— List of Fortran intrinsic procedures
Duration 2 hours
No. of Pages 6
Department(s) Mechanical and Biomedical Engineering
Course Co-ordinator(s)
Requirements:
MCQ -
Handout -
Statistical/ Log Tables -
Cambridge Tables -
Graph Paper -
Log Graph Paper -
Other Materials -
pf3
pf4
pf5

Partial preview of the text

Download Newton-Raphson Method - Engineering Computing (Fortran) - Old Exam Paper and more Exams Materials science in PDF only on Docsity!

Autumn Examinations 2007/ 2008

Exam Code(s) (^) 1BM121, 1BG121, 1EG Exam(s) (^) First Year Engineering

(Mechanical, Biomedical, Undenominated)

Module Code(s) (^) ME Module(s) (^) Engineering Computing I (Fortran)

Paper No. (^1) Repeat Paper -

External Examiner(s) (^) Professor J. Fitzpatrick Internal Examiner(s) (^) Professor P.E. McHugh

  • Dr. J.A. Eaton

Instructions: (^) • Answer 3 questions.

  • All questions carry equal marks.
  • Attached are the following information: — List of Fortran intrinsic procedures

Duration 2 hours No. of Pages (^) 6 Department(s) (^) Mechanical and Biomedical Engineering Course Co-ordinator(s)

Requirements : MCQ - Handout - Statistical/ Log Tables - Cambridge Tables - Graph Paper - Log Graph Paper - Other Materials -

1 .(a) Briefly explain LOGICAL variables, logical operators and logical expressions. Use Fortran 95 statements to illustrate your answers. (5 points)

(b) Draw a flowchart and write a programme in Fortran 95 to sort a list of student names in descending order based on overall marks. The input data consist of a list of 150 names and their corresponding laboratory and examination marks. The output should be the ordered list of names and the corresponding overall mark. Use files for input and results.

Hint : Employ the bubblesort algorithm. (15 points)

2. (a) Describe the possible uses of the MODULE facility in Fortran 95. Use sketches and code samples, as appropriate, to illustrate your answers. (6 points)

(b) Draw a flowchart and write a Fortran 95 programme to compute the integral

f f e dx

b

a

x f

f

− 2

3 1 3

using the trapezoidal rule ( i.e. approximating the function by linearly varying small steps). Read in the parameters f 1 , f 2 , f 3 , a , b and n , the number of subdivisions of the range a to b and output the value of the integral. Your programme should compare the approximate result with the exact analytic result given in the formula below. Output the exact result and the normalized error.

− − a f b f f

f

f b f e f a f e^2

3 2

3

(^1 212) (14 points)

3. (a) Briefly explain what a recurrence relation is and the advantages of exploiting recurrence in numerical computation. Illustrate using the power series expansion for the exponential function

∞

=

i 0!

i x

i

x

e (5 points)

(b) The sine of an angle x , in radians , is the result of the summation of the infinite series:

K

sin( )

3 5 7 9

x x x x

x = x − + − +

Draw a flowchart and write a Fortran 95 programme to read in a number of angles in units of degrees , and for each of them to sum the first 50 terms of the series. At the end, compare your summations with the intrinsic procedure value SIN(X). (15 points)