




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Mathematics & Computing
(Time: 3 Hours)
Answer question 1 from Section A. Examiners: Mr. S.P. O’Sullivan Answer two questions from Section B. Mr. R. Simpson Answer two questions from Section C. Ms. M. Brennan Use a separate answer book for each section. Dr. T. Creedon The weighting of Computing:Maths is 15:55 Ms. J. English Mr. J. Kelleher
Section A
1 (a) What is the purpose of the statement IMPLICIT NONE in the specification section of a program? (2 marks)
(b) What is the output of the following Fortran90 program for each of the following cases: s Í 27, t Í 9; s Í 36, t Í 48; s Í 13, t Í 25? Can you deduce what IT is? NOTE: Trace your working so that partial credit may be given for incomplete or incorrect work.
PROGRAM q1b implicit none
integer:: s, t, r, q !--------------------------------------------------------------
write(*,'(A)',advance='yes')'gimmee an integer s --->' read , s write(,'(A)',advance='yes')'gimmee an integer t --->' read *, t
do q = s / t r = mod(s, t) if(r == 0)then print*, 'so there it is --->', t, ' is IT' exit end if s = t t = r end do stop'q1b.f90 ends ....' END PROGRAM q1b
(8 marks)
(c) The dot product of two vectors a = (a 1 , a 2 , a 3 ) and b = (b 1 , b 2 , b 3 ) is a scalar quantity defined by the equation
a.b = a 1 b 1 + a 2 b 2 + a 3 b 3
The cross product of two vectors a = (a 1 , a 2 , a 3 ) and b = (b 1 , b 2 , b 3 ) is a vector quantity defined by the equation
a x b = (a 2 b 3 – a 3 b 2 , a 3 b 1 - a 1 b 3 , a 1 b 2 - a 2 b 1 )
Write a program that will read in two vectors a and b into two one dimensional arrays and then calculate the dot and cross products according to the equations above. (10 marks)
point (2,3,4) and B is the point (5,1,-2). Find the component of F in the direction − 3 i + 6 j + 2 k. (6 marks)
(b) A , B , C are three points with Cartesian coordinates A (2,-1,5), B (3,1,2) and C (1,2,4). Find the vectors AB , BC , and AC. Verify that they form the sides of the triangle ABC. Determine the angle opposite AC. (7 marks)
(c) A force F 1 of magnitude 34 kN lies in the direction 8 i − 15 k , while a force F 2 is of magnitude 56 kN and acts in the direction of the vector 6 i + 12 j − 4 k. The resultant F of these two forces acts through the point P (-1,3,5). Find its moment about the point A (6,-2,4). (7 marks)
t (minutes) 0 10 20 25 40 50
It is believed that the variables are related by a formula of the type
kt T Ae
− = , where A and k are constants. Use the Least Squares method to find the best values of the constants A and k. Hence, estimate the temperature of the body at 30 minutes. (12 marks)
(b) In an experiment involving the effects of temperature T on a resistance R , the following results were obtained.
R (ohms) 765 826 873 942 1032
Calculate the correlation coefficient and interpret your result. (8 marks)
Section C
y '^ = 2 xy given that h = 0. 2 and y ( 1 )= 1.
(4 marks) (b) Test whether the differential equation ( y^3 − y^2 sin x − x ) dx +( 3 xy^2 + 2 y cos x ) dy = 0 is exact. Hence determine the general solution of the equation.
(8 marks)
(c) Use the method of Undetermined Coefficients to find the general solution of
2 − + y = x + x + dx
dy dx
d y
(8 marks)
(ii)
(5 marks)
(b) Find the inverse Laplace transform of
(i) (^5) ( 3 )
s
F s (ii) 5
s
s Fs
(5 marks)
(c) Use Laplace transforms to solve the differential equation
x ''^ ( t )+ 4 x '( t )+ 3 x ( t )= 10 , x ( 0 )= 0 , x '( 0 )= 1
(10 marks)
'' 2 '
'
0
at
st
∞ −
f(t) F(s)
s
t n 1
sn^ +
n
e −^ α^ t
s +
s
te −^ α^ t ( )^2
s + α
e −α^ t^^ − e −^ β^ t ( α)( β)
β α
s s
( α) ω
ω s + +
( α) ω
α
s
s
- A Sample size n ' - A '