ENGF0004 Mathematical Modelling and Analysis II 2021

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

ENGF0004 Mathematical Modelling and Analysis II 2021/2022 Coursework 2

Model 1

Question 1 part (a):

Before we find the mass bounded by the elliptical function; 𝑥 2 + 2𝑦 2 + 𝑧 = 16 we can graph the function to allow
for a better understanding of this geometry. Figures of this elliptical function are shown below, and the MATLAB
code used to produce the figures will be annexed in appendix [1A]:

(a)
(b)
Figure 1: 3D representation of the elliptical function both in a sideview (a) and top view (b)

Due to the fact that that this elliptical function is bounded by the planes 𝑥 = 0, 𝑥 = 2, 𝑦 = 0 𝑎𝑛𝑑 𝑦 = 2 we know
that in figure 1b which shows the top view i.e., the X-Y plane, we notice that there is not any unique function relating
x and y. This is because we have already been instructed that the elliptical function is bounded by the planes
mentioned above which form a square plane that is shown in figure 1b. Furthermore, as seen from figure 1a the z
coordinate is not constant and at any x and y value it can be found by rearranging the elliptical function where 𝑥 2 +
𝑧 = 16 − 2𝑦 2 − 𝑥 2 .

Additionally as seen from figure 1a the lowest value of z is obtained at z=4 and this occurs when x and y both have a
value of 2.However since we are asked to find the mass of bounded by this elliptical function we can assume that
z=0 represents the bottom of the iceberg and between z=0 and z=4 the iceberg is a cuboid with dimensions of
length(x)=2, width(y)=2 and height(z)=4.Between z=16 which is the maximum z-value that can be obtained and z=4
this elliptical function governs the value of z at any x and y values.

Firstly, we can find the volume of this iceberg and show that whether we consider it as a cuboid between 0<z<4 and
then find the volume between 4 ≤ 𝑧 ≤ 16 − 2𝑦 2 − 𝑥 2 or directly find the volume between 0 ≤ 𝑧 ≤ 16 − 2𝑦 2 −
𝑥 2 , we will end up with the same value for the volume.

We know that volume is:


𝑐 2 2 16−𝑥 2 −2𝑦 2 2 2 4 2 2 16−𝑥 2 −2𝑦 2
𝑉 = ∫𝑉 𝑑𝑣 = ∭ 𝑑𝑧𝑑𝑦𝑑𝑥 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑑𝑧 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑑𝑧 + ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫4 𝑑𝑧
The reason for setting the limits of y and x to be both between 0 and 2 is mentioned above and it is because we know
that the elliptical function is bounded by the plane 𝑥 = 0, 𝑥 = 2, 𝑦 = 0 𝑎𝑛𝑑 𝑦 = 2 thus there is not any function
that relates x and y together. Therefore, the limits of integration for x and y are simply, 0 ≤ 𝑦 ≤ 2 and 0 ≤ 𝑥 ≤ 2
2 2 4 2 2 16−𝑥 2 −2𝑦 2
𝑉 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑑𝑧 + ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫4 𝑑𝑧 = 𝐴 + 𝐵

By evaluating integral A we can appreciate that this yields a volume of cuboid and thus:
2 2 4
𝐴 = ∫ 𝑑𝑥 ∫ 𝑑𝑦 ∫ 𝑑𝑧 = 2 ∗ 2 ∗ 4 = 16 𝑢𝑛𝑖𝑡𝑠 3
0 0 0

Now we can evaluate integral B:


2
2 2 16−𝑥 2 −2𝑦 2 2 2 2 2𝑦 3
𝐵 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫4 𝑑𝑧 = ∫0 𝑑𝑥 ∫0 12 − 𝑥 2 − 2𝑦 2 𝑑𝑦 = ∫0 [12 − 𝑥 2𝑦 − 3 0
] 𝑑𝑥

2 2
2 2𝑦 3 2 16 2 16 2𝑦 3
𝐵 = ∫0 [12 − 𝑥 2𝑦 − 3 0
] 𝑑𝑥 = ∫0 24 − 2𝑥 2 − 3
𝑑𝑥 = ∫0 24 − 2𝑥 2 − 3
𝑑𝑥 = [12 − 𝑥 2𝑦 − 3 0
] = 32 𝑢𝑛𝑖𝑡𝑠 3

Therefore:
𝑐
𝑉 = ∫𝑉 𝑑𝑣 = 𝐴 + 𝐵 = 16 + 32 = 48 𝑢𝑛𝑖𝑡𝑠 3

2 2 16−𝑥 2 −2𝑦 2
Evaluating the following integral 𝑉 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑑𝑧:
2
2 2 16−𝑥 2 −2𝑦 2 2 2 2 2𝑦 3
𝑉 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑑𝑧 = ∫0 𝑑𝑥 ∫0 16 − 𝑥 2 − 2𝑦 2 𝑑𝑦 = ∫0 [16𝑦 − 𝑥𝑦 2 − 3 0
] 𝑑𝑥

2 2
2 2𝑦 3 2 16 2𝑥 3 16
𝑉 = ∫0 [16𝑦 − 𝑥𝑦 2 − 3 0
] 𝑑𝑥 = ∫0 32 − 2𝑥 2 − 3
𝑑𝑥 = [32𝑥 − 3
− 3
𝑥]
0
2
2𝑥 3 16 48
𝑉 = [32𝑥 − − 𝑥] = 64 − = 64 − 16 = 48 𝑢𝑛𝑖𝑡𝑠 3
3 3 0 3

2 2 16−𝑥 2 −2𝑦 2 2 2 4 2 2 16−𝑥 2 −2𝑦 2


Therefore we can conclude that since ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑑𝑧 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑑𝑧 + ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫4 𝑑𝑧
then below the point z=4 the iceberg has a cuboid shape .

Finding the mass of the iceberg:

We know that mass 𝑀 is equal to density(𝜌𝑖𝑐𝑒 ) multiplied by volume (𝑉𝑖𝑐𝑒 ). Therefore 𝑀 = 𝜌𝑖𝑐𝑒 𝑉𝑖𝑐𝑒 .

However, we are given a density function 𝜌𝑖𝑐𝑒 = 𝑥𝑧 − 𝑦 3 , that gives us the density at all the points within the
volume of the iceberg. Thus, in order to find the mass of the iceberg we much find the density of iceberg at all points
within the iceberg and add them together to find the mass. This implicitly means that we are multiplying the density
of the iceberg at said points by an incremental volume dv and adding all the different values together in order to find
mass. Hence this can mathematically be written as:

𝑐 𝑐 2 2 16−𝑥 2 −2𝑦 2 2 2 16−𝑥 2 −2𝑦 2


𝑀 = ∫𝑚 𝑑𝑚 = ∫𝑉 𝜌𝑖𝑐𝑒 (𝑥, 𝑦, 𝑧) 𝑑𝑣 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝜌𝑖𝑐𝑒 (𝑥, 𝑦, 𝑧)𝑑𝑧 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑥𝑧 − 𝑦 3 𝑑𝑧

Notice here that the limits of integration remain the same as in the integral used to find the volume. The reason is
because the density function is evaluated over the same volume space as before hence the reason for the use of the
same integral limits.

Evaluating the integral of the mass:


16−𝑥 2 −2𝑦 2
2 2 16−𝑥 2 −2𝑦 2 2 2 𝑥𝑧 2
𝑀 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫0 𝑥𝑧 − 𝑦 3 𝑑𝑧 = ∫0 𝑑𝑥 ∫0 [ 2
− 𝑦 3 𝑧] 𝑑𝑦
0

Since this integral is more complex, we will analytically show all the computational steps:
16−𝑥 2 −2𝑦 2
Evaluating the definite integral ∫0 𝑥𝑧 − 𝑦 3 𝑑𝑧:

16−𝑥 2 −2𝑦 2 16−𝑥 2 −2𝑦 2


16−𝑥 2 −2𝑦 2 3 𝑥𝑧 2 3 𝑧
∫0 𝑥𝑧 − 𝑦 𝑑𝑧 = [ 2 − 𝑦 𝑧] = [ (𝑥𝑧 − 2𝑦 3 )]
0 2 0

𝑧 16−𝑥 2 −2𝑦 2 16−𝑥 2 −2𝑦2 1 16−𝑥 2 −2𝑦 2


[2 (𝑥𝑧 − 2𝑦 3 )] =[ 2
(16𝑥 − 𝑥 3 − 2𝑦 2 𝑥 − 2𝑦 3 )] − 0 = 2
(16𝑥 − 𝑥 3 − 2𝑦 2 𝑥 − 2𝑦 3 )
0

16−𝑥 2 −2𝑦 2 1 16−𝑥 2 −2𝑦 2 (2𝑦 3 +2𝑥𝑦 2 +𝑥 3 −16𝑥)(2𝑦 2 +𝑥 2 −16)


2
(16𝑥 − 𝑥 3 − 2𝑦 2 𝑥 − 2𝑦 3 ) = −(−16𝑥 + 𝑥 3 + 2𝑦 2 𝑥 + 2𝑦 3 ) 2
= 2

(2𝑦 3 +2𝑥𝑦 2 +𝑥 3 −16𝑥)(2𝑦2 +𝑥 2 −16) 4𝑦 5 +2𝑥 2 𝑦 3 −32𝑦 3 +4𝑥𝑦 4 +2𝑥 3 𝑦 2 −32𝑥𝑦 2 +2𝑦 2 𝑥 3 +𝑥 5 −16𝑥 3 −32𝑦 2 𝑥−16𝑥 3 +256𝑥
=
2 2

𝑥5
= 2𝑦 5 + 𝑥 2 𝑦 3 − 16𝑦 3 + 2𝑥𝑦 4 + 𝑥 3 𝑦 2 − 16𝑥𝑦 2 + 𝑦 2 𝑥 3 + 2
− 8𝑥 3 − 16𝑦 2 𝑥 − 8𝑥 3 + 128𝑥

𝑥5
= 2𝑦 5 + 2𝑥𝑦 4 + 𝑦 3 (2𝑥 2 − 16) + 𝑦 2 (2𝑥 3 − 32𝑥) + ( 2 − 16𝑥 3 + 128𝑥)

2 2 𝑥5
∴ 𝑀 = ∫0 𝑑𝑥 ∫0 2𝑦 5 + 2𝑥𝑦 4 + 𝑦 3 (2𝑥 2 − 16) + 𝑦 2 (2𝑥 3 − 32𝑥) + ( − 16𝑥 3 + 128𝑥) 𝑑𝑦
2

2 𝑥5
Evaluating the definite integral ∫0 2𝑦 5 + 2𝑥𝑦 4 + 𝑦 3 (2𝑥 2 − 16) + 𝑦 2 (2𝑥 3 − 32𝑥) + ( 2 − 16𝑥 3 + 128𝑥) 𝑑𝑦:

2 16−𝑥 2 −2𝑦2
𝑥𝑧 2 2
𝑥5
∫ [ − 𝑦 3 𝑧] 𝑑𝑦 = ∫ 2𝑦 5 + 2𝑥𝑦 4 + 𝑦 3 (2𝑥 2 − 16) + 𝑦 2 (2𝑥 3 − 32𝑥) + ( − 16𝑥 3 + 128𝑥) 𝑑𝑦
0 2 0 0 2
2
𝑦6 2 𝑦4 𝑦3 𝑥5
= [ 3 + 5 𝑥𝑦 5 + 4
(2𝑥 2 − 16) + 3
(2𝑥 3 − 32𝑥) + ( 2 − 16𝑥 3 + 128𝑥)𝑦]
0

64 64 16 3 256
=[ + 𝑥 + 4𝑥 2 − 64 + 𝑥 − 𝑥 + 𝑥 5 − 32𝑥 3 + 256𝑥] − 0
3 5 3 3

128 2752 80
=− + 𝑥 + 4𝑥 2 − + 𝑥5
3 15 3𝑥 3
2 128 2752 80
∴ 𝑀 = ∫0 − 3
+ 15 𝑥 + 4𝑥 2 − 3𝑥 3 + 𝑥 5 𝑑𝑥

2 128 2752 80
Evaluating the final definite integral ∫0 − + 𝑥 + 4𝑥 2 − + 𝑥 5 𝑑𝑥:
3 15 3𝑥 3
2
2 128 2752 80 128 2752 2 80 𝑥6
∫0 − 3
+ 15 𝑥 + 4𝑥 2 − 3𝑥 3 + 𝑥 5 𝑑𝑥 = [− 3
𝑥 + 30
𝑥 − 12 𝑥 4 + 6 0
]

2
128 2752 2 80 4 𝑥6 2944
= [− 𝑥 + 𝑥 − 𝑥 + ] = = 196.26̇ ≈ 196.27 𝑢𝑛𝑖𝑡𝑠 𝑜𝑓 𝑚𝑎𝑠𝑠
3 30 12 6 0 15

2944
∴𝑀= = 196.26̇ ≈ 196.27 𝑢𝑛𝑖𝑡𝑠 𝑜𝑓 𝑚𝑎𝑠𝑠
15

Since we know that the units of integration for both the mass and the volume are S.I units then we can assume that
the unit for the volume is 𝑚3 and that mass to have the unit of 𝐾𝑔.The problem that arises is that if we pick volume
196.27
to be in 𝑚3 and the mass to be Kg is that the average density of the iceberg is roughly 48
≈ 4.1𝑘𝑔𝑚−3 which is
extremely small value. If we pick the mass to be in tonnes, then it means that strictly speaking it is not considered as
standard S.I unit and furthermore it will yield an average density of 4100𝑘𝑔𝑚−3 which is much higher tan than of
water which does not make sense. Lastly if we choose the units of volume to be cubic centimetres then this means
that this ice cube is extremely small to be even properly observed by a satellite. Therefore, for the interests of this
paper we will consider the units of volume to be cubic meters and the units of mass to be in kilograms.

Hence the volume of the iceberg is 48 𝑚3 and its mass is 196.27 𝑘𝑔

Question 1 part (b):

