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 B

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

Question 1 (6 marks)

If z1  = 1 − 3j   and z2  = 2 + 4j    calculate

i)

ii)

iii)

z1z2

| |

z̅2

(6 marks)

Question 2 (3 marks)

Find  when y = xx

(3 marks)

Question 3 (7 marks)

The velocity  v  of a falling object is given by    50  = 100 − 5v,  v < 20

i)           Solve this equation by separating the variables, given that the object is at rest initially.

ii)          Find v as t → ∞

iii)         Sketch the graph of v against t for t ≥ 0                                                       (7 marks)

Question 4 (13 marks)

i)     Sketch the region over which the double integral  g(x, y)dxdy

is to be integrated.                                                                                                                (2 marks)

ii)    Rewrite the integral by reversing the order of integration and evaluate the integral

1

when g(x, y) = y(x2  − y2)2

(11 marks)

Question 5 (4 marks)

An engineering company manufactures bolts. The internal diameter can be modelled by the Gaussian distribution N(2.8, 0.22 ). Bolts with an internal diameter of less than 2.6mm or greater than 2.92mm are rejected. Given a batch of 800 bolts, what is the expected number of acceptable bolts? (4 marks)

Question 6   (20 marks)

a)   Give a brief explanation of how the self” parameter is typically used in Python. (3 marks)

b)  The following Python code was written to define a complex number object, and perform basic complex number operations.

class complex_number:

'''Complex number class . Creates a complex number z = a + bj object from the variables a and b, and supports basic complex number operations such as addition, modulus, argument and complex conjugation.'''

def __init__ (self, a, b):

''' Class constructor . Receives the real (a) and imaginary (b) parts as input arguments   and initialises the self.z which represents the complex number as a list of length two.''' self.z = [a,b]

def __str__(self):

'''Method to control how Complex Number objects are printed'''

return str('Complex number ' + str(self.z[0]) + ' + ' + str(self.z[1]) + 'j.')

def modulus(self):

''' '''

def __add__(self, other):

'''Method to add two complex numbers together.'''

a = self.z[0] + other.z[0]

b = self.z[1] + other.z[1]

return complex_number(a, b)

def conjugation(self):

'''Method to compute the complex conjugate of a complex number.'''

a = self.z[0]

b = -self.z[1]

return complex_number(a, b)

def argument(self):

'''Method to compute the argument of a complex number. Output is a float in the range (-np.pi, np.pi].'''

import numpy as np

x = self.z[0]

y = self.z[1]

The modulus method has not been written. Write it, including an appropriate docstring. (5 marks)

c)   The following lines are input. What output would you expect? (4 marks)

z1 = complex_number(1,2)

z2 = complex_number(3,4)

print(z1)

print(complex_number.modulus(z2))

print(z1 + z2)

print(complex_number.conjugation(z1))

d)  The argument method is not finished. Complete it (you may wish to use the numpy command np.arctan).               (8 marks)

Question 7 (7 marks)

Find the eigenvalues and corresponding eigenvectors of A = (1    1      1 )          (7 marks)

Section B      Answer ONE question from this section (50 marks)

Question 8   (40 marks)

a)   An electrical component is supposed to be precisely 3 mm long.  After the machine had   been serviced, a sample of 13 components were checked, and found to have a sample mean of 3.26 mm and sample standard deviation 0.8 mm.  Conduct a suitable hypothesis test at    5% significance level to determine whether the mean should still be regarded as 3 mm.          Assume the length follows a Normal (Gaussian) distribution. (6 marks)

b) Use Green’s Theorem to evaluate the integral     (x + 2y) dx + (4x − y) dy

around the closed curve bounded by the curve y = 4 − x 2 , the positive x axis and the

positive y axis, where x ≥ 0 and y ≥ 0                                                                        (10 marks)

c)    i)   Find the Laplace transform of f(t) = tet ,  t > 0

by using the formula L{f(t)} =  e stf(t) dt                                                                 (4 marks)

ii)   Solve the equation f′′ (t) − 5f(t) + 6f(t) = 0  by taking Laplace transforms,  given

that f(0) = 0   and f(0) = 1                                                                                              (10 marks)

d)     Consider the following differential equation:

 

Write Python commands to integrate this equation using 500 points, evenly distributed

between 1 and 5, using odeint.                                                                                          (5 marks)

e)    What will the output (value and type) of the following lines of code be? Justify your       answer.                                                                                                                                     (5 marks)

g = lambda a, b, c, d, e: (a**b - c**d)/e

f = lambda x, y, z: g(x, 2, 4, z, y)

print(f(10, 2, 3))

Question 9 (40 marks)

a)  i)     Find the vector equation of the line r1 which passes through the points with            coordinates (-2, 4, 9) and (2, -1, 6)                                                                                     (1 mark)

5                  3

6                  d

such that the lines r1  and r2   intersect.

iii)   Find the acute angle between the two lines.

(3 marks) (3 marks)

b)   i) Consider the second order non-homogeneous differential equation 3  + 5  − 2y = 14e−2x

Using the idea of complementary function and particular integral, find the general solution

to this differential equation.

ii) Find the particular solution given that when x = 0    y = 5

c)  If   F = exyz i +ey 2zj + exz k   find  ∇ x F  at the point (1, 2, -2) (13 marks)

and     = −5    (5 marks)

(5 marks)

d)    The following recursive function has been written in Python code to sort a list of

numbers. Add appropriate comments to each line, explaining the code. def quicksort(L):

n = len(L)

if n <= 1:

return L

else:

pivot = L[round(n/2)]

A=[]; B=[]; C=[]

for item in L:

if item == pivot:

B.append(item)

elif item < pivot:

A.append(item)

else:

C.append(item)

sorted_list = quicksort(A) + B + quicksort(C)

return sorted_list

e)    Write a Python script to evaluate the following integral using dblquad: