




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: Fortran90 Program, Normal Distribution, Number of Occurrences, Binomial Distribution, Taylor Series, Mean Length of Sample, Standard Deviation, Percentage of Blocks, Find Vector
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Any FIVE questions are to be answered. Examiners: Mr J Lapthorne Mr J Kindregan Ms J English Mr T O Leary
1 (a) List the order of precedence of the arithmetic operators. (2 marks)
(b) What is the output of the following Fortran90 program?
NOTE: Trace your working so that partial credit may be given for incomplete or incorrect work.
PROGRAM q1_b implicit none integer::limit = 6 integer::a, b do a = limit,0, - do b = limit, 0, - if( (0 == a) .or. (limit == a) )then write(,'(i1)',advance='no')a else if( (b - a == 0))then write(,'(i1)',advance='no')a else if( (b + a == limit))then write(,'(i1)',advance='no')b else write(,'(a)',advance='no')'#' end if end do
(8 marks)
calculate the distance between them. The program should allow more than one set of data to be entered if the user wishes.
Note : The distance between the two points (x^1 ,y 1 ) and (x 2 ,y 2 ) is given by
(x -x ) +(y -y ) 1 2 2 1 2 2
and the sqrt( ) function returns the square root of a real. (10 marks)
2 (a) What is the output of the following Fortran90 program? NOTE: Trace your working so that partial credit may be given for incomplete or incorrect work.
marks)
PROGRAM q2_a implicit none integer::thisOne, thatOne thisOne = 12 thatOne = 2 do write(, '(i5)', advance= 'no')thisOne if(mod(thatOne, 5) == 0)then print end if if(thisOne == 1)exit if(mod(thisOne, 2) == 0)then thisOne = thisOne / 2 else thisOne = thisOne * 3 + 1 end if thatOne = thatOne + 1 d d
Enter an option (0 to see menu): 4 (12 marks)
2 = y(0)=y(5)= find the deflection y at any point on the beam. (9 marks)
(b) A light beam of span 6m has both ends embedded in walls. Between the points x=2m and x=6m there is a U.D.L. of 36kNm-1^. Express the Bending Moment M in terms of step function. Solve the differential equation
EI (^) dxd y 2 M
to find the deflection y at any point on the beam. (8 marks)
(c) By using Euler’s Method or the Three Term Taylor Method with a step h=0.1 estimate the value of y at x=1.1 where dy (^) 3y dx =^ y(1)= Note:
2 k+1 k k k y =y +hy + h y ′ (^) 2! ′′ (4 marks)
d x 3 dx 2x 20 x(0)=x (0)= dt +^ dt +^ =^ ′.^ (8 marks)
(b) Find the general solution of the differential equation 2 2
d x 2 dx x 4t dt +^ dt+^ =^.^ (6 marks)
(c) Find the general solution of the differential equation 2 2
d y (^) +2 dx 40cos4t dt dt =^ (7 marks)
(d) Solve the differential equation
dx (^) 2x 4 dt −^ =^ x(0)=0^ (5 marks)
Taylor Series expansion of f(x)=ln(secx) about the point x= π 4.
Note: 2cos 2 A=1+cos2A sin2A=2sinAcosA secA =cosA^1
sin π^1 tan π^1 cos π 0 cos 0 1 tan 0 0 2 4 2
. (9 marks)
(b) Find the Taylor series expansion of f(x,y)=exp(3x-y) about the values x=1,y=3. Note : A Taylor Series expansion of f(x,y) about values x=a and y=b is given by
f(x, y) f(a,b) (x a)f (y b)f (x2!a) f (x a)(y b)f (y2!b) fyy ....
2 xx xy
2 x y + = + − + − + − + − − + − (6 marks)
(c) In estimating a quantity V the formula V= 2x 2x-y is used. Find the partial derivatives of V with respect to x and to y. Hence estimate the value of V where the values of x and y were measured as 2 and 3 with maximum errors of 0.01 and 0.02, respectively. (5 marks)
C (9 marks)
(b) Solve the set of equations below can be solved by using Gaussian Elimination with partial pivoting (correct to two places of decimal). Also solve this set of equations by using Gaussian Elimination without partial pivoting or by using Cramers Rule.
Calculate the probability that the mean length of a sample of 16 blocks will be greater than 449.4mm. (6 marks)
(c) To monitor the breaking strength of precast concrete 6 samples of size 3were taken and the measurements are recorded below.
Sample No 1 2 3 4 5 6 Mean 54.7 55.3 54.9 55.0 55.2 54. Range 0.5 0.4 0.5 0.4 0.4 0.
Set up and plot a control chart for samples means. Include on the chart the mean values of the samples above and comment on the control of the process. (7 marks)
f(x) f^ ′ (x)^ a=constant x n nx n−^1 sinx cosx cosx -sinx secx secxtanx tanx sec^2 x e ax^ ae ax uv dx vdu dx u dv+
v
u
v^2 dx
udv dx v du−
xn n 1
x n^1
x
(^1) ln x
(x a)^2 f(x) = f(a) + (x − a)f (a)′^ + −2! f (a)′′ +..
.B INOMIAL DISTRIBUTION P(r)= (^)
r
N (^) p r (^) qN-r (^) where p+q=
POISSON DISTRIBUTION P(r)= λ^ r!e
r −λ where λ is the mean number of occurrences
Normal Distribution z= x-μ σ z= x-μ σ/ n