






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 past exam are: Program in Fortran, Set of Numbers, Mean and Variance of Numbers, Standard Deviation, Square Root of Variance, Output of Fortran90 Program, Terms of Step Functions, Bending Moment
Typology: Exams
1 / 10
This page cannot be seen from the preview
Don't miss anything!







Answer FIVE questions. All questions carry equal marks. Answer one question from Section A and use an individual answer book for this question. Answer at least two questions from Section B.
Examiners: Mr. J.Murphy Mr. P.Anthony Ms. J. English Mr. T. O Leary Mr. J.Kelleher
1 (a) List the main steps within a program in FORTRAN. (2 marks)
(b) Write a FORTRAN program to do the following:
Read a set of numbers, count them and calculate the mean, variance and standard deviation of the set of numbers. The mean and variance of numbers (^) x 1 (^) , x 2 ,..., xn can be calculated using the following formulas:
mean= 1
i i
variance=
2 2 1 2 1
i i i i
The standard deviation is the square root of the variance. (10 marks)
(c) What is the output from the following program if the values 6, 12, 9, 15 and 3 are entered at the prompts?
NOTE: Trace your working so that partial credit may be given for incomplete or incorrect work. cont//…
PROGRAM q1c implicit none integer value, k !---------------------------------------------------- DO k = 5,1,- write(, '(a)', advance='yes')'gimmee a value --->' read,value if( (value > 3) .and. (value < 8))then print, 'Wicklow' else if(value /= 4)then print, 'Mayo' else print, 'Cork' end if if(value == 9)then print, 'Galway' else if(value <= 3)then value = value + 1 print*, 'Meath' end if END DO !---------------------------------------------------- stop 'q1b ends ...' END PROGRAM q1b (8 marks)
Flowchart for a simple program
Declare & Initialize variables
READ lengths a, b and c
Do the 3 sides a, b,c represent a triangle? Compute the Area of the triangle
Compute the Perimeter of the triangle
Output Results
Yes
START
Generate a message stating that the data entered doesn’t form a triangle.
Is more data to be entered?
Yes
NO
Section B
and x=4m there are loads of 12kN and 18kN, respectively. Express the Bending Moment M in terms of step functions. Find the deflection y at any point on the beam by solving the differential equation
M y(0) y(5) 0 dx
EI d y 2
2 = = =. (8 marks)
(b) Between the points x=0 and x=4m on a beam of span 6m there is a U.D.L. of 36kNm-1^. Both ends of the beam are embedded in walls. Express the Bending Moment M in terms of step functions. By solving the differential equation
M dx
EI d y 2
2 =.
find the deflection y at any point on the beam. (7 marks)
(c) By assuming an exponential solution solve the differential equation
9y 0 y(0) 2 y(0) 7 dx
6 dy dx
d y 2
2
dxdy^ −2y=^10 y(0)=^1 Using Euler’s Method (^) y (^) k + 1 =yk+hyk′ with a step of 0.1 estimate the value of y at x=0.2. Calculate the error in this approximation. (6 marks)
(b) Select any two of the following: (i) Find the general solution of the differential equation
1 6sin2t dt
2 dy dt
d y 2
2
(ii) Find the general solution of the differential equation
2y 4e dx
3 dy dx
d y x 2
2 − + =
(iii) Solve the differential equation
4 x 8 t 12 x(0) 5 x(0) 0 dt
d x 2
2
Fig. 2(b)
STOP
Section C
(a) Find the inverse of A below. If it exists find the matrix C where CA=B T
(9 marks)
(b) By using Gaussian Elimination with partial pivoting solve correct to two places of decimal the set of simultaneous equations
z
y
x
2.50 6.50 9.
(6 marks)
(c) Show that the set of equations below are linearly dependent and find all solutions.
z
y
x
5 6 7
(c) Using Gaussian elimination solve the set of equations
w
z
y
x
(5 marks)
Using the Least Squares Method find the best values of the constants A and N. Express all new variables correct to two places of decimal. Solve the normal equations by using Cramer’s Rule. (7 marks)
R 9.9 14.2 19.9 28.2 35. T 3.16 5.03 7.94 12.58 19.
(b) For the vectors (^) a = i + j + k , (^) b =2 i -3 j + k and (^) c =2 i -2 j - k : (i) Show that a and b are orthogonal. (ii) Find the acute angle between the vectors a and c (iii) Verify that ( b xc ) xa =( a.b ) c- ( a.c ) b (6 marks)
(c) Two forces F 1 and F 2 act at the points A(1,1,0) and B(2,3,2), respectively. The force F 1 is of magnitude 30kN and it acts in the direction of the vector AB. The second force F 2 is of magnitude 28kN and this acts in the direction opposite to the vector 6 i +3 j +2 k. (i) Find the vectors F 1 and F 2. (ii) Find the component of (^) F 2 in the direction (^) AB. (iii) Find the moments of both forces about the point A. (7 marks)
each samples the number of defective items were counted and are recorded
No. of defectives 0 1 2 3 4 > No. of batches 51 25 18 5 1 0
Calculate the average defective rate. By using the Binomial distribution calculate the probability that a random sample of one hundred items contains two or more defective items? (ii) The average number of vehicles arriving at a particular junction is 105 per hour. Use the Poisson Distribution to calculate the probability of two or three vehicles arriving at this junction in any single minute. (8 marks)
(b) The weights of bricks are assumed to be Normally distributed with a mean value of 3.10kg and with a standard deviation of 0.007kg. (i) Calculate the percentage of bricks that weigh between 3.09kg and 3.10kg. (ii) If 99.8% of readings are less than W find the value of W. (ii) A sample of nine bricks is taken. Calculate the probability that the sample mean will lie between 3.095kg and 3.115kg. (5 marks)