Civil Engineering Exam: Mathematics & Computing, Autumn 2005, Exams of Mathematics for Computing

Information about an exam for the bachelor of engineering in civil engineering at cork institute of technology. The exam focuses on mathematics & computing and includes questions related to fortran programming, flowcharts, and differential equations. Students are required to answer questions from section a and at least two questions from section b. The exam lasts for 3 hours and is worth nfq level 7.

Typology: Exams

2012/2013

Uploaded on 03/27/2013

ashis
ashis 🇮🇳

4.3

(29)

90 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cork Institute of Technology
Bachelor of Engineering in Civil Engineering – Award
(National Diploma in Engineering in Civil Engineering – Award)
(NFQ – Level 7)
Autumn 2005
Mathematics & Computing
(Time: 3 Hours)
FIVE questions are to be answered.
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. L. Anthony
Ms. J. English
Mr. T. O Leary
Section A
1 (a) The following Fortran90 program accepts a sequence of integers, adding the positive integers and the
negative integers separately and then prints the number of, the sum of and the average of each kind. A
sample run is shown. Please rewrite the program so that it does the same analysis but into odd and
even positive integers (rather than positive and negative ones). (8 marks)
PROGRAM q1b
implicit none
integer:: theNumber
integer:: sum_1 = 0,sum_2 = 0
integer:: count_1 = 0,count_2 = 0
!---------------------------------------------------------------------
do
write(*,'(A)',advance='no')'gimmee an integer (+ve or -ve, 0 to END) '
read *, TheNumber
if(TheNumber > 0)then
sum_1= sum_1 + TheNumber
count_1 = count_1 + 1
else if (TheNumber < 0)then
sum_2= sum_2 + TheNumber
count_2 = count_2 + 1
else
exit
end if
end do
if(count_1 > 0) then
print 20, count_1, sum_1, REAL(sum_1)/count_1
else
print *,’XXXXXXX’
end if
if(count_2 > 0) then
print 30, count_2, sum_2, REAL(sum_2)/count_2
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Civil Engineering Exam: Mathematics & Computing, Autumn 2005 and more Exams Mathematics for Computing in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Engineering in Civil Engineering – Award

(National Diploma in Engineering in Civil Engineering – Award)

(NFQ – Level 7)

Autumn 2005

Mathematics & Computing

(Time: 3 Hours)

FIVE questions are to be answered.

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. L. Anthony

Ms. J. English

Mr. T. O Leary

Section A

1 (a) The following Fortran90 program accepts a sequence of integers, adding the positive integers and the

negative integers separately and then prints the number of, the sum of and the average of each kind. A

sample run is shown. Please rewrite the program so that it does the same analysis but into odd and

even positive integers (rather than positive and negative ones). (8 marks)

PROGRAM q1b implicit none

integer:: theNumber integer:: sum_1 = 0,sum_2 = 0

integer:: count_1 = 0,count_2 = 0

!---------------------------------------------------------------------

do write(*,'(A)',advance='no')'gimmee an integer (+ve or -ve, 0 to END) '

read *, TheNumber

if(TheNumber > 0)then sum_1= sum_1 + TheNumber

count_1 = count_1 + 1

else if (TheNumber < 0)then sum_2= sum_2 + TheNumber

count_2 = count_2 + 1

else exit

end if

end do

if(count_1 > 0) then

print 20, count_1, sum_1, REAL(sum_1)/count_ else

print *,’XXXXXXX’ end if

if(count_2 > 0) then

print 30, count_2, sum_2, REAL(sum_2)/count_

else print *,’ZZZZZZZ’

end if

20 FORMAT (//1x, t10,i5, ” positive integers”,&

/ t20, ” with sum -->> “, i8,&

/ t20, ” and average -->> “, f8.3)

30 FORMAT (//1x, t10,i5, ” negative integers”,&

/ t20, ” with sum -->> “, i8,& / t20, ” and average -->> “, f8.3)

!----------------------------------------------------------------------

stop'q1b.f90 ends ....' END PROGRAM q1b

Sample Run:

(b) Write a FORTRAN program to do the following:

Read in the total number of hours worked by a particular employee in a week, the basic hourly rate of

pay and the overtime-hourly rate of pay. The program should then calculate and print the gross pay for

that employee for that particular week.

(12 marks)

2 (a) Flowcharts are often used as a tool to aid the development of computer code. Discuss the use

of flowcharts and their advantages. (4 marks)

(b) Some of the standard symbols used in flowcharts are shown below. Explain where each one

would be used.

(i) (ii) (iii)

(iv) (v) (vi)

(6 marks)

(c) A flowchart is given below in figure 2(b). Write the FORTRAN code.

