

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this exam paper are: Power Series Expansion, Recurrence Relation, Programming Efficiency, Evaluate, Summation, Recurrence Relation, Maximum Number, Terminated, Newton-Raphson Method, Sketches
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Exam Code(s) 1BM121, 1BG121, 1EG121, 1BSE Exam(s) 1st Mechanical Engineering 1st Biomedical Engineering 1st Undenominated Electronic Engineering 1st Energy Systems Engineering
Module Code(s) ME Module(s) Engineering Computing I (Fortran)
Paper No. 1 Repeat Paper
External Examiner(s) Professor Noel O’ Dowd Internal Examiner(s) Professor Peter Mc Hugh Professor Sean Leen
Instructions: (^) Answer 3 questions.
All questions will be marked equally.
No. of Pages 3 (including cover) Department(s) Mechanical and Biomedical Engineering Course Co-ordinator(s) Professor Sean Leen
Requirements: None
Release to Library: Yes
1. (a) The power series expansion for sin(x) is:
... 3! 5! 7! 9!
sin( )
3 5 7 9 = − + − + +
x x x x x x
Briefly explain what a recurrence relation is, and, by deriving the recurrence relation for this series, show how it can lead to programming efficiency. (10)
(b) Draw a flowchart and write a Fortran program to evaluate sin(x) using a recurrence relation. The results should be computed to 0.1% accuracy and the summation should be terminated after a maximum number of terms N max specified by the user. Read values for x and N max from an input file and write the results to an output file. Include a repeat option. (15)
2. (a) Describe, using sketches, the Newton-Raphson method for numerically determining the roots of a function y = f(x). Describe how the algorithm is implemented, including convergence testing. (10)
(b) Draw a flowchart and write a Fortran program to calculate to five decimal places, using the Newton-Raphson method, the roots of the equation: y = 4 x^4 + 5 x^3 + 4 x^2 + 7 x The program should read in the coefficients of the equation and should request all other necessary parameters from the user. (15)
3. (a) Describe, using sketches, the trapezoidal method for numerical integration of functions. (10)
(b) Draw a flowchart and write a Fortran program to compute the following integral using Simpson’s rule:
d
c
ax
Note that the program should read in a, b , c, d , and the number of subdivisions in the range c to d. (15)