0% found this document useful (0 votes)
86 views5 pages

Lab 4

The document contains solutions to three chemistry problems involving systems of equations: 1) Finding the molar masses of three salts (A, B, C) given their combinations that produce different total weights. The molar masses are found to be A = 58.4 g/mol, B = 37.0 g/mol, C = 84.3 g/mol. 2) Determining the volumes of four acid solutions (10%, 20%, 25%, 40%) needed to produce 100mL of a 26% solution that ended up being 28% instead. The volumes are found to be 10% solution = 20mL, 25% solution = 40mL, 40% solution = 40mL. 3)

Uploaded by

akdauatem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views5 pages

Lab 4

The document contains solutions to three chemistry problems involving systems of equations: 1) Finding the molar masses of three salts (A, B, C) given their combinations that produce different total weights. The molar masses are found to be A = 58.4 g/mol, B = 37.0 g/mol, C = 84.3 g/mol. 2) Determining the volumes of four acid solutions (10%, 20%, 25%, 40%) needed to produce 100mL of a 26% solution that ended up being 28% instead. The volumes are found to be 10% solution = 20mL, 25% solution = 40mL, 40% solution = 40mL. 3)

Uploaded by

akdauatem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

lab4

February 21, 2024

SCT211-0535/2022

AKECH DAU ATEM

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⎦

0.1.1 Row Reduction:

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⎦

The Gaussian sloution at this point is:


−2𝐶 = −168.3, 𝑠𝑜 𝐶 = 84.3
−𝐵 + 𝐶 = 47.3, 𝑠𝑜 𝐵 = 84.3 − 47.3 = 37.0
−2𝐴 + 4𝐶 = 454, 𝑠𝑜 𝐴 = 116.8

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

1 Symbolic Python Solution


The Symbolic Python solution is below:
[1]: import sympy as sp

a, b, c = sp.symbols('a b c')

solution = sp.solve((2*a + 3*b + c -312.1,\


a + 2*b + c -216.7,\
a + b + 2*c -264), (a, b, c))
# solutions
print(f'a = {solution[a]:.1f}')
print(f'b = {solution[b]:.1f}')
print(f'c = {solution[c]:.1f}')

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⎦

Gaussian Solution 3𝑧 = 120, 𝑧 = 40


𝑦 + 3𝑧 = 160, 𝑠𝑜 𝑦 + 3(40) = 160, 𝑦 = 160 − 120, 𝑦 = 40
𝑥 + 𝑦 + 𝑧 = 100, 𝑥 + 40 + 40 = 100, 𝑥 = 100 − 80 = 20

Gauss-Jordan We continue to Row Reduced Echelon Form(RREF) elimination method also


known as the Gauss-Jordan algorithm.
𝑅1 = 𝑅1 − 𝑅2

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⎦

Solutions; 𝑥 = 20, 𝑦 = 40, 𝑧 = 40

1.1 Symbolic Python Solution


The confirmation with symbolic python.
[2]: import sympy as sym

x, y, z = sym.symbols('x y z')

solution = sym.solve((x + y + z -100,\


0.1*x + 0.2*y + 0.4*z -26,\
0.1*x + 0.25*y + 0.4*z -28),(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')

sym.solve((x*f(x).diff(x,x)/x) + f(x) - f(x)**2, f(x))

[3]: [1/2 - sqrt(4*Derivative(f(x), (x, 2)) + 1)/2,


sqrt(4*Derivative(f(x), (x, 2)) + 1)/2 + 1/2]

[4]: # !pip install nbconvert


# !apt-get install texlive texlive-xetex texlive-latex-extra pandoc
# !pip install pypandoc

from google.colab import drive


drive.mount('/content/drive')
!cp "./drive/My Drive/Colab Notebooks/lab4.ipynb" ./

!jupyter nbconvert 'lab4.ipynb' --to pdf

from google.colab import files


files.download('lab4.pdf')

Drive already mounted at /content/drive; to attempt to forcibly remount, call


drive.mount("/content/drive", force_remount=True).
[NbConvertApp] Converting notebook lab4.ipynb to pdf
[NbConvertApp] Writing 59282 bytes to notebook.tex
[NbConvertApp] Building PDF
[NbConvertApp] Running xelatex 3 times: ['xelatex', 'notebook.tex', '-quiet']
[NbConvertApp] Running bibtex 1 time: ['bibtex', 'notebook']
[NbConvertApp] WARNING | bibtex had problems, most likely because there were no
citations
[NbConvertApp] PDF successfully created
[NbConvertApp] Writing 65350 bytes to lab4.pdf
<IPython.core.display.Javascript object>
<IPython.core.display.Javascript object>

You might also like