(12 marks)

gimmee an integer (+ve or -ve, 0 to END) 4

gimmee an integer (+ve or -ve, 0 to END) -

gimmee an integer (+ve or -ve, 0 to END) 7

gimmee an integer (+ve or -ve, 0 to END) 8

gimmee an integer (+ve or -ve, 0 to END) - gimmee an integer (+ve or -ve, 0 to END) 0

3 positive integers

with sum -->> 19

and average -->> 6.

2 negative integers

with sum -->> -

and average -->> -7. q1b.f90 ends ....

Press any key to continue

Section B

  1. (a) Using Euler’s Method and the Three Term Taylor Method with a step h=0.

estimate the value of y at x=0.1 where

2 y dx

dy = y(0)=5.

  • = + k

2

k 1 k k y 2!

h Note :y y hy (5 marks)

(b) Between the points x=2m and x=5m along beam of span 5m there is a uniformly

distributed load of 7.2kNm

  • . Express the load per length w in term of a step

function. The deflection y at any point along the beam is found by solving the

differential equation

w dx

dy EI 2

2

= −

Solve this differential equation where both ends of the beam are fixed. (8 marks)

(c) The deflection y at any point on a beam of span 4m is found by solving the

differential equation

60 [x 2] R[x- 3] dx

d y EI 2

2

=− − +

where R is a constant and “[x-2]” and “[x-3]” are step functions. Solve this

differential equation where y is zero at x=0 and at x=4. At the point x=4 the slope

of y is zero. (7 marks)

  1. Select any three of the following:

(a) Solve the differential equation

3y 12 y(0) 1 dx

dy

  • = = (5 marks)

(b) Solve the differential equation

8x 80 x(0) x(0) 0. dt

dx 6 dt

d x

2

2

    • = = ′ = (7 marks)

(c) Find the general solution of the differential equation

16 x dx

dy 4 dx

d y

2

2

  • =. (6 marks)

(d) Find the general solution of the differential equation

2y 13 0cos3t. dt

dy 3 dt

d y

2

2

    • = (8 marks)
  1. (a) If f(x)=ln(secx) show that f (x) sec x

2 ′ (^) =. Show that the first two non vanishing terms

of a Maclaurin Series of f(x) is given by

x

x f(x)

2 4

= + +.

Find three terms of a Taylor Series expansion of f(x) about the point x= 4

π

Note: 1 cos 0 1 tan 0 0 4

tan 2

cos cosx

secx = = = 

π π (8 marks)

(b) Find a Taylor series expansion of f(x,y)=exp(x

2 -4y) about the values x=2,y=1.

Note : A Taylor Series expansion of f(x,y) about values x=a and y=b is given by

f .... 2!

(y b) f (x a)(y b)f 2!

(x a) f(x, y) f(a,b) (x a)f (y b)f yy

2

xx xy

2

x y +

(8 marks)

(c) In measuring the area of a triangular plot the formula absinC 2

A = is used. Estimate

the area of a plot if the values of a, b and C were measured as 2, 6 and 30

o with maximum

errors of 0.01, 0.02 and 0, respectively. (4 marks)

(c) The number of cars N passing between two observation points is believed to be related to

the transit time t by the formula N=at+b. Using the Least Squares Method find the best

values of the constants a and b for the data below.

N 2 5 4 3 1

t 1 2 3 4 5

(6 marks)

  1. (a) In the manufacture of items it is found that 0.2% of the items produced fail to satisfy

tolerance requirements and are deemed to be defectives. By using both the Binomial

and Poisson Distributions calculate the probability that a sample of 100 items contains

two or three faulty items. (7 marks)

(b) The weights of concrete blocks are assumed to be Normally distributed with a mean value

of 3.50kg and with a variance of 0.006kg

2

. Calculate the percentage of blocks that weigh

between 3.48 and 3.54kg. If 99.9% of blocks have a weight less than a particular weight

W find the value of W. (5 marks)

(c) A quality control chart is used as an aid in controlling the level of a certain chemical in

a product.

Sample No. 1 2 3 4 5 6

Mean 89 88 89 89

Range 3 4 4 4

The table above is incomplete.

For the data above set up a control chart for sample means. Plot the chart and comment

on whether or not the process is under control. (8 marks)

S TANDARD DERIVATIVES

f(x) f(x)^ a=constant

n x

n 1 nx

sinx cosx

cosx -sinx

secx secxtanx

tanx sec

2 x

e

ax ae

ax

lnx

x

uv

dx

du v dx

dv u +

v

u

2 v

dx

dv u dx

du v −

STANDARD INTEGRALS

f(x)

f(x)dx a=constant

n x

n 1

x

n 1

x

(^1) ln x