In order to develop a model to find the proportion of the iceberg that is submerged in the water we need to consider
Archimedes principle. We know that the buoyancy force excreted on the iceberg is equal to the weight of the
volume of water it displaces and since the iceberg floats in water then the buoyance force exerted on the iceberg
must equal the weight of the whole iceberg. This can formally be written as;𝐹𝑏𝑢𝑜𝑦𝑎𝑛𝑦 = 𝑊𝑖𝑐𝑒𝑏𝑒𝑟𝑔 . We know that the
buoyancy force according to Archimedes principles is the product of the density of the water, the volume of the
waster displaced by the iceberg and the gravitational constant.

Therefore
𝑐 𝑐
𝑉𝑤𝑎𝑡𝑒𝑟 ∗ 𝜌𝑤𝑎𝑡𝑒𝑟 ∗ 𝑔 = 𝑔𝑀𝑖𝑐𝑒𝑏𝑒𝑟𝑔 = 𝑔 ∫𝑚 𝑑𝑚 = 𝑔 ∫𝑉 𝜌𝑖𝑐𝑒 𝑑𝑣

Furthermore, the volume of water that the iceberg displaces must equal the volume of iceberg that is submerged
therefore:
𝑐 𝑐
𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 ∗ 𝜌𝑤𝑎𝑡𝑒𝑟 ∗ 𝑔 = 𝑔𝑀𝑖𝑐𝑒𝑏𝑒𝑟𝑔 = 𝑔 ∫𝑚 𝑑𝑚 = 𝑔 ∫𝑉 𝜌𝑖𝑐𝑒 𝑑𝑣

Thus:
𝑐
𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 ∗ 𝜌𝑤𝑎𝑡𝑒𝑟 = ∫𝑉 𝜌𝑖𝑐𝑒 𝑑𝑣
𝑐
∫𝑉 𝜌𝑖𝑐𝑒 𝑑𝑣
𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 =
𝜌𝑤𝑎𝑡𝑒𝑟

Thus, the proportion of the iceberg that is submerged is:


𝑐
∫𝑉 𝜌𝑖𝑐𝑒 𝑑𝑣 𝑐
𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 𝜌𝑤𝑎𝑡𝑒𝑟 ∫𝑉 𝜌𝑖𝑐𝑒 𝑑𝑣 1 𝑀𝑖𝑐𝑒𝑏𝑒𝑟𝑔 1
𝑓𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 = = 𝑐 = 𝑐 ∗ = ∗
𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔 ∫𝑉 𝑑𝑣 ∫𝑉 𝑑𝑣 𝜌𝑤𝑎𝑡𝑒𝑟 𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔 𝜌𝑤𝑎𝑡𝑒𝑟

𝑀𝑖𝑐𝑒𝑏𝑒𝑟𝑔
We must emphasize that the fraction 𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔
explicitly defines the average density of the iceberg throughout its
whole volume. This is because according to our methodology we arrive at said fraction where we divide the mass of
the iceberg by its volume giving us a single value for its density. Knowing that the density of the iceberg has a
different value at different points within its volume the above division gives an average value for the density of the
iceberg (𝜌̅𝑖𝑐𝑒 ).

Therefore, the proportion of ice that is submerged in the water is given by the following fraction.
̅ 𝑖𝑐𝑒
𝜌
∴ 𝑓𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 =
𝜌𝑤𝑎𝑡𝑒𝑟

We can modify our model so that we can find the height of the iceberg that is submerged. In order to this we must
make one assumption that the shape of the iceberg that is submerged is a cuboid.

We use the proportion of the iceberg that is submerged to find the proportion of the iceberg that is not submerged:
̅ 𝑖𝑐𝑒
𝜌 𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔 −𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑
1 − 𝑓𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 = 1 − 𝜌 = 𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔
𝑤𝑎𝑡𝑒𝑟

And thus
̅ 𝑖𝑐𝑒
𝜌
𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔 − 𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 = (1 − 𝜌 )𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔
𝑤𝑎𝑡𝑒𝑟

The result of 𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔 − 𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 can be found by evaluating the integral of the volume as we did in part a of
this question where this time, we can set the lower limit of integration of 𝑧 to an arbitrary point 𝑧𝑖 . Essentially, we
impose the condition that the volume of the iceberg not submerged in water starts for a height z that is not zero and
thus that volume is calculated not from the bottom of the iceberg but from an arbitrary height 𝑧𝑖 and above.
Additionally, the reason that we assume that the shape of the iceberg that is submerged is a perfect cuboid is that
previously when we calculated its volume, we set the lower limit of integration to be z=0. Since we do not have a
unique function that describes the geometry of the bottom part of the iceberg and given that the x and y form a
square plane then the integral of the volume from the bottom until the height z=4 as described before will be
considered to be a cuboid. Lastly, we know that the total volume of the iceberg is 48 𝑚3.

Hence:
̅ 𝑖𝑐𝑒
𝜌
𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔 − 𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 = 48(1 − 𝜌 )
𝑤𝑎𝑡𝑒𝑟

Where:
2 2 16−𝑥 2 −2𝑦 2
𝑉𝑖𝑐𝑒𝑏𝑒𝑟𝑔 − 𝑉𝑖𝑐𝑒 𝑠𝑢𝑏𝑚𝑒𝑟𝑔𝑒𝑑 = ∫0 𝑑𝑥 ∫0 𝑑𝑦 ∫𝑧 𝑑𝑧 = 48 − 4𝑧𝑖
𝑖

Thus:
̅ 𝑖𝑐𝑒
𝜌
48 − 4𝑧𝑖 = 48(1 − 𝜌 )
𝑤𝑎𝑡𝑒𝑟

Therefore:
̅ 𝑖𝑐𝑒
𝜌 ̅ 𝑖𝑐𝑒
𝜌 ̅ 𝑖𝑐𝑒
𝜌
4𝑧𝑖 = 48 − 48 (1 − ) = 48 (1 − 1 + ) = 48
𝜌𝑤𝑎𝑡𝑒𝑟 𝜌𝑤𝑎𝑡𝑒𝑟 𝜌𝑤𝑎𝑡𝑒𝑟

Thus:
̅ 𝑖𝑐𝑒
𝜌
∴ 𝑧𝑖 = 12 𝜌
𝑤𝑎𝑡𝑒𝑟

Using the above model, we can find the height of the iceberg that is submerged.

Question 2 part (a):

We are given that the position of the iceberg 𝑟(𝑡) = 𝑥 𝒊 + 𝑦 𝒋 = (3𝑡 3 + 4𝑡)𝒊 + (𝑡 2 + 2𝑡 3 ) 𝒋

We can use the above equation to find how the total displacement, velocity components of the iceberg, the
magnitude of the velocity, the acceleration components of the iceberg and the total acceleration vary with time.

Since 𝑟(𝑡) = 𝑥 𝒊 + 𝑦 𝒋 = (3𝑡 3 + 4𝑡)𝒊 + (𝑡 2 + 2𝑡 3 ) 𝒋 then:

Displacement is:‖𝑟(𝑡)‖ = √𝑥 2 + 𝑦 2 = √(3𝑡 3 + 4𝑡)2 + (𝑡 2 + 2𝑡 3 )2 = √13𝑡 6 + 4𝑡 5 + 25𝑡 4 + 16𝑡 2


𝑑𝑟(𝑡)
Velocity components are:𝑣(𝑡) = = 𝑣𝑥 𝒊 + 𝑣𝑦 𝒋 = (9𝑡 2 + 4)𝒊 + (2𝑡 + 6𝑡 2 )𝒋
𝑑𝑡

Magnitude of velocity is:‖𝑣(𝑡)‖ = √𝑣𝑥2 + 𝑣𝑦2 = √(9𝑡 2 + 4)2 + (2𝑡 + 6𝑡 2 )2 = √114𝑡 4 + 76𝑡 2 + 24𝑡 3 + 16

𝑑 2 𝑟(𝑡) 𝑑𝑣(𝑡)
Acceleration components are:𝑎(𝑡) = 𝑑𝑡 2
= 𝑑𝑡
= 𝑎𝑥 𝒊 + 𝑎𝑦 𝒋 = (18𝑡)𝒊 + (2 + 12𝑡)𝒋

Magnitude of acceleration is: ‖𝑎(𝑡)‖ = √𝑎𝑥2 + 𝑎𝑦2 = √(18𝑡)2 + (2 + 12𝑡)2 = √468𝑡 2 + 24𝑡 + 4

We can use the above results to plot multiple graphs using MATLAB and characterize the motion of the iceberg.

Firstly, we can plot a graph of the vertical component of displacement (y) against the horizontal component of
displacement (x) for the same range of time. This graph will show us the direction that the iceberg moves and thus at
any point in time we will be able to track the position of the iceberg and find its displacement in each direction.
Secondly, we can plot the total displacement of the iceberg ‖𝑟(𝑡)‖ against time to understand how the
displacement of the iceberg varies against time. This will allow us to understand at any point in time how far the
iceberg is with respect to us.

Thirdly we can plot the vertical (𝑣𝑦 ) and horizontal (𝑣𝑥 ) components of velocity against time. This will allow to find
visualize the values of the two components of velocity at any time. Additionally on this graph we can also plot the
magnitude of velocity ‖𝑣(𝑡)‖ against time. This will allow us to understand at any point what is the total velocity of
the iceberg.

Lastly, we can plot the vertical (𝑎𝑦 ) and horizontal (𝑎𝑥 ) components of acceleration against time. This will allow us
to find the values of these components at any point in time and thus understand the direction at which the iceberg
will accelerate towards. Finally on the same graph we can also plot the magnitude of acceleration ‖𝑎(𝑡)‖ against
time. This will allow us to understand at any point what is the total acceleration of the iceberg.

All of the figures that are described above will be shown below and the MATLAB code used to produce these figures
will be annexed in appendix [2A].

(b)
(a)
Figure 2: Depicting how the vertical and horizontal components of velocity vary with each other across time. Figure 2(a) only shows
the variation of the two components with respect to each other across time while figure 2(b) shows at which time point the said
components of displacement are obtained.

We must specify that figure 2 shows two graphs. Figure 2 a is the top view of figure 2b in the sense that figure 2b
tracks the position of the iceberg and represents both its horizontal and vertical displacement while also specifying
at which day those components of displacement are obtained. Figure 2 a is only showing the x, y plane of this 3D
graph thus only shows how the vertical displacement varies with the horizontal displacement across time without
any reference to the time point that those displacement were obtained.

Figure 3 Shows how the total displacement varies with time for a
period of 25days
Figure 4. Shows how the magnitude of velocity and its individual
components vary with time for a period of 25days Figure 5. Shows how the magnitude of acceleration and its
individual components vary with time for a period of 25days

It is evident from the above figures that the displacement of the iceberg in the horizontal direction is greater than
the displacement in the vertical direction. This can be seen from figure 2 where the horizontal component at any
point on the graph is greater than the vertical. Furthermore, in figure 4 and 5 it is evident that both the horizontal
components of velocity and acceleration are greater than the vertical components of velocity and acceleration
indicating that the displacement of the iceberg in the horizontal direction will be greater than the displacement of
the iceberg in the vertical direction.

Question 2 part (b):

We know that work done by the current force moving the iceberg from point A to point B is:
𝐵 𝐵
𝑊 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑥 𝑑𝑥 + 𝐹𝑦 𝑑𝑦

We know that the current force on the iceberg must be the product of the acceleration of the iceberg and its mass.
As mentioned above we can differentiate 𝑟(𝑡) with respect to time twice to get an expression for the acceleration
vector of the iceberg.
𝑑 2 𝑟(𝑡)
𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 ∗ 𝑎𝑖𝑐𝑒𝑏𝑒𝑟𝑔 = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 ∗ 𝑑𝑡 2
= 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 ∗ (𝑎𝑥 𝒊 + 𝑎𝑦 𝒋) = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 [(18𝑡)𝒊 + (2 + 12𝑡)𝒋]

We know that at t=0 the iceberg is in its initial position i.e., at point A and that at t=25 it is in its final position i.e., at
point B. This implies that since the current force and the limits of integration that we can use are in terms of time
then we must find an expression for 𝑑𝑥 𝑎𝑛𝑑 𝑑𝑦 in terms of 𝑑𝑡 so that we can compute the work done by the current
force between the point A at t=0 and point B at t=25.

we can use the initial equation 𝑟(𝑡) to find an expression for the 𝑑𝑥 𝑎𝑛𝑑 𝑑𝑦.

𝑟(𝑡) = 𝑥 𝒊 + 𝑦 𝒋 = (3𝑡 3 + 4𝑡)𝒊 + (𝑡 2 + 2𝑡 3 ) 𝒋


Thus:
𝑑𝑥
𝑑𝑡
= 9𝑡 2 + 4 → 𝑑𝑥 = 9𝑡 2 + 4 𝑑𝑡
𝑑𝑦
𝑑𝑡
= 2𝑡 + 6𝑡 2 → 𝑑𝑦 = 2𝑡 + 6𝑡 2 𝑑𝑡
Therefore:
𝑡=25 𝑡=25
𝑊 = ∫𝑡=0 𝐹𝑥 𝑑𝑥 + 𝐹𝑦 𝑑𝑦 = 𝑚𝑖𝑐𝑒 ∫𝑡=0 𝑎𝑥 𝑑𝑥 + 𝑎𝑦 𝑑𝑦
𝑡=25
𝑊 = 𝑚𝑖𝑐𝑒 ∫𝑡=0 18𝑡 𝑑𝑥 + (2 + 12𝑡)𝑑𝑦

Since 𝑑𝑦 = 2𝑡 + 6𝑡 2 𝑑𝑡 and 𝑑𝑥 = 9𝑡 2 + 4 𝑑𝑡 then:


𝑡=25 𝑡=25
𝑊 = 𝑚𝑖𝑐𝑒 ∫𝑡=0 18𝑡 𝑑𝑥 + (2 + 12𝑡)𝑑𝑦 = 𝑚𝑖𝑐𝑒 ∫𝑡=0 18𝑡 (2𝑡 + 6𝑡 2 )𝑑𝑡 + (2 + 12𝑡)(9𝑡 2 + 4) 𝑑𝑡
𝑡=25 𝑡=25
𝑊 = 𝑚𝑖𝑐𝑒 ∫𝑡=0 162𝑡 3 + 72𝑡 + 4𝑡 + 12𝑡 2 + 24𝑡 2 + 72𝑡 3 𝑑𝑡 = 𝑚𝑖𝑐𝑒 ∫𝑡=0 234𝑡 3 + 36𝑡 2 + 176𝑡 𝑑𝑡

