Lab 4
Lab 4
SCT211-0535/2022
0.1 Question 1
A lab group is combining different amounts of 3 salts to obtain various weights of the final product.
They combine 2 mol of salt A, 3 mol of salt B, and 1 mol of salt C to make 312.1 g of the final
product. Then, they combine 1 mol of salt A, 2 mol of salt B, and 1 mol of salt C to make 216.7 g
of the final product. Finally, the lab group combines 1 mol of salt A, 1 mol of salt B, and 2 mol of
salt C to make 264 g of the final product. Find the molar mass of each salt.
### Solution
system:
2𝐴 + 3𝐵 + 𝐶 = 312.1
𝐴 + 𝐵 + 2𝐶 = 264
𝐴 + 2𝐵 + 𝐶 = 216.7
2 3 1 | 312.1
The augmented matrix: 𝐴 = ⎡
⎢1 1 2 | 264 ⎥
⎤
⎣1 2 1 | 216.7⎦
2 3 1 | 312.1
⎡1 1 2 | 264 ⎤
⎢ ⎥
⎣1 2 1 | 216.7⎦
𝑅2 = 𝑅3 − 𝑅2 , 𝑅3 = 𝑅1 − 2𝑅3
2 3 1 | 312.1
⎡0 −1 1 | 47.3 ⎤
⎢ ⎥
⎣0 1 −3 | −215.9⎦
𝑅1 = 𝑅1 + 3𝑅2 , 𝑅3 = 𝑅3 − 𝑅2
1
2 0 4 | 454
⎡0 −1 1 | 47.3 ⎤
⎢ ⎥
⎣0 0 −2 | −168.6⎦
0.1.2 Gauss-Jordan
We continue from here to get to RREF(Gauss-Jordan)
𝑅1 = 𝑅1 + 2𝑅3 , 𝑅2 = 2𝑅2 + 𝑅3
2 0 0 | 116.8
⎡0 −2 0 | −74 ⎤
⎢ ⎥
⎣0 0 −2 | −168.6⎦
𝑅1 = 𝑅1 /2, 𝑅2 = 𝑅2 / − 2, 𝑅3 = 𝑅3 / − 2
1 0 0 | 58.4
⎡0 1 0 | 37.0⎤
⎢ ⎥
⎣0 0 1 | 84.3⎦
0.1.3 Answers
𝐴 = 58.4, 𝐵 = 37.0, 𝐶 = 84.3
a, b, c = sp.symbols('a b c')
2
a = 58.4
b = 37.0
c = 84.3
1.0.1 QUESTION 2
A chemistry student is trying to make 100 mL of a 26% acid solution from a 10% solution, a 20%
solution, and a 40% solution. Unfortunately, the lab is out of 20%, so the student uses a 25%
solution, and ends up with 100 mL of 28% solution. What volume of each solution did the student
use?
###Solution Let 𝑥 represent the volume of 10% solution, 𝑦 volume of 20% solution and 𝑧 volume
of 40% solution.
system:
𝑥 + 𝑦 + 𝑧 = 100
0.1𝑥 + 0.2𝑦 + 0.4𝑧 = 0.26
0.1𝑥 + 0.25𝑦 + 0.4𝑧 = 0.28
For simplicity we multiply each equation by 100.
1 1 1 | 100
The augmented matrix; 𝑀 = ⎡
⎢ 0.1 0.2 0.4 | 26 ⎤
⎥
⎣0.1 0.25 0.4 | 28 ⎦
𝑅2 = 10𝑅2 − 𝑅1 , 𝑅3 = 10𝑅3 − 𝑅1
1 1 1 | 100
⎡0 1 3 | 160⎤
⎢ ⎥
⎣0 0.5 3 | 180⎦
𝑅3 = 3𝑅2 − 2𝑅3
1 1 1 | 100
⎡0 1 3 | 160⎤
⎢ ⎥
⎣0 0 3 | 120⎦
3
1 0 −2 | −60
⎡0 1 3 | 160 ⎤
⎢ ⎥
⎣0 0 3 | 120 ⎦
𝑅1 = 3𝑅1 + 2𝑅3
3 0 0 | 60
⎡0 1 3 | 160⎤
⎢ ⎥
⎣0 0 3 | 120⎦
𝑅2 = 𝑅1 + 𝑅3
3 0 0 | 60
⎡0 1 0 | 40 ⎤
⎢ ⎥
⎣0 0 3 | 120 ⎦
𝑅1 = 𝑅1 /3, 𝑅3 = 𝑅3 /3
1 0 0 | 20
⎡0 1 0 | 40⎤
⎢ ⎥
⎣0 0 1 | 40⎦
x, y, z = sym.symbols('x y z')
print(f'x = {int(solution[x])}')
print(f'y = {int(solution[y])}')
print(f'z = {int(solution[z])}')
x = 20
y = 40
z = 40
1.2 QUESTION 3
Equation: 𝑥 𝑑𝑓(𝑥)
𝑥 + 𝑓(𝑥) − 𝑓(𝑥)
2
4
The Symbolic Python solution is as below
[3]: import sympy as sym
x = sym.Symbol('x')
f = sym.Function('f')