Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ENG1002

FACULTY OF ENVIRONMENT, SCIENCE AND ECONOMY

ENGINEERING

May 2023

Practice Paper A

Section A   Answer ALL questions in this section (60 marks)

Question 1 (4 marks)

7x2 −3x+1  

(x−3)(x2 +2)

Question 2 (9 marks)

Two complex numbers are given by z1  =   and z2  = −4 + 2j

(a) Express z1 in the form a + bj where a and b are real numbers.  (2 marks)

(b) Represent z1 and z2  on an Argand diagram.    (2 marks)

(c) Express z2  in polar form. Hence find (z2)4     (5 marks)

Question 3 (4 marks)

z      z     2z       2z

Find the partial derivatives     (4 marks)

Question 4 (9 marks)

(a) Sketch, by hand, the region over which the double integral   j

is to be evaluated.

(b)Find the value of the double integral

2

1

 e   dydx 0

(3 marks)

(6 marks)

Question 5 (4 marks)

Disks of polycarbonate plastic from a supplier are analysed for scratch and shock resistance. The results from a sample of 100 disks are summarised below:

 

SHOCK RESISTENCE

High

Low

SCRATCH

RESISTENCE

High

70

9

low

16

5

Let A denote the event that a disk has high shock resistance, and let B denote the event that a disk has high scratch resistance. Find the following probabilities:

(a) P(A)

(b) P(B)

(c) P(A | B)

(d) P(B | A)

Question 6 (20 marks)

The following code was written in Python to store and calculate some basic information about different people.

from datetime import date

class Person:

'''Person class. Creates a person object and supports BMI calculation, and computation of DOB.'''

def __init__(self, name, seconds, height, weight):

'''Class constructor. Creates a person object from a string (name), and

three floats (seconds alive, height in meters, weight in kg).'''

self.name = name

self.seconds = seconds

self.height = height

self.weight = weight

def __str__(self):

'''  '''

return str(self.name + ' is ' + str(self.weight) + 'm tall, and weighs ' + str(self.height) + 'kg. They have been alive for ' +  str(self.seconds) + ' seconds.')

def BMI(self):

""" Method to compute the BMI (weight in kg divided by height in m squared) of a person."""

return self.weight/self.height^2

def Age(self):

"""Method to compute the age of a person as a string, e.g. '10 years, 4 months, and 3.2    days.' should be the output if the person was born that amount of time ago. Years and months should be an int, but days can be a float."""

(a) Find two mistakes in the code and explain them.                                                 (4 marks)

(b) What would be the output of the following lines if no mistakes have been corrected? (3 marks)

bob = Person('Bob Bobington', 53611200, 2. 1, 80)

print(bob)

(c) The docstring for the __str__ method is missing. Write a suitable one.               (3 marks)

(d) The Age method is incomplete. Write code with comments to satisfy the requirements laid out in the method. You may assume there are 30.4 days on average in a month. What would be the output of the following line?

print(Person.Age(bob))    (10 marks)

Question 7 (10 marks)

Using one of the matrix methods, find the solution of the following set of linear algebraic simultaneous equations

5x + 7y − 5Z =  1.5

4y  Z =  −3

2x + 8y − 3Z =  −3 (10 marks)

Section B   Answer ONE question from this section

Question 8 (40 marks)

(a) The blood pressures, p mmHg, and the ages, t years, of 7 hospital patients are shown in the table below.

Patient

A

B

C

D

E

F

G

t

42

74

48

35

56

26

60

p

98

130

120

88

182

80

135


(i) Calculate the product moment correlation coefficient for this data.    (3 marks)

(ii) Interpret the correlation coefficient.    (2 marks)

(iii) Find the equation of the linear regression line ofp on t.   (3 marks)


(iv) Use your regression line to estimate the blood pressure of a 40 year old patient.(2 marks)

(b) Two planes have equations 4x + 2y − z = 0 and x − y + 2z = 4

(i)   Write down the vectors which are normal to each of these planes.                    (2 marks)

(ii)  Evaluate the vector product of a = 4i + 2j − k  and b = i − j + 2k                        (4 marks)

(iii)  State the relation of the direction of this vector in relation to the two vectors a and b.  (1 mark)

(iv)  Find the co-ordinates of the point on the line of intersection of the two planes

where z = 0. Hence write down the equation of the line of intersection of the two planes. (2 marks)

(c) Use Laplace Transforms to solve the differential equation       − 2x = 4

given that  x = 1 when t = 0          and x(t) is a causal function.                           (11 marks)

(d) Write a function in Python that takes as input some two by two matrix formatted as a      numpy array, and outputs the determinant, without using any determinant specific Python    commands.                                      (4 marks)

(e) Write a function in Python that takes as input some square matrix formatted as a numpy

array, and outputs the trace, without using the numpy.trace command.                    (6 marks)

Question 9 (40 marks)

(a) Find the double integral

I = ∫   ∫                                       dy dx


using the transformation of coordinates    u = x + y            v = x − y

(i) Sketch the region on the xy plane.

Find the new boundaries and sketch the new region in the uv plane.   (4 marks)

(ii) Evaluate the integral I   (8 marks)


(b)  The equation of motion of a vibrating body is given by       + 2 + s = 4cos 2t

(i)    By using the idea of the complementary function and particular integral find the general solution of the differential equation.                                                                    (11 marks)

ds

(ii)    Given that when  t = 0 ,   s = 0  and            = 2    find the particular solution for s as a

dt

function of t in this case.                                                                                      (4 marks)

(c)  A scalar field f(x,y) is given as f(x, y) = 2xy2  − yx2  + 4xy

Find gradf = f

(3 marks)

(d) The following Python code defines a function that implements the Trapezium Rule for   integration of a function. Find and explain any errors.                                         (4 marks)

def trapz(f,a,b,N=50):

'''Approximate the integral of f(x) from a to b by the trapezoid rule.'''

x = np.linspace(b, a, N+1) # N+1 points make N subintervals

y = f(x)

y_right = y[1:] # right endpoints

y_left = y[:end] # left endpoints

dx = (b - a)/N

T = dx * np.sum(y_right + y_left)

(e) The following function is defined in addition to the previous function (with errors fixed), explain what you would expect the outcome of the following lines to be, with justification:

import numpy as np

def f(x):

return np.sin(x)

i)         print(trapz(f, 0, np.pi/2))

ii)        print(trapz(f, 0, np.pi/2, 50))

iii)       print(trapz(f, 0, np.pi/2, 1000))

iv)       print(trapz(f, 0, np.pi/2, 1))