234 4 25 46125625 46125625


𝑊 = 𝑚𝑖𝑐𝑒 [ 4
𝑡 + 12𝑡 3 + 38𝑡 2 ] = 𝑚𝑖𝑐𝑒 [ 2
− 0] = 2
𝑚𝑖𝑐𝑒
0
46125625
∴𝑊= 2
𝑚𝑖𝑐𝑒 ≈ 23.063 ∗ 106 ∗ 𝑚𝑖𝑐𝑒

∴ 𝑊 ≈ 23.063 ∗ 106 ∗ 196.27 ≈ 4.53 ∗ 109 𝐽 ≈ 4.53 𝐺𝐽


Therefore, approximately the work done by the current force in moving the iceberg from point A to point B is
4.53 𝐺𝐽 .

Question 2 part (c):

We know that 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 ∗ 𝑎𝑖𝑐𝑒𝑏𝑒𝑟𝑔 = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 ∗ (𝑎𝑥 𝒊 + 𝑎𝑦 𝒋) = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 [(18𝑡)𝒊 + (2 + 12𝑡)𝒋] where:

𝐹𝑥 = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 18𝑡 𝑎𝑛𝑑 𝐹𝑦 = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 (2 + 12𝑡) .

Let 𝑃 = 𝐹𝑥 = 𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 18𝑡 𝑎𝑛𝑑 𝑄 = 𝐹𝑦 = (2 + 12𝑡)

From the previous part of the question, we found that,𝑑𝑥 = 9𝑡 2 + 4 𝑑𝑡 and 𝑑𝑦 = 2𝑡 + 6𝑡 2 𝑑𝑡 .

By rearranging the expressions for 𝑑𝑥 𝑎𝑛𝑑 𝑑𝑦 we can find that:


𝑑𝑡 1 𝑑𝑡 1
𝑑𝑥
= 9𝑡 2 +4 𝑎𝑛𝑑 𝑑𝑦
= 2𝑡+6𝑡 2

To check if the force is conservative i.e. if the work done by the current force in moving the iceberg is independent of
the path that the iceberg takes, we can use the following test:
𝜕𝑃 𝜕𝑄 𝜕𝑃 𝜕𝑄
If 𝜕𝑦
= 𝜕𝑥
then the force is conservative and thus if 𝜕𝑦 ≠ 𝜕𝑥
then the force is not conservative.

Therefore:
𝜕𝑃 𝜕𝐹𝑥 𝜕𝑡 𝜕(18𝑡∗𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 ) 1 18∗𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 9∗𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔
= ∗ = ∗ = =
𝜕𝑦 𝜕𝑡 𝜕𝑦 𝜕𝑡 2𝑡+6𝑡 2 2𝑡+6𝑡 2 𝑡(1+3)

𝜕𝑄 𝜕𝐹𝑦 𝑑𝑡 𝜕(𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 (2+12𝑡)) 1 12∗𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔


𝜕𝑥
= 𝜕𝑡
∗ 𝑑𝑥 = 𝜕𝑡
∗ 9𝑡 2 +4 = 9𝑡 2 +4

Thus:
𝜕𝑃 9∗𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔 𝜕𝑄 12∗𝑚𝑖𝑐𝑒𝑏𝑒𝑟𝑔
𝜕𝑦
= 𝑡(1+3)
≠ 𝜕𝑥
= 9𝑡 2 +4

𝜕𝑃 𝜕𝑄
Since 𝜕𝑦 ≠ 𝜕𝑥
then the force is not conservative which means that the work done on the iceberg by the current force
is dependent on the path that the iceberg takes.
Question 3 part (a):

As discussed previously the work done by the current force on the iceberg when the iceberg moves from point A to
𝐵 𝐵
point B is 𝑊 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑥 𝑑𝑥 + 𝐹𝑦 𝑑𝑦. In this case 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 = 𝐶(𝑥 2 𝒊 − 𝑥𝑦 𝒋 )

In this case the iceberg moves counterclockwise along a quarter circle with equation 𝑥 2 + 𝑦 2 = 1 from point A (1,0)
to point B(0,1).

Using cylindrical coordinate system:

𝑥2 + 𝑦2 = 𝑟2

Since 𝑥 2 + 𝑦 2 = 1 𝑡ℎ𝑒𝑛 𝑟 2 = 1 ℎ𝑒𝑛𝑐𝑒 𝑟 = 1

𝑥 = rcos 𝜃 = cos 𝜃
𝑦 = rsin 𝜃 = sin 𝜃
𝑑𝑥 = − sin 𝜃 𝑑𝜃
𝑑𝑦 = cos 𝜃 𝑑𝜃
At point A 𝑥 = 1 ℎ𝑒𝑛𝑐𝑒 cos 𝜃 = 1 𝑡ℎ𝑢𝑠 𝜃 = 0
𝜋
At point B 𝑥 = 0 ℎ𝑒𝑛𝑐𝑒 cos 𝜃 = 0 𝑡ℎ𝑢𝑠 𝜃 =
2
𝐵 𝐵 𝐵 𝐵
∴ 𝑊 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑥 𝑑𝑥 + 𝐹𝑦 𝑑𝑦 = 𝐶 ∫𝐴 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦 = 𝐶 ∫𝐴 cos2 𝜃 𝑑𝑥 − cos 𝜃 sin 𝜃 𝑑𝑦
𝜋 𝜋
𝜃= 𝜃=
𝑊 = 𝐶 ∫𝜃=02 − sin 𝜃 cos2 𝜃 𝑑𝜃 − cos 𝜃 sin 𝜃 cos 𝜃 𝑑𝜃 = 𝐶 ∫𝜃=02 − 2sin 𝜃 cos 2 𝜃 𝑑𝜃
𝑑𝑢
Using the substitution of 𝑢 = cos 𝜃 → 𝑑𝑢 = − sin 𝜃 𝑑𝜃 → 𝑑𝜃 =
− sin 𝜃

Then
𝜋 𝜋 𝜋
𝜃=
𝜃=
2 2 𝑑𝑢 𝜃=
2 2 2𝑢3 2
𝑊 = 𝐶 ∫𝜃=0 − 2sin 𝜃 𝑢 − sin 𝜃
= 𝐶 ∫𝜃=0 2𝑢 = 𝐶[ 3 ]
𝜃=0
𝜋
Since 𝑢 = cos 𝜃 𝑎𝑡 𝜃 = 0 → 𝑢 = 1 𝑎𝑛𝑑 𝑎𝑡 𝜃 = 2 → 𝑢 = 0

𝜋
𝜃= 𝑢=𝑜
2𝑢3 2 2𝑢3 2
∴𝑊= 𝐶[ 3 ] =𝐶[ ]
3 𝑢=1
= −3𝐶
𝜃=0

Now we can calculate the work done by the current force on the iceberg if it moves in a straight line from point A
(1,0) to point B(0,1).

Firstly, we must find a relation between y and x that shows us the straight-line path that the iceberg moves towards.

Since we are told it’s a straight line let:

𝑦 = 𝑚𝑥 + 𝑐
At point B 𝑥 = 0 𝑎𝑛𝑑 𝑦 = 1 → 1 = 0𝑚 + 𝑐 → 𝑐 = 1
At point A 𝑥 = 1 𝑎𝑛𝑑 𝑦 = 0 → 0 = 1𝑚 + 1 → 𝑚 = −1

∴ 𝑦 = −𝑥 + 1
Hence:

𝑑𝑦 = −𝑑𝑥
𝐵 𝐵 0 0
∴ 𝑊 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑥 𝑑𝑥 + 𝐹𝑦 𝑑𝑦 = 𝐶 ∫1 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦 = 𝐶 ∫1 𝑥 2 𝑑𝑥 − 𝑥(−𝑥 + 1) ∗ −𝑑𝑥
𝑥=0
0 0 𝑥2 1
∴ 𝑊 = 𝐶 ∫1 𝑥 2 𝑑𝑥 − 𝑥(−𝑥 + 1) ∗ −𝑑𝑥 = 𝐶 ∫1 𝑥 𝑑𝑥 = 𝐶 [ 2 ] = −2𝐶
𝑥=1

Therefore, the work done by the current force on the iceberg if it moves counterclockwise along a quarter circle with
2
equation 𝑥 2 + 𝑦 2 = 1 from point A (1,0) to point B(0,1) is − 3 𝐶 and if it moves through the same points along a
1
straight line 𝑦 = −𝑥 + 1 the work done is − 2 𝐶 .

Question 3 part (b):

The negative sign from the results above signifies that the current force has a component opposite to the direction
of displacement of the iceberg. This means that the negative signs indicate the fact that the current force is doing
work against the motion of the iceberg, thus removing and dissipating energy from the iceberg as the current force
opposes its motion i.e., the iceberg moves against the current. This means that if the iceberg moves in an
anticlockwise direction between points A and B the current force will remove more energy from the iceberg as
opposed to the iceberg moving in a straight line between the same points. This can be seen by the energy dissipated
2
in the counterclockwise path being 3 𝐶 𝐽 which is greater than the energy dissipated in the straight path which is
1
𝐶 𝐽. This implies that in the counterclockwise path, the iceberg moves partially in the direction where the
2
component of the current that opposes its motion becomes greater or the iceberg moves a greater distance in its
path where the current force opposes its motion as opposed to it travelling in a straight line. Essentially when towing
the iceberg, we must always aim to either minimize the distance in which the path that we take opposes the current
force or maximize the distance in which the direction of the path that we take is aligned with the direction of the
current force. We can plot the components of the current force along with the different paths that we can take and
visually represent the different paths that could be taken to tow the iceberg on a vector plot. The following figure
has been produced in MATLAB and the code used will be annexed in appendix [3B].

Figure 6. Representing the vector field of the current force and


the different paths that we can take to tow the iceberg

Figure 6 shows the vector field of the current force at different x and y positions along with 3 different paths (an
anticlockwise, a clockwise and a straight-line path) between points A and B. Figure 6 can be used to visually interpret
the results obtain in part a. As can be seen, in the anticlockwise path the magnitude of the current force is greater on
average and the direction of the current force at some points directly opposes the direction of the path. This can be
contrasted with the straight-line path where the magnitude of the current force is lower than in the anticlockwise
path on average, so even if at some points the current force directly opposes the direction of the path, the energy
that will be dissipated will be less. This is verified by the analytical solutions to the two paths. Furthermore, in the
clockwise path we can see that the magnitude of the current force on average is much lower than the other two
paths and this could mean that at that path the current force does less work against the motion of the iceberg. To
further prove the point that we have to minimize the distance in which the path that we take opposes the current
force, we can consider the following example.

We can determine the work done by the current force when the iceberg is towed along path X from point A (1,0) to
point B (0,1) through an intermediate point D (1,1) and compare it to the work done along path Y from point A to
point B through an intermediate point E (0,0).

