18-19final Solutions
18-19final Solutions
201819 Term 1
A. Matrix Algebra
Solve the following matrix operations:
⎡4 0 3 5⎤ ⎡6 6 6 5 ⎤ ⎡ 10 6 9 10 ⎤
1. ⎢ 9 5 3 8⎥ + ⎢6 6 6 8 ⎥ = ⎢ 15 11 9 16 ⎥
⎣3 5 8 8⎦ ⎣0 4 4 9⎦ ⎣ 3 9 12 17 ⎦
⎡9 6⎤
3 3 9 ⎡ 27 27 111 ⎤
2. ⎢ 2 6⎥[ ]=⎢ 6 6 48 ⎥
⎣0 0 0 5
3⎦ ⎣ 0 0 15 ⎦
⎛⎡ 9 3 4 ⎤⎞
3. det ⎜⎢ 1 7 8 ⎥⎟ = −328
⎝⎣ 4 9 5 ⎦⎠
7 8
◦ Row 1 Col 1: a1,1 |C1,1 | = 9 ⋅ (−1)1+1 ⋅ det ([ ]) = −333
9 5
1 8
◦ Row 1 Col 2: a1,2 |C1,2 | = 3 ⋅ (−1)1+2 ⋅ det ([ ]) = 81
4 5
1 7
◦ Row 1 Col 3: a1,3 |C1,3 | = 4 ⋅ (−1)1+3 ⋅ det ([ ]) = −76
4 9
Cofactors:
6 9
◦ Row 1 Col 1: |C1,1 | = (−1)1+1 ⋅ det ([ ]) = 30
0 5
◦
7 9
Row 1 Col 2: | | = (−1 ⋅ det ([ 7 6 ]) = 19
◦ Row 1 Col 3: |C1,3 | = (−1)1+3 ⋅ det ([ 6 5 ]) = −36
C1,2 )1+2 6 0
3 1
◦ Row 2 Col 1: |C2,1 | = (−1)1+1 ⋅ det ([ ]) = −15
0 5
3 1
◦ Row 2 Col 2: |C2,2 | = (−1)1+2 ⋅ det ([ ]) = 9
6 5
3 3
◦ Row 2 Col 3: |C2,3 | = (−1)1+3 ⋅ det ([ ]) = 18
6 0
3 1
◦ Row 3 Col 1: |C3,1 | = (−1)1+1 ⋅ det ([ ]) = 21
6 9
3 1
◦ Row 3 Col 2: |C3,2 | = (−1)1+2 ⋅ det ([ ]) = −20
7 9
3 3
◦ Row 3 Col 3: |C3,3 | = (−1)1+3 ⋅ det ([ ]) = −3
7 6
Adjoint Matrix:
⎡ 30 19 −36 ⎤
C = ⎢ −15 9 18 ⎥
⎣ 21 −20 −3 ⎦
⎡ 30 −15 21 ⎤
Aadj = C = ⎢ 19
′
9 −20 ⎥
⎣ −36 18 −3 ⎦
Determinant:
Inverse:
10 5 7
−1
⎡ 37 − 37 ⎤
⎡3 3 1⎤ 37
⎢7 6 9⎥ = 1
Aadj =⎢
⎢ 19
⎢ 111
3
37
20
− 111 ⎥
⎥
⎥
⎣6 0 det(A)
5⎦ ⎣ − 12 6
− 371 ⎦
37 37
B. Differentiation
Find the derivative with respect to x for the following equations:
5. d
dx
[13x8 + 21x4 + 16x3 + 4]
= 104 + 84 + 48
6. d
dx
[(26xx7 8 x3 (5x x
+ 31) 6
+2 3x4 + 22x2 + 26)]
= 208x (5x6 + 3x4 + 22x2 + 26) + (26x8 + 31) (30x5 + 12x3 + 44x)
7
4
7. d
dx
[e3x +3 ]
4
= 12x3 e3x +3
8. d
dx
[log (8x2 + 2x + 4)]
= 8x16x+2
2 +2x+4
6 5 3
9. d
dx
[97x +2x +5x +9x+4 ]
6 5 3
= 97x +2x +5x +9x+4 (42x5 + 10x4 + 15x2 + 9) log (9)
C. Optimization
Find all the maxima and minima of the following equation.
Your solution should include both x and f(x) . Remember to check the second
derivative.
Minima
None exists
Inflexion Points
None exists
Derivation
First Derivative:
d
dx
[−12x + 25 log (41x) − 3]
25
= −12 + x
Firstorder condition:
25
−12 + x =0
gives the following solutions: 2.083
Secondderivative:
d
dx
[−12 + x ]
25
= − 25
x2
Maxima
x f(x) SOC
2.083 83.189 5.760
Minima
None exists
Inflexion Points
None exists
Minima
x f(x) SOC
1.000 1.000 34.000
Inflexion Points
None exists
Derivation
First Derivative:
d
dx
[17x2 + 34x + 16] = 34x + 34
Firstorder condition:
34x + 34 = 0
gives the following solutions: 1.000
Secondderivative:
d
dx
[34x + 34] = 34
Maxima
None exists
Minima
x f(x) SOC
1.000 1.000 34.000
Inflexion Points
None exists
D. Advanced Questions
12. (Markov Chain) Two companies compete
in a city with 100,000 potential
subscribers. The figure below shows the
changes in subscription each year.
Company A and B each have 10,000
customers at this moment.
a. How many subscribers will each
company have in three years?
10000 38222
3
If student uses 𝑋𝑋 = � 10000 �, 𝑃𝑃 𝑋𝑋 = �45324�.
100000 36454
b. Find the steady state market share.
𝑋𝑋 = 𝑃𝑃𝑃𝑃
(𝐼𝐼 − 𝑃𝑃)𝑋𝑋 = 0
1 0 0 0.88 0.05 0.15
𝐼𝐼 − 𝑃𝑃 = �0 1 0� − �0.07 0.89 0.18�
0 0 1 0.05 0.06 0.67
0.12 −0.05 −0.15
= �−0.07 0.11 −0.18�
−0.05 −0.06 0.33
Add in 𝑝𝑝1 + 𝑝𝑝2 + 𝑝𝑝3 = 1 and find the non-trivial solution to the system:
0.12 −0.05 −0.15 0
−0.07 0.11 −0.18 0
� �
−0.05 −0.06 0.33 0
1 1 1 1
0 0 0 0 𝑅𝑅1 = 𝑅𝑅1 + 𝑅𝑅2 + 𝑅𝑅3
−0.07 0.11 −0.18 0
� �
−0.05 −0.06 0.33 0
1 1 1 1
0 0 0 0
0 0.18 −0.11 0.07 𝑅𝑅2 = 𝑅𝑅2 + 0.07𝑅𝑅4
� �
0 −0.01 0.38 0.05 𝑅𝑅3 = 𝑅𝑅3 + 0.05𝑅𝑅4
1 1 1 1
0 0 0 0
0 0 6.73 0.97 𝑅𝑅2 = 𝑅𝑅2 + 18𝑅𝑅3
� �
0 −0.01 0.38 0.05
1 1 1 1
0 0 0 0
0 0 1 0.144 𝑅𝑅2 = 𝑅𝑅2/6.73
� �
0 1 −38 −5 𝑅𝑅3 = 𝑅𝑅3 ⋅ −100
1 1 1 1
Steady-state market share is: 𝑥𝑥1 = 0.379, 𝑥𝑥2 = 0.477, 𝑥𝑥3 = 0.144.
13. (Limit) Compute
𝑥𝑥 3 − 9𝑥𝑥
lim
𝑥𝑥→−3 𝑥𝑥 + 3
𝑦𝑦 = ln 𝑥𝑥
𝑒𝑒 𝑦𝑦 = 𝑥𝑥
𝑑𝑑 𝑦𝑦 𝑑𝑑
𝑒𝑒 = 𝑥𝑥
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
𝑑𝑑
𝑒𝑒 𝑦𝑦 𝑦𝑦 = 1
𝑑𝑑𝑑𝑑
𝑑𝑑 1
𝑦𝑦 = 𝑦𝑦
𝑑𝑑𝑑𝑑 𝑒𝑒
𝑑𝑑 1
ln 𝑥𝑥 =
𝑑𝑑𝑑𝑑 𝑥𝑥
6
5
4
y
3
2
1
0
0 1 2 3 4
x1
We would like to find a trendline that represents the relationship between 𝑦𝑦
and 𝑥𝑥1 . This can be solved by representing the data with the following vectors:
0 1 1
𝑦𝑦⃑ = �4� , 𝑥𝑥⃑0 = �1� , 𝑥𝑥⃑1 = �2�
5 1 3
a. Show that
𝑎𝑎 + 𝑏𝑏
𝑆𝑆 = ��𝑎𝑎 + 2𝑏𝑏� �𝑎𝑎, 𝑏𝑏 ∈ ℝ�
𝑎𝑎 + 3𝑏𝑏
is span by 𝑥𝑥⃑0 and 𝑥𝑥⃑1 . In other words, show that you can represent any
vector in 𝑆𝑆 as a linear combination of 𝑥𝑥⃑0 and 𝑥𝑥⃑1 .
𝑎𝑎 + 𝑏𝑏 𝑐𝑐 + 𝑑𝑑 𝑒𝑒 + 𝑓𝑓
iii. ��𝑎𝑎 + 2𝑏𝑏� + �𝑐𝑐 + 2𝑑𝑑 �� + �𝑒𝑒 + 2𝑓𝑓 �
𝑎𝑎 + 3𝑏𝑏 𝑐𝑐 + 3𝑑𝑑 𝑒𝑒 + 3𝑓𝑓
𝑎𝑎 + 𝑏𝑏 + 𝑐𝑐 + 𝑑𝑑 + 𝑒𝑒 + 𝑓𝑓
= �𝑎𝑎 + 2𝑏𝑏 + 𝑐𝑐 + 2𝑑𝑑 + 𝑒𝑒 + 2𝑓𝑓�
𝑎𝑎 + 3𝑏𝑏 + 𝑐𝑐 + 3𝑑𝑑 + 𝑒𝑒 + 3𝑓𝑓
𝑎𝑎 + 𝑏𝑏 𝑐𝑐 + 𝑑𝑑 𝑒𝑒 + 𝑓𝑓
= �𝑎𝑎 + 2𝑏𝑏� + ��𝑐𝑐 + 2𝑑𝑑 � + �𝑒𝑒 + 2𝑓𝑓 ��
𝑎𝑎 + 3𝑏𝑏 𝑐𝑐 + 3𝑑𝑑 𝑒𝑒 + 3𝑓𝑓
𝑎𝑎 + 𝑏𝑏 0+0 𝑎𝑎 + 𝑏𝑏
iv. �𝑎𝑎 + 2𝑏𝑏� + �0 + 2 ⋅ 0� = �𝑎𝑎 + 2𝑏𝑏�
𝑎𝑎 + 3𝑏𝑏 0+3⋅0 𝑎𝑎 + 3𝑏𝑏
𝑎𝑎 + 𝑏𝑏 𝑎𝑎 + 𝑏𝑏 𝑎𝑎 + 𝑏𝑏 − 𝑎𝑎 − 𝑏𝑏 0+0
v. �𝑎𝑎 + 2𝑏𝑏� + (−1) ⋅ �𝑎𝑎 + 2𝑏𝑏� = �𝑎𝑎 + 2𝑏𝑏 − 𝑎𝑎 − 2𝑏𝑏� = �0 + 2 ⋅ 0�
𝑎𝑎 + 3𝑏𝑏 𝑎𝑎 + 3𝑏𝑏 𝑎𝑎 + 3𝑏𝑏 − 𝑎𝑎 − 3𝑏𝑏 0+3⋅0
𝑎𝑎 + 𝑏𝑏 𝑐𝑐𝑐𝑐 + 𝑐𝑐𝑐𝑐
vi. 𝑐𝑐 ⋅ �𝑎𝑎 + 2𝑏𝑏� = �𝑐𝑐𝑐𝑐 + 2𝑐𝑐𝑐𝑐� ∈ 𝑆𝑆
𝑎𝑎 + 3𝑏𝑏 𝑐𝑐𝑐𝑐 + 3𝑐𝑐𝑐𝑐
𝑎𝑎 + 𝑏𝑏 𝑎𝑎′ + 𝑏𝑏 ′ 𝑎𝑎 + 𝑏𝑏 + 𝑎𝑎′ + 𝑏𝑏 ′
vii. 𝑐𝑐 ��𝑎𝑎 + 2𝑏𝑏� + � 𝑎𝑎′ + 2𝑏𝑏 ′ �� = 𝑐𝑐 �� 𝑎𝑎 + 2𝑏𝑏 + 𝑎𝑎′ + 2𝑏𝑏 ′ ��
𝑎𝑎 + 3𝑏𝑏 𝑎𝑎′ + 3𝑏𝑏 ′ 𝑎𝑎 + 3𝑏𝑏 + 𝑎𝑎′ + 3𝑏𝑏 ′
𝑐𝑐(𝑎𝑎 + 𝑏𝑏) + 𝑐𝑐�𝑎𝑎′ + 𝑏𝑏 ′ � 𝑎𝑎 + 𝑏𝑏 𝑎𝑎′ + 𝑏𝑏 ′
= � 𝑐𝑐(𝑎𝑎 + 2𝑏𝑏) + 𝑐𝑐�𝑎𝑎′ + 2𝑏𝑏 ′ � � = 𝑐𝑐 �𝑎𝑎 + 2𝑏𝑏� + 𝑐𝑐 � 𝑎𝑎′ + 2𝑏𝑏 ′ �
𝑐𝑐(𝑎𝑎 + 3𝑏𝑏) + 𝑐𝑐 (𝑎𝑎′ + 3𝑏𝑏 ′ ) 𝑎𝑎 + 3𝑏𝑏 𝑎𝑎′ + 3𝑏𝑏 ′
𝑎𝑎 + 𝑏𝑏 𝑎𝑎 + 𝑏𝑏
x. 1 ⋅ �𝑎𝑎 + 2𝑏𝑏� = �𝑎𝑎 + 2𝑏𝑏�
𝑎𝑎 + 3𝑏𝑏 𝑎𝑎 + 3𝑏𝑏
c. The ordinary least squares method finds the trend line by solving 𝛽𝛽⃑ =
(𝑋𝑋 𝑇𝑇 𝑋𝑋)−1 𝑋𝑋 𝑇𝑇 𝑦𝑦⃑, where 𝑋𝑋 = [𝑥𝑥⃑0 𝑥𝑥⃑1 ]. Find 𝛽𝛽⃑.
1 1
𝑋𝑋 = �1 2�
1 3
1 1
𝑇𝑇
(𝑋𝑋 𝑋𝑋) = � 1 1 1 3 6
� �1 2� = � �
1 2 3 6 14
1 3
2.33 −1
(𝑋𝑋 𝑇𝑇 𝑋𝑋)−1 = � �
−1 0.5
0
𝑇𝑇 −1 𝑇𝑇
(𝑋𝑋 𝑋𝑋) 𝑋𝑋 𝑦𝑦⃑ = � 2.33 −1 1 1 1
�� � �4�
−1 0.5 1 2 3
5
−2
=� �
2.5
d. The trendline is the straight line with 𝛽𝛽0 as the vertical intercept and 𝛽𝛽1
as the slope. Draw this line on the diagram above.
6
5
4
y
3
2
1
0
0 1 2 3 4
x1