We can represent path X and path Y on a figure similar to figure 6. (The MATLAB code used to produce figure 7 will
be annexed in appendix [3B1];

Figure 7 Representing the vector field of the current force and path X and Y

Work done in path X from A to B through C is:


𝐵 𝐷 𝐵
𝑊 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 + ∫𝐷 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠

Evaluating the first integral:


𝐶 𝐷
∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = 𝐶 ∫𝐴 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦

Since point A is at position x=1, y=0 and point D is at position x=1, y=1 then 𝑑𝑥 = 0 , 𝑥 = 1 𝑎𝑛𝑑 0 < 𝑦 < 1

Therefore:
1
𝐷 1 𝑦2 1
𝐶 ∫𝐴 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦 = 𝐶 ∫0 −𝑦 𝑑𝑦 = [− 2
𝐶] = −2𝐶
0

Evaluating the second integral:


𝐵 𝐵
∫𝐷 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = 𝐶 ∫𝐷 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦

Since point D is at position x=1, y=1 and point B is at position x=0, y=1 then 𝑑𝑦 = 1 , 𝑦 = 1 𝑎𝑛𝑑 1 < 𝑥 < 0

Therefore:
0
𝐵 0 𝑥3 1
𝐶 ∫𝐷 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦 = 𝐶 ∫1 𝑥 2 𝑑𝑥 = [ 3 𝐶] = − 3 𝐶
1
𝐵 𝐷 𝐵 1 1 5
∴ 𝑊𝑝𝑎𝑡ℎ 𝑥 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 + ∫𝐷 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = − 2 𝐶 − 3 𝐶 = − 6 𝐶
Work done in path Y from A to B through E is:
𝐵 𝐸 𝐵
𝑊 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 + ∫𝐸 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠

Evaluating the first integral:


𝐸 𝐸
∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = 𝐶 ∫𝐴 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦

Since point E is at position x=0, y=0 and point A is at position x=1, y=0 then 𝑑𝑦 = 0 , 𝑦 = 0 𝑎𝑛𝑑 1 < 𝑥 < 0

Therefore:
0
0 𝑥3 1
𝐶 ∫1 𝑥 2 𝑑𝑥 = [ 3 𝐶] = − 3 𝐶
1

Evaluating the second integral:


𝐵 𝐵
∫𝐸 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = 𝐶 ∫𝐸 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦

Since point E is at position x=0, y=0 and point B is at position x=0, y=1 then 𝑑𝑥 = 0 , 𝑥 = 0 𝑎𝑛𝑑 0 < 𝑦 < 1
𝐵 1
𝐶 ∫𝐸 𝑥 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦 = 𝐶 ∫0 0 = 0
𝐵 𝐸 𝐵 1 1
𝑊𝑝𝑎𝑡ℎ 𝑌 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = ∫𝐴 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 + ∫𝐸 𝐹𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑠 = − 3 𝐶 + 0 = − 3 𝐶

Thus, in path Y the current force dissipates less energy than in path X when towing the iceberg thus it requires less
energy to two the iceberg through path Y rather through path X making it a more efficient path. When observing
figure 7 the result of the two paths can be visually predicted since when moving from point E to point B it seems that
there is not a current force present, thus no work is done against the path of the iceberg.

Thus, when towing the iceberg, it will be best to visualize the vector field of the current force and plan to tow the
iceberg through the path that minimizes the distance in which the current force opposes the direction of towing.

Question 4 part (a):

We know that the 𝑇(𝑥, 𝑦) = 𝑥𝑒 𝑦 therefore the gradient of T is:


𝜕 𝜕 𝜕𝑥𝑒 𝑦 𝜕𝑥𝑒 𝑦
∇𝑇 = (𝜕𝑥 𝒊 , 𝜕𝑦 𝒋) 𝑥𝑒 𝑦 = 𝜕𝑥
𝒊 + 𝜕𝑦
𝒋 = 𝑒 𝑦 𝒊 + 𝑥𝑒 𝑦 𝒋

The figures of the contour plot of the temperature function and the vector plots of the gradient function are shown
below. (The MATLAB code used to produce these figures will be annexed in appendix [Q4A]).

Figure 8. Showing the vector field of the gradient of T where the


Figure 9. Graph showing the contour plot for the function T gradient vectors are illustrated by arrows.
Figure 10.. Showing the contour of the function T along with the Figure 11. Showing a 3D mesh plot of the temperature function along
gradient vector field with the vector field

Figure 9 represents the contour plot of the temperature function. The contour plot indicates the temperature at
each point within the domain of x and y as a relative scale of colours (colour-band). The scale has been shown at the
right side of the contour plot indicate which range of temperatures correspond to which colour band. For example,
at point x=0 y=0 the temperature is 𝑇(0,0) = 0𝑒 0 = 0𝑜 𝐶 and according to the scale tis corresponds to a deep
purple colour. Furthermore, at point x=2, y=2 the temperature is 𝑇(2,2) = 2𝑒 2 ≈ 14.8𝑜 𝐶 and according to the
scale tis corresponds to a yellow colour. Thus, as the wavelength of the colours decrease in the contour plot the
temperature increases.

Figure 8 represents the vector plot of the gradient of T. We must note that the gradient operator results in a vector.
When these vectors are plotted in the gradient vector field they point towards the direction of steepest ascent of the
function. This means that in this case when we plot the vector field of the gradient at point x and y, the resulting
gradient vector at those points will be pointing towards the direction that results in the maximum increase of the
function T (i.e., in the direction of maximum rise in the temperature). Thus, the direction of each gradient vectors
points towards the direction of maximum temperature increase and the magnitude of each gradient vector at a
certain point shows the rate of temperature increase towards said direction.

Thus, in order to show the direction in which the temperature increases the fastest at point (2,0) we must the
direction of the gradient vector at that point. This is shown in the figure below:

Figure 12. Showing the vector field of the gradient of T along with the
contour plot concentrated around point (2,0).
Question 4 part (b):

The directional derivative is defined as:

𝐷𝑢 = ∇𝑇. 𝑢 = ‖∇𝑇‖‖𝑢‖ cos 𝜃

To maximize the directional derivative at any point, the unit vector must be collinear and thus point in the same
direction as ∇𝑇 . This means that 𝜃 = 0 hence cos 𝜃 = 1. Since 𝑢 is a unit vector then ‖𝑢‖ = 1. Thus, if the unit
vector points in the same direction as ∇𝑇, 𝐷𝑢 is maximized because 𝐷𝑢 = ∇𝑇. 𝑢 = ‖∇𝑇‖‖𝑢‖ cos 𝜃 = ‖∇𝑇‖ ∗ 1 ∗ 1 =
‖∇𝑇‖

Therefore, if the unit vector 𝑢 is to be collinear with ∇𝑇 then it must be the unit vector of ∇𝑇.
∇𝑇 (𝑒 𝑦 𝒊+𝑥𝑒 𝑦 𝒋 )
∴𝑢= =
‖∇𝑇‖ √𝑒 2𝑦 +𝑥 2 𝑒 2𝑦

At point (2,0) 𝑢 becomes:


∇𝑇 (𝑒 𝑦 𝒊+𝑥𝑒 𝑦 𝒋 ) 1 𝒊+2𝒋 √5 2√5
𝑢= = = = 𝒊+ 𝒋
‖∇𝑇‖ √𝑒 2𝑦 +𝑥 2 𝑒 2𝑦 √5 5 5

Verifying that the magnitude of the unit vector is 1


2 2
∇𝑇 √5 2√5 5 20
‖𝑢‖ = ‖‖∇𝑇‖‖ = √( 5 ) + ( 5
) = √
25
+
25
= √1 = 1

Thus 𝐷𝑢 𝑚𝑎𝑥 𝑎𝑡 𝑝𝑜𝑖𝑛𝑡 (2,0) is :

𝐷𝑢 𝑚𝑎𝑥 = ∇𝑇. 𝑢 = ‖∇𝑇‖‖𝑢‖ cos 𝜃 = ‖∇𝑇‖ = √𝑒 0 + 22 𝑒 0 = √5

Direction of fastest increase with respect to horizontal axis:


2√5

𝜃 = atan 5
√5
= atan 2 ≈ 63.435𝑜
5

Therefore, at the point (2,0) the maximum increase of temperature occurs in the direction of 63.435𝑜 with respect
𝑜
to the horizontal with at a rate of √5 𝐶𝑚−1 .
Question 5 part (a):
1 −𝑥
The probability density function of an iceberg having length x is:𝑓1 (𝑥) = 𝑒 10
10
𝑦
1
The probability density function of an iceberg having width y is:𝑓2 (𝑦) = 5 𝑒 −5

We can define a new function 𝐹(𝑥, 𝑦) that gives the probability density function of an iceberg having length x and
width y.
1 −𝑥 1 𝑦
1 −(2𝑦+𝑥)
𝐹(𝑥, 𝑦) = 𝑓1 (𝑥)𝑓2 (𝑦) = 𝑒 10 ∗ 𝑒 −5 = 𝑒 10
10 5 50

Now we must find the probability of an iceberg having a perimeter of 40m or less.

We know that the perimeter of this iceberg is 𝑃𝑒𝑟𝑖𝑚𝑒𝑡𝑒𝑟 = 2𝑥 + 2𝑦

Thus, if the perimeter is to be less than 40 then:

2𝑥 + 2𝑦 < 40 → 𝑥 + 𝑦 < 20
Since we defined the probability density function 𝐹(𝑥, 𝑦) we can use integration to get the probability of the
perimeter of the iceberg being less than 40. Therefore:

𝑐
Now we must determine the limits of integration. Since we chose to integrate 𝐹(𝑥, 𝑦) with respect to 𝑑𝑥 first and
then with 𝑑𝑦 it means that:

Since 𝑥 + 𝑦 < 20 then 𝑥 < 20 − 𝑦. The lower limit of 𝑥 must be 0m because we can not have an iceberg with
negative length.

Thus, 0 < 𝑥 < 20 − 𝑦.

To find the limits of integration for y knowing that the integral with respect 𝑑𝑥 will be computed first requires us to
set x=0 and find the limits of y.

Since 𝑥 + 𝑦 < 20 𝑎𝑛𝑑 𝑥 = 0 𝑡ℎ𝑒𝑛 𝑦 < 20. Once again y must be grater than 0 hence, 0 < 𝑦 < 20.
20 20−𝑦 20 20−𝑦 1 −(2𝑦+𝑥)
Therefore, 𝑃(𝑝𝑒𝑟𝑖𝑚𝑒𝑡𝑒𝑟𝑒 < 40) = ∬ 𝐹(𝑥, 𝑦)𝑑𝑥𝑑𝑦 = ∫0 𝑑𝑦 ∫0 𝐹(𝑥, 𝑦)𝑑𝑥 = ∫0 𝑑𝑦 ∫0 50
𝑒 10 𝑑𝑥

20−𝑦 1 −2𝑦+𝑥
Evaluating the first integral ∫0 50
𝑒 10 𝑑𝑥 .
20−𝑦 20−𝑦
20−𝑦 1 −(2𝑦+𝑥) 20−𝑦 1 −(2𝑦) − 𝑥 1 2𝑦 𝑥
1 2𝑦 𝑥
∫0 50
𝑒 10 𝑑𝑥 = ∫0 50
𝑒 10 𝑒 10 𝑑𝑥 = [−10 ∗ 50 𝑒 −(10 ) 𝑒 −10 ] = − 5 𝑒 −(10 ) [𝑒 −10 ]
0 0
20−𝑦
1 −(2𝑦) 𝑥
1 −(2𝑦) −20+𝑦
1 −20−𝑦 1 −(2𝑦) 1 𝑦 𝑦
−5𝑒 10 [𝑒 −10 ] = −5𝑒 10 [𝑒 10 − 1] = − 5 𝑒 10 + 5𝑒 10 = 5 [𝑒 −5 − 𝑒 −2 𝑒 −10 ]
0

20 20−𝑦 1 −(2𝑦+𝑥) 20 1 𝑦 𝑦
Therefore, 𝑃(𝑝𝑒𝑟𝑖𝑚𝑒𝑡𝑒𝑟𝑒 < 40) = ∫0 𝑑𝑦 ∫0 50
𝑒 10 𝑑𝑥 = ∫0 5
[𝑒 −5 − 𝑒 −2 𝑒 −10 ] 𝑑𝑦.

Evaluating the above integral:


𝑦 𝑦 𝑦 𝑦 𝑦 𝑦 20 𝑦 𝑦 20
20 1 1 20 1
∫0 5
[𝑒 −5 − 𝑒 −2 𝑒 −10 ] 𝑑𝑦 = 5 ∫0 𝑒 −5 − 𝑒 −2 𝑒 −10 𝑑𝑦 = 5 [−5𝑒 −5 + 10𝑒 −2 𝑒 −10 ] = [2𝑒 −2 𝑒 −10 − 𝑒 −5 +]
0 0

𝑦 𝑦 20
[2𝑒 −2 𝑒 −10 − 𝑒 −5 +] = (2𝑒 −2 𝑒 −2 − 𝑒 −4 ) − (2𝑒 −2 𝑒 0 − 𝑒 0 ) = 𝑒 0 + 𝑒 −4 − 2𝑒 −2 ≈ 0.74765
0

∴ 𝑃(𝑝𝑒𝑟𝑖𝑚𝑒𝑡𝑒𝑟𝑒 < 40) ≈ 0.74765 . This means that the probability of the perimeter of the iceberg being less than
40m is approximately 74.765%
Question 5 part (b):

A previous study that was conducted in the new area that our researchers are currently investigating has found that
the probability of an iceberg having length of less than 30m is 30%. Thus, in our statistical test we will consider the
probability of success i.e., obtaining an iceberg with length less 30 m be 0.3 i.e., 𝑃success = 0.3 .
Our null hypothesis 𝐻𝑜 will be that the old study is indeed correct and thus 𝑃success = 0.3 which will indicate that
our researchers should not continue their investigation as the old study is correct in the value they reported. This
means that our alternative hypothesis will be that the probability of success has changed and it’s not 0.3 thus the
size distribution of the icebergs in this new area has changed. Hence 𝐻1 : 𝑃success ≠ 0.3 . This means that our
hypothesis test is a two tailed test because we are checking if the 𝑃success has changed without specifying if it has
increased or decreased. We test the hypothesis with a 95% confidence since this is a typical confidence interval.
The research report that out of the 10 icebergs they have measured, 6 had a length above 30m thus 4 icebergs had a
length of less than 30 m.
Therefore, we can conclude that:
𝐻𝑜 : 𝑃success = 0.3
𝐻1 : 𝑃success ≠ 0.3
Assume 𝐻𝑜 𝑖𝑠 𝑡𝑟𝑢𝑒 thus 𝑋~𝐵(𝑁, 𝑃𝑠𝑢𝑐𝑐𝑒𝑠 ) 𝑤ℎ𝑒𝑟𝑒 𝑁 = 10 𝑎𝑛𝑑 𝑃success = 0.3 .
If 𝑃𝑠𝑢𝑐𝑐𝑒𝑠 (𝑥 ≤ 4) > 0.975 then we must reject the null hypothesis.
if 𝑃𝑠𝑢𝑐𝑐𝑒𝑠 (𝑥 ≤ 4) ≤ 0.975 then we do not have enough to reject null hypothesis.

10 10 10 10 10
𝑃𝑠𝑢𝑐𝑐𝑒𝑠 (𝑥 ≤ 4) = 𝐶 0.34 0.66 + 𝐶 0.33 0.67 + 𝐶 0.32 0.68 + 𝐶 0.31 0.69 + 𝐶 0.30 0.610 ≈ 0.8497
4 3 2 1 0
Since 0.8497 < 0.975 we are 95% confident that we do not have enough evidence to reject the null hypothesis.
Thus, the distribution of the icebergs has not changed and therefore the researchers should not continue their
investigation.

Note that the computation of 𝑃𝑠𝑢𝑐𝑐𝑒𝑠 (𝑥 ≤ 4) has been conducted using MATLAB and the code will be annexed in
appendix [5B].
Model 2
Question 1 part (a):
𝐷
Firstly, we know that demand is known and constant and we know that 𝑄 corresponds to the number of orders. This
means that the upper bound for the value of Q must be less or equal than D. This is because if Q is greater than D
then it means that the number of orders is less than 1 which cannot be the case. Furthermore, the minimum value
for the order size Q can be 1 and this would signify that the number of orders that must be placed will be equal to
the Demand. Therefore, 1 ≤ 𝑄 ≤ 𝐷 .

Additionally, it is logical that the cost per order A must be much greater than the carrying cost per unit product h.

We must specify that the cost per order does not refer to the actual cost of the products within the order but refers
to the cost that is associated with the act of placing the order. For example, when a privately owned pharmacy
places an order, it is immediately charged for the delivery of the order while the pharmacy must employ workers to
verify that the ordered items are delivered in good condition and are in fact exactly what the pharmacy has ordered.
Furthermore, the pharmacy owner must then fill in associated documents declaring that the items have been
received. All of these actions associated with the act of placing an order carry a cost and thus are considered
ordering costs, A. Carrying costs in this example are all of the costs that are associated with storing and maintaining
the products that have been ordered. The pharmacy in this case may need to rent out a climate-controlled storage
room to maintain the inventory in good condition and must employ works to organize this inventory. Thus, the act of
storing and maintaining the inventory in this case carries costs such as rent, electricity and salaries which are all
considered as carrying costs. Thus, the above statement that the cost per order A is greater than the carrying cost
per unit product h is indeed true. This is because the cost of the act of ordering a batch of products (A) is expected to
be more expensive than the cost of storing and maintaining a single product (h).

Thus 𝐴 ≫ ℎ.

We are given that:


𝐷
The ordering costs is: 𝑋 = 𝐴 ∗ 𝑄

ℎ𝑄
The carrying costs is: 𝑌 = 2
𝐷 ℎ𝑄
The total cost of the inventory is: 𝑊 = 𝑋 + 𝑌 = 𝐴 ∗ 𝑄 + 2

In order to explore the relationship between the X, Y and W we must choose certain values for the different
variables.

Let 𝐴 = £300 , or 𝐴 = £500

Let 𝐷 = 1000 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠

Let ℎ = £5 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 or ℎ = £10 𝑝𝑒𝑟 𝑝𝑟𝑜𝑑𝑢𝑐𝑡

Since 1 ≤ 𝑄 ≤ 𝐷 for a more coherent representation of the figures that will be shown below, Let 50 ≤ 𝑄 ≤ 𝐷.

The following figure shows the total costs W and how it varies as Q increases. Since for A and h we have chosen 2
values for each, a total of 4 curves have been produced on the same plot. Additionally using MATLAB, we have found
the ordering size Q at which the minimum cost for each curve is obtained by allowing MATLAB to search for the
lowest value of W for each function. The MATLAB code used to produce the following figure will be annexed in
appendix [M2Q1].
Figure 13. Shows how the total inventory costs varies with order size Q for 4
curves with different A and h values. The point x on each curve signifies the point
at which the lowest cost for each curve is obtained and the corresponding Q
value

For the blue curve the minimum costs occur at an order size Q= 346 products and W= £1732.04
For the red curve the minimum costs occur at an order size Q= 447 products and W= £2236.07
For the yellow curve the minimum costs occur at an order size Q= 225 products and W= £2449.49
For the purple curve the minimum costs occur at an order size Q= 316 products and W= £3162.28
Generally, what we can observe by figure 13 is that as the ordering size increase the total costs fall with an
increasing rate up to a certain minimum value where after as ordering size increases the total costs increase as well
but at a lower rate than what they were decreasing at the lower values of Q.

To more deeply understand this relationship, we can provide a plot for the blue curve alongside a curve that shows
how the ordering costs and the carrying costs for the blue curve vary as the order size Q increases. (The MATLAB
code used to produce the following curves will be annexed in appendix [M2Q1I].

Figure 14. Show how the total costs for the blue curve change as the
Figure 15. Shows how the ordering costs and carrying costs change
ordering size Q increases
with the order size Q

By observing figure 14 we can conclude that as the order size increases the ordering costs decreases exponentially
and as the ordering size increase the carrying costs increase linearly. This can be explained easily by observing the
equation for ordering and carrying costs.
𝐷 𝑚1
Considering the fact that, 𝑋 = 𝐴 ∗ 𝑄 then this function has a general formula of 𝑦1 = 𝑥
𝑤ℎ𝑒𝑟𝑒 𝑚1 = 𝐴𝐷. Similarly,
ℎ𝑄 ℎ
since 𝑌 = 2
then this function has a general formula of 𝑦2 = 𝑚2 𝑥 𝑤ℎ𝑒𝑟𝑒 𝑚2 = 2 . This means that figure 14 is
represents the two functions 𝑦1 𝑎𝑛𝑑 𝑦2 and how they vary with x.

By taking extreme values of x, we can understand the behaviour of 𝑦1 𝑎𝑛𝑑 𝑦2 . For small values of x for example for
𝑚
x=0.1, 𝑦1 = 1 = 10𝑚1 and 𝑦2 = 0.1𝑚2 . Previously we have defined than 𝐴 ≫ ℎ thus 𝑚1 ≫ 𝑚2 . Hence,𝑦1 (0.1) ≫
0.1
𝑦2 (0.1).

Now we can consider that the value of x=1000. This means that 𝑦1 = 0.001𝑚1 and that 𝑦2 = 1000𝑚2 .Hence
𝑦1 (1000) < 𝑦2 (1000).This means that for sufficiently small values of x, 𝑦1 (𝑥𝑙𝑜𝑤 ) ≫ 𝑦2 (𝑥𝑙𝑜𝑤 ) and for sufficiently
large values of x, 𝑦1 (𝑥𝑙𝑎𝑟𝑔𝑒 ) ≪ 𝑦2 (𝑥𝑙𝑎𝑟𝑔𝑒 ).

Explicitly this means that if the order size is relatively small then the carrying costs will be insignificant compared to
the ordering costs thus the ordering costs dominate and for relatively large ordering size then the ordering costs will
be insignificant compared to the carrying costs and thus the carrying costs will dominate. This is reflected in figure 15
that shows how the total inventory costs (W) vary with order size (Q). As can bee seen for small values of Q, function
𝐷
W resembles the function for ordering costs 𝑋 = 𝐴 ∗ and for larger values of Q, function W resembles the function
𝑄
ℎ𝑄
for carrying costs 𝑌 = 2
.

Thus, we can conclude that:

Since for low values of Q, 𝑋 ≫ 𝑌 and 𝑊 = 𝑋 + 𝑌 then it means that for low values of Q, 𝑊 ≈ 𝑋.

Similarly for large values of Q, 𝑋 ≪ 𝑌 . Thus, for large values of Q, 𝑊 ≈ 𝑌.

Another point to note is that the minimum total inventory cost W occurs at the value of Q at which the functions of
ordering cost X and carrying cost Y intersect. This shouldn’t be a surprise since prior to that point, Q is relatively
small thus X dominates driving the total costs up and after that point, Y dominates once again driving W up.
Essentially at the value of Q that X and Y intersect in figure 14 we achieve a perfect balance between ordering cost
and carrying costs and thus at that point 𝑋 = 𝑌 and W is minimum. Therefore, this means since 𝑊 = 𝑋 + 𝑌 and
𝑊𝑚𝑖𝑛 is achieved when 𝑋 = 𝑌 then 𝑊𝑚𝑖𝑛 = 2𝑋 = 2𝑌.

Question 1 part (b):

In order to analytically produce a matrix model that finds the optimal order quantity and the total inventory cost for
each product (i) we must take advantage of the relationship found above.
ℎ𝑄 𝐴𝐷 2𝐴𝐷
We know that 𝑊𝑚𝑖𝑛 = 2𝑋, therefore 𝑋 + 𝑌 = 2𝑋 , hence 2
+ 𝑄
= 𝑄
.

ℎ𝑄 𝐴𝐷 2𝐴𝐷
Using the equation 2
+ 𝑄
= 𝑄
we can rearrange it in order to find an expression for Q that can be written in a
matrix format.
ℎ𝑄 𝐴𝐷 2𝐴𝐷 ℎ𝑄 2 ℎ
2
+ 𝑄
= 𝑄
→ 2
+ 𝐴𝐷 = 2𝐴𝐷 → 2 ∗ 𝑄 2 = 𝐴𝐷 → ∴ ℎ ∗ 𝑄 2 = 𝐴𝐷
For 𝑖 number of products then:

ℎ1 ∗ 𝑄12 = 𝐴1 𝐷1

ℎ2 ∗ 𝑄22 = 𝐴2 𝐷2

ℎ3 ∗ 𝑄32 = 𝐴3 𝐷3

ℎ4 ∗ 𝑄42 = 𝐴4 𝐷4

ℎ5 ∗ 𝑄52 = 𝐴5 𝐷5

ℎ𝑖 ∗ 𝑄𝑖2 = 𝐴𝑖 𝐷𝑖

The only issue with the above sets of equations is that they do not constitute a system of linear equations due to the
fact that ℎ𝑖 and 𝑄𝑖2 change for each unique value of 𝐴𝑖 𝐷𝑖 . Thus, we combine these equations in such a way that
resembles a system of linear equations.

Let 𝑄𝑖2 = 𝑥𝑖 , ℎ𝑖 = 𝑎𝑖 and 𝐴𝑖 𝐷𝑖 = 𝑏𝑖 .

Producing a system of linear equations:

𝑎1 𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5 ⋯ 0𝑥𝑖 = 𝑏1


0𝑥1 + 𝑎2 𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5 ⋯ 0𝑥𝑖 = 𝑏2
0𝑥1 + 0𝑥2 + 𝑎3 𝑥3 + 0𝑥4 + 0𝑥5 ⋯ 0𝑥𝑖 = 𝑏3
0𝑥1 + 0𝑥2 + 0𝑥3 + 𝑎4 𝑥4 + 0𝑥5 ⋯ 0𝑥𝑖 = 𝑏4
0𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 𝑎5 𝑥5 ⋯ 0𝑥𝑖 = 𝑏5

0𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5 ⋯ 𝑎𝑖 𝑥𝑖 = 𝑏𝑖

Since the above system constitutes a system of linear equations, we can solve it using a matrix model where:
𝑎1 0 0 0 0 ⋯ 0 𝑥1 𝑏1
0 𝑎2 0 0 0 ⋯ 0 𝑥2 𝑏2
0 0 𝑎3 0 0 ⋯ 0 𝑥3 𝑏3
𝐴= 0 0 0 𝑎4 0 𝑥
⋯ 0 , 𝐵 = 4 and 𝐶 = 𝑏4
0 0 0 0 𝑎5 ⋯ 0 𝑥5 𝑏5
⋮ ⋮ ⋮ ⋮ ⋮ ⋱ 0 ⋮ ⋮
[0 0 0 0 0 0 𝑎𝑖 ] [ 𝑥 𝑖 ] [ 𝑏𝑖 ]
Therefore:

𝐴𝐵 = 𝐶 𝑡ℎ𝑢𝑠 𝐴𝐴−1 𝐵 = 𝐴−1 𝐶 , ℎ𝑒𝑛𝑐𝑒 𝐵 = 𝐴−1 𝐶

Implementing the above matrices and using the above expression 𝐴𝐴−1 𝐵 = 𝐴−1 𝐶 we can construct a model a
model in MATLAB that finds the values of the elements in matrix B i.e., the values for all 𝑥𝑖 . We must note that
𝑥𝑖 = 𝑄𝑖2 thus we must take the square root of each element in matrix B to find the optimal order size Q for each
product 𝑖.(Note that the resulting matrix from the element wise square root of matrix B will be denoted as 𝐵√2)
We can now develop a model that find the minimum total inventory cost using the knowledge that 𝑊𝑚𝑖𝑛 = 2𝑌.

Since we know that 𝑊𝑚𝑖𝑛 = 2𝑌 = ℎ𝑄 then for any product (i):

ℎ1 ∗ 𝑄1 = 𝑊min 1
ℎ2 ∗ 𝑄2 = 𝑊min 2
ℎ3 ∗ 𝑄3 = 𝑊min 3
ℎ4 ∗ 𝑄4 = 𝑊min 4
ℎ5 ∗ 𝑄5 = 𝑊min 5

ℎ𝑖 ∗ 𝑄𝑖 = 𝑊min 𝑖
As before we can combine the above expressions to produce a system of linear equations:

ℎ1 𝑄1 + 0𝑄2 + 0𝑄3 + 0𝑄4 + 0𝑄5 ⋯ 0𝑄𝑖 = 𝑊min 1


0𝑄1 + ℎ2 𝑄2 + 0𝑄3 + 0𝑄4 + 0𝑄5 ⋯ 0𝑄𝑖 = 𝑊min 2
0𝑄1 + 0𝑄2 + ℎ3 𝑄3 + 0𝑄4 + 0𝑄5 ⋯ 0𝑄𝑖 = 𝑊min 3
0𝑄1 + 0𝑄2 + 0𝑄3 + ℎ4 𝑄4 + 0𝑄5 ⋯ 0𝑄𝑖 = 𝑊min 4
0𝑄1 + 0𝑄2 + 0𝑄3 + 0𝑄4 + ℎ5 𝑄5 ⋯ 0𝑄𝑖 = 𝑊min 5

0𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5 ⋯ 𝑎𝑖 𝑥𝑖 = 𝑊min 𝑖
Since the above system constitutes a system of linear equations, find the minimums costs W for each product (i)
using a matrix model where:
𝑎1 0 0 0 0 ⋯ 0 𝑄1 𝑊min 1
0 𝑎2 0 0 0 ⋯ 0 𝑄2 𝑊min 2
0 0 𝑎3 0 0 ⋯ 0 𝑄3 𝑊min 3
𝐴= 0 0 0 𝑎4 0 ⋯ 0 𝑠𝑖𝑛𝑐𝑒 ℎ𝑖 = 𝑎𝑖 , 𝐵√2 = 𝑄4 and 𝑊 = 𝑊min 4 .
0 0 0 0 𝑎5 ⋯ 0 𝑄5 𝑊min 5
⋮ ⋮ ⋮ ⋮ ⋮ ⋱ 0 ⋮ ⋮
[0 0 0 0 0 0 𝑎𝑖 ] [ 𝑄𝑖 ] [ 𝑊min 𝑖 ]

Therefore, 𝐴𝐵√2 = 𝑊 .

Since now we are concerned for 3 products then matrices A, B, 𝐵√2 , 𝐶 and W become:

ℎ1 0 0 𝑄12 𝑄1 𝐴1 𝐷1 𝑊min 1
𝐴=[0 ℎ2 0 ] , 𝐵 = [𝑄22 ] , 𝐵√2 = [𝑄2 ] , 𝐶 = [𝐴2 𝐷2 ], 𝑊 = [𝑊min 2 ]
0 0 ℎ3 𝑄32 𝑄3 𝐴3 𝐷3 𝑊min 3

Thus by using the above matrices, the equations ( 𝐵 = 𝐴−1 𝐶 and 𝐴𝐵√2 = 𝑊 ) as well as the values for A,D and h
shown below we can produce our matrix model in MATLAB and find the value of the order size Q for each product
that results in the lowest total inventory cost W for each product.(Note that the MATLAB code used to find the
solutions will be annexed in appendix [M2Q1M]).
Table 1. Demand and costs associated with the three products the company manufactures
Results:

For product 1: 𝑊min 1 = £2000 𝑎𝑡 𝑄1 = 200 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠

For product 2: 𝑊min 2 = £1500 𝑎𝑡 𝑄2 = 300 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠

For product 2: 𝑊min 3 = £2500 𝑎𝑡 𝑄3 = 100 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠

Question 2 part (a):

We know that the manufacturer’s factory is currently able to complete 70h of deposition( 𝑇𝑑 = 70), 181h of
lithography ( 𝑇𝐿 = 181)and 41h of ionization( 𝑇𝑖 = 40) per day.

We also know that:

product 1 requires 8 hours of deposition (𝑇1𝑑 = 8), 5h of lithography ( 𝑇1𝐿 = 5)and 1h of ionization( 𝑇1𝑖 = 1).

Product 2 needs 3 hours of deposition (𝑇2𝑑 = 3),12h of lithography ( 𝑇2𝐿 = 12)and 3h of ionization( 𝑇2𝑖 = 3).

Product 3 requires 1h of deposition (𝑇3𝑑 = 1), 10 of lithography( 𝑇3𝐿 = 10) and 2h of ionization( 𝑇3𝑖 = 2).

Let 𝑥1 , 𝑥2 𝑎𝑛𝑑 𝑥3 be the number of products 1,2,3 respectively, that we produce a day.

Therefore, we can conclude that:

𝑇1𝑑 𝑥1 + 𝑇2𝑑 𝑥2 + 𝑇3𝑑 𝑥3 = 𝑇𝑑 → 8𝑥1 + 3𝑥2 + 1𝑥3 = 70


𝑇1𝐿 𝑥1 + 𝑇2𝐿 𝑥2 + 𝑇3𝐿 𝑥3 = 𝑇𝐿 → 5𝑥1 + 12𝑥2 + 10𝑥3 = 181
𝑇1𝑖 𝑥1 + 𝑇2𝑖 𝑥2 + 𝑇3𝑖 𝑥3 = 𝑇𝑖 → 1𝑥1 + 3𝑥2 + 2𝑥3 = 41
Where:
8 3 2 𝑥1 70
𝐴 = [5 12 10] , 𝑋 = [𝑥2 ] 𝑎𝑛𝑑 𝑏 = [181]
1 3 2 𝑥3 41
Thus

𝐴𝑋 =𝑏

Performing LU-decomposition of matrix 𝐴:

𝐴=𝐿 𝑈
𝐿11 0 0 𝑈11 𝑈12 𝑈13 8 3 2
[𝐿21 𝐿22 0 ][ 0 𝑈22 𝑈23 ] = [5 12 10]
𝐿31 𝐿32 𝐿33 0 0 𝑈33 1 3 2
Let 𝐿11 , 𝐿22 , 𝐿33 = 1

𝐿11 𝑈11 = 8 → 𝑈11 = 8


𝐿11 𝑈12 = 3 → 𝑈12 = 3
𝐿11 𝑈13 = 2 → 𝑈13 = 2
𝐿11 𝑈11 = 8 → 𝑈11 = 8
5
𝐿21 𝑈11 = 5 → 𝐿21 = 8
5 81
𝐿21 𝑈12 + 𝐿22 𝑈22 = 12 → ∗ 3 + 𝑈22 → 𝑈22 =
8 8
5 75
𝐿21 𝑈13 + 𝐿22 𝑈23 = 10 → 8 + 𝑈23 = 10 → 𝑈23 = 8
1
𝐿31 𝑈11 = 1 → 8𝐿31 = 1 → 𝐿31 =
8
1 81 7
𝐿31 𝑈12 + 𝐿32 𝑈22 = 3 → 8 ∗ 3 + 𝐿
8 32
= 3 → 𝐿32 = 27
1 7 75 5
𝐿31 𝑈13 + 𝐿32 𝑈23 + 𝐿33 𝑈33 = 2 → + ∗ + 𝑈33 = 2 → 𝑈33 = −
8 27 8 9

Therefore:
1 0 0
𝐿11 0 0 5
𝐿 = [𝐿21 𝐿22 0 ] = [8 1 0]
𝐿31 𝐿32 𝐿33 1 7
8 27
1

8 3 1
𝑈11 𝑈12 𝑈13 81 75
𝑈=[ 0 𝑈22 𝑈23 ] = [ 0 8 8 ]
0 0 𝑈33 5
0 0 −9

Using the knowledge that 𝐿 𝑦 = 𝑏 then 𝑦 is:

1 0 0
5 𝑦1 70
[8 1 0] [𝑦2 ] = [181]
1 𝑦3
1 7
41
8 27

𝑦1 = 70
5 549
𝑦
8 1
+ 𝑦2 = 181 → 𝑦2 = 4
1 7 10
𝑦 + 𝑦 + 𝑦3 = 41 → 𝑦3 = −
8 1 27 2 3

Therefore:
70
549
𝑦= [ 4 ]
10
−3

Using the knowledge that 𝑈 𝑋 = 𝑦 then 𝑋 is:

8 3 1 70
81 75 𝑥1 549
[0 8 8 ] [𝑥2 ] = [ 4 ]
− 9 𝑥3
5 10
0 0 −3
5 10
− 9 𝑥3 = − 3
→ 𝑥3 = 6
81 75 549
8 2
𝑥 + 8 3
𝑥 = 4
→ 𝑥2 = 8

8𝑥1 + 3𝑥2 + 𝑥3 = 70 → 𝑥1 = 5
Therefore:
5
𝑋 = [ 8]
6
Therefore, they must be producing a total of 5 units of product 1, 8 units of product 2 and 6 units of product 3.
Question 2 part (b):

If we are to use the inverse method the steps that we must take are the following:

• We must compute the determinant of 𝐴


• we must find the matrix of minors of 𝐴
• Find the matrix of cofactors by changing the signs
• Transpose the matrix of cofactors to find the adjoint matrix
• Multiply the determinant by said adjoint matrix to compute the inverse matrix 𝐴−1
• Verify that this is indeed the inverse matrix by multiplying it with the initial matrix 𝐴 and check that the unit
vector is obtained
• Multiply the inverse matrix 𝐴−1 by matrix 𝑏 to find matrix 𝑋

In contrast for the LU-decomposition method we must:

• Compute the 𝐿 𝑎𝑛𝑑 𝑈 matrices of 𝐴


• Verify that the two matrices are indeed correct by multiplying them together check if we obtain matrix 𝐴
• Compute matrix 𝑦 is by using the relationship that 𝐿 𝑦 = 𝑏
• Compute the values of 𝑋 by using the relationship that 𝑈 𝑋 = 𝑦

Clearly the inverse method requires more computation steps, and it is easier to make a computational error.
Furthermore, the only way to spot an error is only after we have computed an inverse matrix, since we must
multiply it by the initial matrix𝐴 i.e., step 6. In the case of LU-decomposition method we can verify that the
resulting matrices are correct much earlier in the process i.e., step 2. Generally, the LU-decomposition methods
are more convenient (faster and easier) to be done analytically while also allowing for the easier spotting of
errors.

Question 3 part (a):

Matrix A is:
0.7 0.1 0
𝐴 = [0.2 0.9 0.2]
0.1 0 0.8
To find the eigen values and eigen vectors of matrix 𝐴 we must use the knowledge that:

𝐴𝑣 =𝜆𝑣

(𝐴 − 𝜆 𝐼)𝑣 = 0

Where 𝐴 − 𝜆 𝐼 is:
0.7 0.1 0 1 0 0 0.7 − 𝜆 0.1 0
𝐴 − 𝜆 𝐼 = [0.2 0.9 0.2] − 𝜆 [0 1 0] = [ 0.2 0.9 − 𝜆 0.2 ]
0.1 0 0.8 0 0 1 0.1 0 0.8 − 𝜆
The eigen values can be found by equating the determinant of (𝐴 − 𝜆 𝐼) to be 0. Therefore:
7 9 8 1 2 8 2 1
det(𝐴 − 𝜆 𝐼) = |𝐴 − 𝜆 𝐼| = (10 − 𝜆) [(10 − 𝜆) (10 − 𝜆) − 0] − 10 [10 (10 − 𝜆) − 10 10] + 0 = 0

63 16 8 1 16 2 2
|𝐴 − 𝜆 𝐼| = (100 − 10 𝜆 + 𝜆2 ) (10 − 𝜆) − 10 (100 − 10 𝜆 − 100) = 0
504 63 128 16 8 14 2 24 189 49
|𝐴 − 𝜆 𝐼| = 1000 − 100 𝜆 − 100 𝜆 + 10 𝜆2 + 10 𝜆2 − 𝜆3 − 1000 + 1000 𝜆 = −𝜆3 + 10 𝑙 2 − 100 𝜆 + 100 = 0

24 189 49
Therefore, we must solve the equation −𝜆3 + 10 𝑙 2 − 100 𝜆 + 100 = 0. We attempt to check if 𝜆 = 1 is a solution by
using long division. (Note that the long division will be shown in handwriting)

Therefore, we can conclude that 𝜆 = 1 is a solution to the equation thus:


24 189 49 14 49
−𝜆3 + 10 𝑙 2 − 100 𝜆 + 100 = (𝜆 − 1)(−𝜆2 + 10 𝜆 − 100)

By inspection:
14 49 7 7
(−𝜆2 + 10 𝜆 − 100) = (10 − 𝜆)(𝜆 − 10)
Therefore:
24 189 49 7 7
−𝜆3 + 10 𝑙 2 − 100 𝜆 + 100 = (𝜆 − 1) = (10 − 𝜆)(𝜆 − 10)

This means that we have 3 eigen values from which 2 are repeated thus 𝜆 = 1 and 𝜆 = 0.7.

To calculate the eigen vector we must use the relationship than 𝐴 𝑣 = 𝜆 𝑣 .

For 𝜆 = 1

𝐴𝑣 =1𝑣
0.7 0.1 0 𝑥1 𝑥1
[0.2 0.9 0.2] [𝑥2 ] = [𝑥2 ]
0.1 0 0.8 𝑥3 𝑥3
Let 𝑥1 = 1

0.7𝑥1 + 0.1𝑥2 = 𝑥1 → 0.7 + 0.1𝑥2 = 1 → 𝑥2 = 3


1
0.1𝑥1 + 0.8𝑥3 = 𝑥3 → 0.1 + 0.8𝑥3 = 𝑥3 → 𝑥3 =
2

1
Therefore when 𝜆 = 1, 𝑣 = [31 ]
2
2
1 1 √41 0.312
1 2 6
The normalized eigen vector for 𝜆 = 1 is , 𝑣 𝑁 = [ 3] =
1
[3] = √41
≈ [0.932]
1 √41 1
√(1 3
1 3 2 2 1 0.156
)( )
2 1 [√41]
2

For 𝜆 = 0.7

𝐴 𝑣 = 0.7 𝑣

0.7 0.1 0 𝑥1 0.7𝑥1


𝑥
[0.2 0.9 0.2] [ 2 ] = [0.7𝑥2 ]
0.1 0 0.8 𝑥3 0.7𝑥3
Let 𝑥1 = 1

0.7𝑥1 + 0.1𝑥2 = 0.7𝑥1 → 0.7 + 0.1𝑥2 = 0.7 → 𝑥2 = 0


0.1𝑥1 + 0𝑥2 + 0.8𝑥3 = 0.7𝑥3 → −0.1𝑥3 = 0.1 → 𝑥3 = −1
1
Therefore when 𝜆 = 0.7, 𝑣 = [ 0 ]
−1
1
1 1 √2 0.707
1 1 6
The normalized eigen vector for 𝜆 = 0.7 is, 𝑣 𝑁 = 1
[ 0 ] = [ 0 ]= √41
≈[ 0 ]
√2
√(1 0 −1)( 0 ) −1 −1 1 −0.707
−1 [− √2]
We have used MATLAB code to verify our results and it will be annexed in appendix [M2Q3A]
Question 3 part (b):
0.25
We know that the starting year (𝑦0 ) the relative demand of the three products is given by 𝑦0 = [ 0.2 ].
0.55
0.17
After 5 years the relative demand of the three products will be approximately 𝑦5 = 𝐴5 𝑦0 = [0.59]
0.24
0.20
After 10 years the relative demand of the three products will be approximately 𝑦10 = 𝐴10 𝑦0 = [0.65]
0.14
0.22
After 15 years the relative demand of the three products will be approximately 𝑦15 = 𝐴15 𝑦0 = [0.66]
0.12
0.22
After 20 years the relative demand of the three products will be approximately 𝑦20 = 𝐴20 𝑦0 = [0.67]
0.11
0.22
After 25 years the relative demand of the three products will be approximately 𝑦25 = 𝐴25 𝑦0 = [0.67]
0.11
0. 2̇
After 50 years the relative demand of the three products will be 𝑦50 = 𝐴50 𝑦0 = [0. 6̇]
0. 1̇
The above results have been extracted from MATLAB and the code used will be annexed in appendix [M2Q3B]

By observing the above results, we can conclude that as the relatively demand is calculated for a greater number of
1
years the resulting vector seems to approximate or become a multiple of the eigen vector (𝑣 = [31 ]) of matrix 𝐴 for
2
the eigen value of 1 (𝜆 = 1).

In fact, if we divide the said eigen vector by the sum of its element we get the same vector as 𝑦50 .
2
1 1 9 0. 2̇
1 1 3 2 3 2
1𝑣 = [ ] = 9 [1] =
4.5 1 3
= [0. 6̇] = 𝑦50
1+3+
2
2 2 1 0. 1̇
[9 ]
In order to understand the above observation, we must understand what an eigenvector and an eigen value is.

An eigen vector is a vector such that when multiplied by a matrix 𝑋 , the vector is not rotated and only scaled by a
factor equal to its eigen value 𝜆.

Markov chain problems are problems where a system is transitioning from one state to another from a given starting
point. The Markov property states that whatever happens in the next state depends only on the current state (and
thus no prior events affect the next state). This part of the question can be considered as a Markov chain problem
since the relative demand vector transitions each year to a different unique state and the next state is found by
taking the current state and multiplying it by matrix 𝐴 (in this case).

Matrices can be thought as linear transformation operators where a multiplication of a matrix with a vector linearly
transforms (rotates and scales) it.
In this case matrix 𝐴 is called a transition matrix as it contains probability column vectors that add up to 1. Since 𝑦0 is
the starting state (state 0) then, the next state (state 1) is calculated by multiplying it by 𝐴 . Similarly state 2 is
calculated by taking the resulting vector from state 1 and multiplying it by the transition matrix 𝐴. Thus:

State 0 is 𝑦0

State1 is 𝐴 𝑦0

State2 is 𝐴 𝐴 𝑦0 = 𝐴2 𝑦0

State n is 𝐴𝑛 𝑦0

As successive states are calculated the resulting vector will be continuously linearly transformed as it is multiplied
successively by matrix 𝐴. This successive multiplication will cause the resulting vector to converge to the eigen space
of 𝐴 where it will converge to the eigen vector 𝑣 with the largest eigen value, which in this case is 𝜆 = 1.

The eigen vector that results from an eigen value of 1 when dealing with transition matrices is called the steady state
vector. As mentioned above an eigen vector is a vector such that when multiplied by a matrix 𝐴 , the vector is only
scaled and not rotated by a factor equal to its eigen value 𝜆. This means that since the steady state vector has an
eigen value of 1, successive multiplication of that vector with the transition matrix will not scale the vector since the
scaling factor is equal to 1 thus the vector will remain unchanged (hence the name steady state vector).

Thus, once the vector that results from the successive multiplications of 𝑦0 by matrix 𝐴 converges to the eigen space
of the eigen vector of 𝐴 with an eigen value of 1 (steady state vector), then the resulting vector will remain
unchanged. This is because the resulting vector will be pointing in the same direction as the eigen vector (the steady
state vector) and so successive multiplications by 𝐴 will not result in any change of said vector since 𝜆 = 1.

In short, the eigen vector of 𝐴 with eigen value equal 1 is known as the steady state vector and it can be used to
directly derive the relative demands of the three products, since the demands will be in the same proportions as the
elements of the steady state vector.

Question 3 part (c):

2
9
2
We know that the new relative demand distribution per year between products will be 𝑑𝑒𝑚𝑎𝑛𝑑 = 3
.Thus if
1
( [9])
the company aims to produce 3600 in a year, then we would expect that the proportions of the three products
produced will be in the same proportion as demand. Therefore, the company must aim to produce in total:
2
9 800
2
𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠 = 3600 3 = [2400]
1 400
[9 ]
Therefore, in a year they must produce 800 units for product 1, 2400 units for product 2 and 400 units for product 3.

Note that since the assumption is made that no shortages are allowed, and the demand is known then the above
quantities of each product produced in a year represents the annual demand for said products.

This means that we can use the matrix model produced in (Question 1 part (b)) as well as the new demand
distribution between products to determine the optimal order quantity 𝑄 and total minimum inventory cost 𝑊 for
the three products. Moreover in (Question 1 part (b)) a table was provided with the associated costs as well as the
demand for each product. This means that knowing the new demand distribution for each product we can produce
an updated table. That table is shown below
Table 2 New demand and costs associated with the three products the company manufactures

Product Cost per order 𝐴𝑖 Updated demand for each product 𝐷𝑖 carrying cost per unit ℎ𝑖
1 200 800 10
2 150 2400 5
3 250 400 25

Using the same matrix model and implementing the new values in our MATLAB code the following results are
obtained:(The same MATLAB code is used as in (Question 1 part (b)) but with different values and it will be annexed
in appendix [M2Q3C]).

For product 1: 𝑊min 1 ≈ £1789 𝑎𝑡 𝑄1 ≈ 179 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠

For product 2: 𝑊min 2 ≈ £1897 𝑎𝑡 𝑄2 ≈ 380 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠

For product 2: 𝑊min 3 ≈ £2236 𝑎𝑡 𝑄3 ≈ 90 𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑠

Additionally, in (Question 2 part (a):) we were given that the manufacturer’s factory is currently able to complete
70h of deposition( 𝑇𝑑 = 70), 181h of lithography ( 𝑇𝐿 = 181)and 41h of ionization( 𝑇𝑖 = 40) per day.

We were also given that:

Product 1 requires 8 hours of deposition (𝑇1𝑑 = 8), 5h of lithography ( 𝑇1𝐿 = 5)and 1h of ionization( 𝑇1𝑖 = 1).

Product 2 needs 3 hours of deposition (𝑇2𝑑 = 3),12h of lithography ( 𝑇2𝐿 = 12)and 3h of ionization( 𝑇2𝑖 = 3).

Product 3 requires 1h of deposition (𝑇3𝑑 = 1), 10 of lithography( 𝑇3𝐿 = 10) and 2h of ionization( 𝑇3𝑖 = 2).

In question 2 we were asked to determine the optimal balance between production of products to maximise the use
of all available work power. In this case however we have a constraint that we must be producing the three products
in accordance with the new demand distribution. Therefore, in this case we can attempt to verify that the new
distribution of products can be produced while still maximizing the use of all available work power.

Let 𝑥1 , 𝑥2 𝑎𝑛𝑑 𝑥3 be the number of products 1,2,3 respectively, that we produce a day.

From before we know that:


8 3 2 𝑥1 70
𝑥
𝐴 = [5 12 10] , 𝑋 = [ 2 ] 𝑎𝑛𝑑 𝑏 = [181]
1 3 2 𝑥3 41
1 2
We know that the new demand distribution is 𝑑𝑒𝑚𝑎𝑛𝑑 = [ 3 ] = [6]
0.5 1
This means that ideally, they must be producing 3 times as many products 2 compared to product 1 and half as many
of product 3 compared to product 1.

Hence:
1
𝑥2 = 3𝑥1 𝑜𝑟 𝑥1 = 3 𝑥2

𝑥1 = 0.5 𝑥3 𝑜𝑟 𝑥3 = 2𝑥1

This, 𝑋 can be written in 3 forms i.e., in terms of 𝑥1 ,or in terms of 𝑥2 or in terms of 𝑥3 .


1
𝑥1 𝑥1 𝑥 2𝑥3
3 2
𝑥 3𝑥
𝑋 = [ 2 ] = [ 1 ] = [ 2 ] = [6𝑥3 ]
1𝑥
𝑥3 0.5𝑥1 1
𝑥 1𝑥3
6 2

Using the three forms of 𝑋 and matrix and only the first row of matrix 𝐴 that describes the time of decomposition
that each of the product requires we find that:

𝑥1 𝑥1
3𝑥 3𝑥
𝐴1𝑠𝑡 𝑟𝑜𝑤 [ 1 ] = [8 3 1] [ 1 ] = 70 → 17.5𝑥1 = 70 → 𝑥1 = 4
0.5𝑥1 0.5𝑥1
1 1
𝑥
3 2
𝑥
3 2
35
𝐴1𝑠𝑡 𝑟𝑜𝑤 [1𝑥2 ] = [8 3 1] [1𝑥2 ] = 70 → 6 2
𝑥 = 70 → 𝑥2 = 12
1 1
𝑥
6 3
𝑥
6 3

2𝑥3 2𝑥3
𝐴1𝑠𝑡 𝑟𝑜𝑤 [6𝑥3 ] = [8 3 1 [6𝑥3 ] = 70 → 35𝑥3 = 70 → 𝑥3 = 2
]
1𝑥3 1𝑥3
Thus at least for the deposition machine it is viable to produce 4 units of product 1 , 12 units of product 2 and 2 units
of product 3.The above results indicated that we could maximize the potential the use of all available work power
from the deposition machine while also producing the correct distribution of products.

We can use the above results to check if it is viable to indeed produce said number of each product by multiplying 𝐴
with matrix 𝑋 .
8 3 2 4 70
𝑏𝑖𝑑𝑒𝑎𝑙 = 𝐴 𝑋 = [5 12 10] [12] = [184]
1 3 2 2 44

According to the results of 𝑏𝑖𝑑𝑒𝑎𝑙 only machine 1 allows us to produce the optimal distribution of products. This is
because according to matrix 𝑏 the lithography machine can output a total of 181h of work per day and for the new
product distribution we require 184h and the ionization machine can output 41h of work per day but ideally It
should produce 44h.

This means that daily we would be producing less than 4 units of product 1, less than 12 units of product 2 and less
than 2 units of product 3.

We can continue the analysis and use the three forms of 𝑋 along with the second and third row of matrix 𝐴 to find
the ideal distribution of products that would satisfy the production hours of each of the 2 remaining machines:
𝑥1 𝑥1
184
𝐴2𝑛𝑑 𝑟𝑜𝑤 [ 3𝑥1 ] = [5 12 10] [ 3𝑥1 ] = 181 → 46𝑥1 = 181 → 𝑥1 = 46 ≈ 3.93
0.5𝑥1 0.5𝑥1
1 1
𝑥
3 2
𝑥
3 2
46 543
𝐴2𝑛𝑑 𝑟𝑜𝑤 [1𝑥2 ] = [5 12 10] [1𝑥2 ] = 181 → 3 2
𝑥 = 181 → 𝑥2 = 46
≈ 11.80
1 1
𝑥
6 3
𝑥
6 3

2𝑥3 2𝑥3
181
𝐴2𝑛𝑑 𝑟𝑜𝑤 [6𝑥3 ] = [5 12 10] [6𝑥3 ] = 181 → 92𝑥3 = 181 → 𝑥3 = 92 ≈ 1.97
1𝑥3 1𝑥3
𝑥1 𝑥1
41
𝐴3𝑟𝑑 𝑟𝑜𝑤 [ 3𝑥1 ] = [1 3 2] [ 3𝑥1 ] = 41 → 11𝑥1 = 41 → 𝑥1 = 11 ≈ 3.73
0.5𝑥1 0.5𝑥1
1 1
𝑥
3 2
𝑥
3 2
123
𝐴3𝑟𝑑 𝑟𝑜𝑤 [1𝑥2 ] = [1 3 2] [1𝑥2 ] = 41 → 𝑥2 = 11
≈ 11.18
1 1
𝑥
6 3
𝑥
6 3

2𝑥3 2𝑥3
41
𝐴3𝑟𝑑 𝑟𝑜𝑤 [6𝑥3 ] = [1 3 2] [6𝑥3 ] = 41 → 𝑥3 = 22 ≈ 1.86
1𝑥3 1𝑥3

As we can see by the above results the ionization machine ( machine 3) is the one that will bottleneck the whole
operation and thus in a day we will only be able to produce around 3.73 units of product 1 , 11.18 units of product 2
and 1.86 units of product 3.Intreperating these results means that after a day we will only have 3 units of product 1 ,
11 units of product 2 and 1 unit of product 3 that are complete and ready .Using the fact that we must produce 800
units of product 1 , 2400 units of product 2 and 400 units of product 3 in a year means that in order to fulfil the
800 2400 400
demand, the factory must operate around ≈ ≈ = 215 days to produce the required 3600 products.
3.73 11.18 1.86

This means that the factory must not be expanded in any way to fulfil the new demand distribution. However, using
this demand distribution, we do not maximize the full potential of each machine thus it would be best if we can
expand the production of the lithography and ionization machines to 184 h and 44h per day respectively.

Question 4 part (a):

This problem is a two sample mean difference where we are comparing if on average supplier 1 is late at delivering
the products than supplier two. Thus, we must decide if the company made the correct choice to switch to supplier
2.
63
Let the probability of supplier 1 being late be 𝑃1 = = 0.63
100
59
Let the probability of supplier 2 being late be 𝑃2 = 125 ≈ 0.46

Our null hypothesis will be that the two suppliers are equally late on average in delivering the products and the
alternative hypothesis will be that supplier 2 on average is less times late in delivering the products. Since we are
asked to check if the company made the correct choice in changing suppliers, then it is only logical that this is a one
tailed test. Therefore:

𝐻𝑜 : 𝑃1 − 𝑃2 = 0
𝐻1 : 𝑃1 − 𝑃2 > 0

𝑃𝑇 (1−𝑃𝑇 ) 𝑃 (1−𝑃 ) 𝑛1 𝑃1 +𝑛2 𝑃1 𝑃1 −𝑃2


Assuming 𝐻𝑜 is true then, 𝑍~𝑁 (𝑃1 − 𝑃2 , √ 𝑛1
+ 𝑇𝑛 𝑇) 𝑤ℎ𝑒𝑟𝑒 𝑃𝑇 = 𝑛1 +𝑛2
,Z = 𝑃 (1−𝑃𝑇 ) 𝑃𝑇 (1−𝑃𝑇 )
.
2 √ 𝑇 +
𝑛1 𝑛2

The sample size 𝑛1 of supplier 1 is 100 and the sample size 𝑛2 of supplier 2 is 125.Therefore:
𝑛1 𝑃1 +𝑛2 𝑃1 63+59 122
𝑃𝑇 = 𝑛1 +𝑛2
= 100+125 = 225 ≈ 0.543
63 59
𝑃1 −𝑃2 −
100 125
Z= 𝑃 (1−𝑃𝑇 ) 𝑃𝑇 (1−𝑃𝑇 )
= ≈ 2.364
√ 𝑇 122 122 122 122
+ √225(1−225)+225(1−225)
𝑛1 𝑛1
100 125

At a 99% confidence interval, i.e., at 𝑎 = 1% level of significance Z±a = 2.326


Since Z > Z±a then we are 99% confident that we have enough evidence to reject the null hypothesis therefore the
company made the correct choice in changing manufactures and thus manufacturer 2 is less likely to deliver the
products late on average.

Question 5 part (b):

Let probability of a defective product be 𝑃𝐷 = 0.03

We are told that items arrive in a batch of 20 therefore:

𝑋~𝐵(𝑁, 𝑃𝐷 ) → 𝑋~𝐵(20,0.03)
Hence the probability that in a batch there is at least 1 defective product can be written as:
20
𝑃(𝑥 ≥ 1) = 1 − 𝑃(𝑥 < 1) = 1 − 𝑃(𝑥 ≤ 0) = 1 − 𝐶 0.030 0.9720 = 456.20566 ∗ 10−3 ≈ 0.456
0
Therefore, the probability that we have at least 1 defective product in a batch of 20 is around 0.456 (45.6%).

Since the manufacturer requires in any size of batch at least 20 working products (i.e., not defective) in order to not
slow the manufacturing schedule, we must find the number of products in a batch that ensures that at least 20 or
more products are functional. In other words, we must find the size of the batch where we are almost 100% sure of
having at least 20 products that are functional.

Let probability of a not defective product be 𝑃𝑁𝐷 = 0.97.

𝑌~𝐵(𝑁, 𝑃𝑁𝐷 ) → 𝑌~𝐵(𝑁, 0.97)


Thus, we must ensure that:

𝑃(𝑦 ≥ 20) = 1
𝑃(𝑦 ≥ 20) = 1 − 𝑃(𝑦 < 20) = 1 − 𝑃(𝑦 ≤ 19) ≈ 1
This means that we must ensure that in any size of a batch the probability of having less than or equal to (𝑁 − 20)
defective products is 0.

Thus:

𝑃(𝑥 ≤ 𝑁 − 20) = 𝑃(𝑥 < 𝑁 − 19) ≈ 1

We can use MATLAB to decide the number of products N in a batch that ensures that we have at least 20 functional
products i.e., less than 20 defective products. We can also plot a figure to show how that probability varies as the
number of products in a batch increase. The following figure is produced using MATLAB and the code is annexed in
appendix [M2Q4B].
Figure 16. Show how the probability of having more than 20 functional products
changes as the number of products in a batch increase

According to the results obtained from MATLAB and the above figure we can conclude that at when the number of
products in a batch is 25 the probability of having at least 20 functional product is 𝑃(𝑦 ≥ 20) = 0.9999 ≈ 1.

This means that manufacturer can be ordering products in batches of 25 in order to ensure that the manufacturing
schedule won’t be delayed.

The only issue that may arise from ordering 25 products per batch is that there will be unused (spare) products that

Accumulate rising the carrying costs of the company. If the manufacturer is more concerned with ensuring that the
manufacturing schedule is not delayed and is not affected greatly by the carrying costs, then the manufacturer can
continue to order 25 products per batch. If the carrying costs have a significant impact on the manufacturer, then
the only solution will be to order 25 products per batch until 5 spare products have accumulated where the next
batch can include only 20 products. Thus, a better strategy will be to order 25 products per batch until 5 spares have
accumulated then order a batch of 20 and hence, repeat this process.

Question 5 part (c):

The probability to have at least 1 defective product in 1 shipment (i.e., in a batch of 20) is:
20
𝑃𝐷𝑆 = 1 − 𝐶 0.030 0.9720 = 456.20566 ∗ 10−3 ≈ 0.456
0
We know that the company orders 10 shipments.

Therefore:

𝐾~𝐵(𝑁, 𝑃𝐷𝑆 ) → 𝐾~𝐵(10,0.456)


The probability that in that in exactly three out of the first 10 shipments, there is at least one defective component
can be written as:
10
𝑃(𝑘 = 3) = 𝐶 0.4563 (1 − 0.456)7 ≈ 0.16021606 ≈ 0.16
3
APPENDIX:

Appendix [1A]:

%definining the xy planes


[X,Y] = meshgrid(0:0.1:2,0:0.1:2);
%defining the equation of z
Z=16-X.^2-2.*Y.^2;
mesh(X,Y,Z)
xlabel('x axis')
ylabel('y axis')
zlabel('z axis')
title('3D represention of elipitcal function top view')

Appendix [2A]:

clc
clear
t=0:0.01:25;
%definining the equation of displacment
r_i=3.*t.^3+4.*t;
r_j=t.^2+2.*t.^3;
%definining the total displacement
r_t=sqrt(r_i.^2+r_j.^2);

plot3(r_i,r_j,t,'b')
xlabel('Dipslament in x')
ylabel('Dipslacement in y')
zlabel('Time in Days')
title('Tracking the position of the iceberg for 25 days')

plot(t,r_t)
xlabel('time in days')
ylabel('Displacment in meters')
zlabel('time in days')
title('How the the total displacement vaires across time')

%defininig and plotting the velocity components and total velocity


v_i=9.*t.^2+4;
v_j=2.*t+6.*t.^2;
v_t=sqrt(v_i.^2+v_j.^2);

plot(t,v_i,'r')
hold on
plot(t,v_j,'k')
plot(t,v_t)
xlabel('time in days')
ylabel('velocity in m per day')
title('How the velocity changes across time')
legend('Horizontal component ','Vertical component','magnitude of velocity')
hold off

%defininig and plotting the acceleration components and total acceleration


a_i=18.*t;
a_j=2+12.*t;
a_t=sqrt(a_i.^2+a_j.^2);

plot(t,a_i,'r')
hold on
plot(t,a_j,'k')
plot(t,a_t)
xlabel('time in seconds')
ylabel('acceleration in mday^-2')
title('How the the acceleration in both directions changes across time')
legend('horizontal component ','vertical component','mangitude of acceleration')
hold off
%plot(t,r_i,'r')
%hold on
%plot(t,r_j,'k')
%xlabel('time in seconds')
%ylabel('displacment in meters')
%title('how the displacement in both directions changes across time')
%legend('displacemnt in x ','dipslacement in y')
%hold off

Appendix [3B]:

% producing the vector field of the current force


x=[0:0.1:1];
y=[0:0.1:1];
[X,Y]= meshgrid(x,y);
U = X.^2;
V = -X.*Y;
% producing the equation of the clockwisepath
theta=0:0.01:pi/2;
rad=1
xcent=0;
ycent=0;
xcord=xcent+rad.*cos(theta);
ycord=ycent+rad.*sin(theta);
%producing the eqaution of the anticlockwise path
theta1=pi:0.01:3/2*pi;
xcent1=1;
ycent1=1;
xcord1=xcent1+rad.*cos(theta1);
ycord1=ycent1+rad.*sin(theta1);
%produicing the equation of the straght line path
xx=[0:0.01:1];
yy=-xx+1
%plotting thevector field along with the three different paths
quiver(X,Y,U,V,'b','AutoScaleFactor',2,'LineWidth',0.5)
hold on
xlabel('x cordinate')
ylabel('y cordinate')
title('The vector field of the current force ')
axis equal
plot(xcord,ycord,'k','LineWidth',2)
plot(xcord1,ycord1,'g','LineWidth',2)
plot(yy,xx,'r','LineWidth',2)
plot(0,1,'xb','LineWidth',3)
plot(1,0,'or','LineWidth',3)
legend('current force vector','anticlockwise path','clock wise path','straight line path','point B','point A')
Appendix [3B1]:

% producing the vector field of the current force


x=[0:0.1:1];
y=[0:0.1:1];
[X,Y]= meshgrid(x,y);
U = X.^2;
V = -X.*Y;
%plotting the vector field along with the three different paths
quiver(X,Y,U,V,'b','AutoScaleFactor',0.5,'LineWidth',0.5)
hold on
xlabel('x cordinate')
ylabel('y cordinate')
title('The vector field of the current force ')
axis equal
xline(1,'k','LineWidth',2,)
yline(1,'r','LineWidth',2)
xline(0,'b','LineWidth',2)
yline(0,'g','LineWidth',2)
plot(0,1,'xg','LineWidth',3)
plot(1,0,'xr','LineWidth',3)
plot(1,1,'xb','LineWidth',3)
plot(0,0,'xk','LineWidth',3)
legend('current force vector','From A to D','From D to B','From A to E','From E to B','point B','point A','point D','point E')

Appendix [Q4A]:

clc
clear
%producing a contour plot of the the function T
[X,Y] = meshgrid(0:0.01:2,0:0.01:2);
T=X.*exp(Y);
contourf(X,Y,T)
xlabel('x cordinate')
ylabel('y cordinate')
title('Contour plot of T ')

%producing a vector plot of the grasdient vector


[G,H]= meshgrid(0:0.1:2,0:0.1:2);

U = exp(H);
V = G.*exp(H);
quiver(G,H,U,V,'k','AutoScaleFactor',1.5,'LineWidth',1)
xlabel('x cordinate')
ylabel('y cordinate')
title('The vector field of the gradient of T')
axis equal

%plotting both the contour and the vector plot together


contourf(X,Y,T)
hold on
quiver(G,H,U,V,'r','AutoScaleFactor',1.5,'LineWidth',1)
title ('Controur of the temperature along with the gradient vector field')
xlabel('x cordinate')
ylabel('y cordinate')
hold off
%plotting a 3d presentation of the function t and the vector plot
R = G.*exp(H) + eps;
Z = R;
mesh(G,H,Z,'FaceAlpha','1')
hold on
quiver(G,H,U,V,'k','AutoScaleFactor',2,'LineWidth',1)
title ('Temperature mesh and gradient vector fields')
xlabel('x cordinate')
ylabel('y cordinate')
hold off
Appendix [5B]:

binocdf(4,10,0.3)

Appendix [M2Q1]:

clc
clear
%definining the variables D Q A H
D=1000;
Q=50:1:D;
A=300;
A1=500;
h=5;
h1=10;
%definining the equations of orderingin costs and carrying costs and total
%inventory costs
x=A.*D./Q;
x1=A1.*D./Q;
y=h.*Q.*0.5;
y1=h1.*Q.*0.5;

W=x+y;
[Lcost, minWidx] = min(W)
Q_o = Q(minWidx)

W1=x1+y;
[Lcost1, minW1idx] = min(W1)
Q_o1 = Q(minW1idx)

W2=x+y1;
[Lcost2, minW2idx] = min(W2)
Q_o2 = Q(minW2idx)

W3=x1+y1;
[Lcost3, minW3idx] = min(W3)
Q_o3 = Q(minW3idx)
%plotting all the curves
plot(Q,W)
hold on
plot(Q,W1)
plot(Q,W2)
plot(Q,W3)
plot(Q_o3,Lcost3,'kx')
plot(Q_o2,Lcost2,'kx')
plot(Q_o1,Lcost1,'kx')
plot(Q_o,Lcost,'kx')
title('How total inventory cost changes with ordering size')
xlabel('order size Q')
ylabel('Total inventory cost in pounds')
legend('A=300 H=5','A=500 H=5','H=10 A=300','H=10 and A=500','minimum cost','minimum cost','minimum
cost','minimum cost')
hold off

Appendix [M2Q1I]:

clc
clear
%definining the variables D Q A H
D=1000;
Q=50:1:D;
A=300;
h=5;
%definining the equations of ordering costs and carrying costs and total
%inventory cost
x=A.*D./Q;
y=h.*Q.*0.5;
W=x+y;
%finding the minimum costs for w and position Q
[Lcost, minWidx] = min(W)
Q_o = Q(minWidx)
%comparinging the ordering and carrying costs at postion q found above
Z=abs(x-y);
[Equ, minZidx] = min(Z)
Value = Q(minZidx)
xx=x(minZidx)
Compare=Value-Q_o

plot(Q,W)
hold on
plot(Q_o,Lcost,'kx')
title('How total inventory cost changes with ordering size')
xlabel('order size Q')
ylabel('Total inventory cost in pounds')
hold off

plot(Q,x)
hold on
plot(Q,y)
plot(Q_o,xx,'xk','LineWidth',2)
xlabel('order size Q')
ylabel('Cost in pounds')
title('How the ordering and carrying costs vary with Q')
legend('Ordering cost','carrying cost','point of intersection X=Y')
hold off

Appendix [M2Q1M]:

clc
clear
A1=200; D1=1000; h1=10;
A2=150; D2=1500; h2=5;
A3=250; D3=500; h3=25;
B1=2*A1*D1;
B2=2*A2*D2;
B3=2*A3*D3;

C=[h1 0 0;0 h2 0;0 0 h3];


D=[B1;B2;B3];
X=(C\D).^(1/2)
C_inv=inv(C);
W=C*X
%X_x=(C_inv*D).^(1/2);
%C_c=[h1/2 h2/2 h3/2];

Appendix [M2Q3A]:

a=[0.7 0.1 0;0.2 0.9 0.2;0.1 0 0.8]


[P,D] = eig(a)

Appendix [M2Q3B]:

a=[0.7 0.1 0;0.2 0.9 0.2;0.1 0 0.8]


y0=[0.25;0.2;0.55];
y5=a^5*y0
y10=a^10*y0
y15=a^15*y0
y20=a^20*y0
y25=a^25*y0
y50=a^50*y0

Appendix [M2Q3C]:

clc
clear
A1=200; D1=800; h1=10;
A2=150; D2=2400; h2=5;
A3=250; D3=400; h3=25;
B1=2*A1*D1;
B2=2*A2*D2;
B3=2*A3*D3;
C=[h1 0 0;0 h2 0;0 0 h3];
D=[B1;B2;B3];
X=(C\D).^(1/2)
C_inv=inv(C);
X_x=(C_inv*D).^(1/2);
C_c=[h1/2 h2/2 h3/2];
W=C*X
Appendix [M2Q4B]:

clc
clear
N=[20:1:30];
Y=1-binocdf(19,N,0.97)
plot(N,Y,'r--','LineWidth',2)
hold on
plot(N,Y,'kx','LineWidth',1)
xlabel( 'Number of products in a batch N')
ylabel('Probability of more than 20 functional products')
title('How the probability varies as the N increases')

You might also like