recursal/Fanatic-Fandom huggingface dataset:
Berlin Papyrus Problem 1

## **Problem**

The *Berlin Mathematical Papyrus*, or **Berlin Papyrus 6619**, is an ancient Egyptian mathematics document dating to roughly 1800 BC. The readable fragments were published by Hans Schack-Schackenburg in 1900 and 1902. The surviving fragments contains only two problems. The following problem is one of the two problems from the *Berlin Mathematical Papyrus*:

The side of one square is

1
2

1
4

{\displaystyle \frac{1}{2} + \frac{1}{4} }

 the side of another square. If the area of the two squares is 100, determine the side lengths of the two squares.

## **Solution**

**Solution 1: Modern algebraic method**

Let

x

{\displaystyle x}

 be the side length of the small square and

y

{\displaystyle y}

 be the side length of the large square. According to the problem, we get

{

x
2

y
2

=
100

# x

(

1
2

1
4

)

y

{\displaystyle \begin{cases}
x^2 + y^2 = 100 \\
x = \left(\frac{1}{2} + \frac{1}{4} \right)y
\end{cases}}

Note that the second equation is equivalent to

# x

3
4

y

{\displaystyle x = \frac{3}{4}y }

 but is written as

# x

(

1
2

1
4

)

y

{\displaystyle x = \left(\frac{1}{2} + \frac{1}{4} \right) y }

 because the ancient Egyptians expressed their fractions as the sum of unit fractions. Substitute the second equation into the first equation yields:

9
16

y
2

y
2

=
100

{\displaystyle \frac{9}{16} y^2 + y^2 = 100 }

25
16

y
2

=
100

{\displaystyle \frac{25}{16} y^2 = 100 }

Solve the quadratic equation

25
16

y
2

=
100

{\displaystyle \frac{25}{16} y^2 = 100 }

:

y
2

=
64

{\displaystyle y^2 = 64 }

# y
8

{\displaystyle y = 8 }

Remember the side length of a square must be positive (the ancient Egyptians never conceived the notion of negative numbers).

Substituting

# y
8

{\displaystyle y = 8 }

 into the equation

# x

3
4

y

{\displaystyle x = \frac{3}{4}y }

 gives

# x
6

{\displaystyle x=6}

.

Therefore, the side length of the large square is 8, and the side length of the small square is 6.

**Solution 2: Method of False Position**

Interestingly, the ancient Egyptians applied the method of false-position on quadratic equations as well! The scribe who wrote the *Berlin Mathematical Papyrus*, begins by assuming that the sides of the two squares are 1 and 3/4. He then calculated the sum of the areas of these two squares to be

1
2

(

3
4

)

2

=
1

9
16

.

{\displaystyle 1^2 + \left(\frac{3}{4} \right)^2 = 1 \frac{9}{16}.}

The scribe realized that he could not compare each area directly too 100 (the total area), so he must compare their sides. Subsequently, the scribe took the square root of

1

9
16

{\displaystyle 1\frac{9}{16}}

, which is

1

1
4

{\displaystyle 1\frac{1}{4}}

. The scribe than compared this to 10 (the square root of 100). Since 10 is 8 times larger than

1

1
4

{\displaystyle 1\frac{1}{4}}

, the scribe concluded that the sides of the two other squares must be 8 times the original guesses.

{

8
×
1

=
8

8
×

3
4

=
6

{\displaystyle \begin{cases}
8 \times 1 &= 8 \\
8 \times \frac{3}{4} &= 6
\end{cases}}

Thus, the side of the large square is 8 and the side of the small square is 6 cubits.
Jiuzhang Suanshu Gougu 12

This classic problem from the *Jiuzhang Suanshu* (九章算术) is called **Door and Pole** (户与竿).

## **Problem**

今有戶不知高廣，竿不知長短。橫之不出四尺，從之不出二尺，邪之適出。問：戶高、廣、袤各幾何？

Suppose there is a door height and width are unknown, and a bamboo pole of unknown length. When the pole is in the horizontal position, the excess length is 4 *chi*. When the pole is in the vertical position, the excess length is 2 *chi*. When the pole is in the diagonal position the pole fits through the door exactly. Question: What are the height, width, and the diagonal of the door?

## **Solution**

Let the width of the door be

a

{\displaystyle a}

, the height of the door be

c

{\displaystyle c}

, and the length of the pole be (diagonal of the door) be

c

{\displaystyle c}

. The horizontal excess length is the *gou-xian difference*

c
−
a

{\displaystyle c-a}

, and the vertical excess length is the *gu-xian difference*

c
−
b

{\displaystyle c-b}

. The solution method given in the *Jiuzhang Suanshu* uses an interesting right-triangle identity:

a
b
−
# c

2
(
c
−
a
)
(
c
−
b
)

{\displaystyle a+b-c = \sqrt{2(c-a)(c-b)} }

This formula can be derived using the above diagram, which takes advantage of the *gou-xian difference*

c
−
a

{\displaystyle c-a}

 and the *gu-xian difference*

c
−
b

{\displaystyle c-b}

. Let the area of the *gou-square* be

a
2

{\displaystyle a^2}

 (red square), the area of the *gu-square*

b
2

{\displaystyle b^2}

 (green square), and the are of the *xian-square*

c
2

{\displaystyle c^2}

. The yellow square at the center is the overlapping areas of the *gou-square* (red square) and the *gu-square* (green square); its area is

(
a
b
−
c
)

2

{\displaystyle {(a+b-c)}^{2}}

. There are also two blue rectangles of equal area

(
c
−
a
)
(
c
−
b
)

{\displaystyle (c-a)(c-b) }

.

By inspection, one can deduce that subtracting the two blue rectangles from the entire square is equal in area to the sum of the red square with the green square minus the yellow square.

c

2

−
2
×
(
c
−
a
)
(
c
−
b
# )

a

2

b

2

−

(
a
b
−
c
)

2

{\displaystyle c^{2}-2\times (c-a)(c-b)=a^{2}+b^{2}-{(a+b-c)}^{2}}

By the Pythagorean theorem

a
2

b
2

=

c
2

{\displaystyle a^2+b^2=c^2}

, we get

(
a
b
−
c
)

2

=
2
(
c
−
a
)
(
c
−
b
)

{\displaystyle {(a+b-c)}^{2}=2(c-a)(c-b)}

Taking the square root gives

a
b
−
# c

2
(
c
−
a
)
(
c
−
b
)

{\displaystyle a+b-c = \sqrt{2(c-a)(c-b)} }

**Calculation**

Height of the door:

# a

2
(
c
−
a
)
(
c
−
b
)

(
c
−
b
)

{\displaystyle a={\sqrt {2(c-a)(c-b)}}+(c-b)}

# a

2
×
4
×
2

2

{\displaystyle a={\sqrt {2\times 4\times 2}}+2}

# a
6

{\displaystyle a=6}

Width of the door:

# b

2
(
c
−
a
)
(
c
−
b
)

(
c
−
a
)

{\displaystyle b={\sqrt {2(c-a)(c-b)}}+(c-a)}

# b

2
×
4
×
2

4

{\displaystyle b={\sqrt {2\times 4\times 2}}+4}

# b
8

{\displaystyle b=8}

Diagonal of the door:

# c

2
(
c
−
a
)
(
c
−
b
)

(
c
−
a
)
(
c
−
b
)

{\displaystyle c={\sqrt {2(c-a)(c-b)}}+(c-a)+(c-b)}

# c

2
×
4
×
2

2
4

{\displaystyle c={\sqrt {2\times 4\times 2}}+2+4}

# c
10

{\displaystyle c=10}

The width of the door is 6 chi; the height of the door is 8 chi; the length of the pole is 10 chi (1 zhang).
Fangcheng Method with Python

## Description

1. Set up initial matrix

2. Transform Augmented Matrix (A) to Upper Triangular Matrix using Row Operations

3. Obtain Solution using Back Substitution

4. Display Result

## Code

```
import numpy as np
import sys

# Set up the initial matrix A and solution vector x
A = [[5, 4, 3, 2, 1496],
    [4, 2, 6, 3, 1175],
    [3, 1, 7, 5, 958],
    [2, 3, 5, 1, 861]]
n = len(A)
x = np.zeros(n)

# Applying the elimination method (方程术)
        sys.exit('Divide by zero detected!')

    for j in range(i+1, n):
        ratio = A[j][i]/A[i][i]

        for k in range(n+1):
            A[j][k] = A[j][k] - ratio \* A[i][k]

# Back Substitution
x[n-1] = A[n-1][n]/A[n-1][n-1]

for i in range(n-2,-1,-1):
    x[i] = A[i][n]

    for j in range(i+1,n):
        x[i] = x[i] - A[i][j]\*x[j]

    x[i] = x[i]/A[i][i]

# Display solution
print('\nThe solution is: ')
for i in range(n):
    print('x%d = %0.2f' %(i+1,x[i]), end = '\t')

```

## Example and Results

Solve the linear system:

A

=

[

5

4

3

2

1496

4

2

6

3

1175

3

1

7

5

958

2

3

5

1

861

]

{\displaystyle \mathbf{A} =
 \begin{bmatrix}
 5 & 4 & 3 & 2 & 1496 \\
 4 & 2 & 6 & 3 & 1175 \\
 3 & 1 & 7 & 5 & 958 \\
 2 & 3 & 5 & 1 & 861 \\
 \end{bmatrix}
}

```
The solution is:
x1 = 177.00	x2 = 121.00	x3 = 23.00	x4 = 29.00
```
Lagrange Multipliers

## **Problem**

Find the extremas on the plane

f
(
x
,
y
# )
3
x
y
10

{\displaystyle f(x,y) = 3x + y + 10 }

 in the domain

x
2

y
2

≤
10

{\displaystyle x^2 + y^2 \le 10 }

.

   Note: the above plane is not representative on the plane in this problem.

## **Solution**

**Critical points**

Use critical points to search for any extrema within the domain.

f
x

=
0
⇒
# 3
0

{\displaystyle f\_x = 0 \Rightarrow 3 = 0 }

f
y

=
0
⇒
# 1
0

{\displaystyle f\_y = 0 \Rightarrow 1 = 0 }

Both statements are nonsense, so there are no critical points.

**Lagrange multipliers**

**Objective:**

f
(
x
,
y
# )
3
x
y

{\displaystyle f(x,y) = 3x + y }

**Constraint:**

g
(
x
,
y
# )

x
2

y
2

−
10

{\displaystyle g(x,y) = x^2 + y^2 - 10 }

Use Lagrange multipliers to find extrema on the boundary of the constraint.

f
x

=
3

{\displaystyle f\_x = 3 }

f
y

=
1

{\displaystyle f\_y = 1 }

g
x

=
2
x

{\displaystyle g\_x = 2x }

g
y

=
2
y

{\displaystyle g\_y = 2y }

From the above partial derivatives, we generate two equations:

# 3
λ
(
2
x
)

{\displaystyle 3 = \lambda (2x) }

# 1
λ
(
2
y
)

{\displaystyle 1 = \lambda (2y) }

.
Isolate the Lagrange multiplier

λ

{\displaystyle \lambda}

 for both equation.

# λ

3

2
x

{\displaystyle \lambda = \frac{3}{2x} }

# λ

1

2
y

{\displaystyle \lambda = \frac{1}{2y} }

.
The equations for the Lagrange multiplier imply

# x
3
y

{\displaystyle x = 3y }

.
With this new insight, we may substitute

# x
3
y

{\displaystyle x = 3y }

 into the constraint and set the constraint equal to zero.

(
3
y

)
2

y
2

−
# 10
0

{\displaystyle (3y)^2 + y^2 - 10 = 0 }

9

x
2

y
2

−
# 10
0

{\displaystyle 9x^2 + y^2 - 10 = 0 }

10

y
2

=
10

{\displaystyle 10y^2 = 10 }

# y
±
1

{\displaystyle y = \pm 1 }

Therefore,

(
x
,
y
# )
(
3
,
1
)

{\displaystyle (x,y) = (3,1) }

(
x
,
y
# )
(
−
3
,
−
1
)

{\displaystyle (x,y) = (-3,-1) }

.
Substituting the points into the objective function yields

3
(
3
)
1
# 10
20

{\displaystyle 3(3) + 1 + 10 = 20 }

3
(
−
3
)
(
−
1
)
# 10
0

{\displaystyle 3(-3) + (-1) + 10 = 0 }

This means the maximum is located at

(
3
,
1
)

{\displaystyle (3,1)}

 and the minimum is located at

(
−
3
,
−
1
)

{\displaystyle (-3,-1) }

.
Golden Ratio

## **Problem**

The discovery of the golden ratio

ϕ

{\displaystyle \phi}

 originated from an ancient Greek geometric construction of a rectangle that looks like the one on the right. The rectangle has the proportion

a
b

a

=

a
b

=
ϕ

{\displaystyle \frac{a + b}{a} = \frac{a}{b} = \phi}

.
It is said that this proportion makes the rectangle appear more aesthetic.
Determine the numerical value of

ϕ

{\displaystyle \phi}

.

## **Solution**

a
b

a

=
1

b
a

{\displaystyle {\frac {a+b}{a}}=1+{\frac {b}{a}}}

Since

a
b

=
ϕ

{\displaystyle {\frac {a}{b}}=\phi }

, the proportion

a
b

a

=

a
b

{\displaystyle
\frac {a+b}{a}=\frac {a}{b}}

 becomes

1

1
ϕ

=
ϕ

{\displaystyle 1+{\frac {1}{\phi }}=\phi }

.
Rearranging this equation yields

ϕ

2

−
ϕ
−
# 1
0

{\displaystyle {\phi }^{2}-\phi -1=0}

.
Use the quadratic formula to solve the a above equation:

# ϕ

−
(
−
1
)
±

(
−
1

)

2

−
4
(
1
)
(
−
1
)

2
(
1
)

{\displaystyle \phi ={\frac {-(-1)\pm {\sqrt {(-1)^{2}-4(1)(-1)}}}{2(1)}}}

# ϕ

1
±

5

2

{\displaystyle \phi ={\frac {1\pm {\sqrt {5}}}{2}}}

.
Since the golden ratio reflects a geometric construction, it must be positive, thus

# ϕ

1

5

2

{\displaystyle \phi=\frac{1+\sqrt{5}}{2}}

.
Bayesian Search of a Plane Crash

## **Problem**

**Bayesian search** is the application of Bayes' theorem to the search for lost objects. Consider the following problem:

A plane crashed in one of zones 1, 2, or 3. Before the search begins, the prior belief over the three zones is 0.5 for zone 1; 0.25 for zone 2; and 0.25 for zone 3. On the first day, a search in zone 1 finds nothing. Depth information suggests that:

• If the plane were in zone 1, searching one day in zone 1 would miss it with probability 1/5.
• If the plane were in zone 2, searching one day in zone 2 would miss it with probability 1/6.
• If the plane were in zone 3, searching one day in zone 3 would miss it with probability 1/7.
What is the probability that the plane is in zone 2 given the unsuccessful search in zone 1?

What is the probability that the plane is in zone 2 given the unsuccessful search in zone 1?

## **Solution**

Let

Z
i

{\displaystyle Z\_i}

denote the event that the missing plane is in zone

i

{\displaystyle i}

 and

M
i

{\displaystyle M\_i}

the event of not finding the the missing plane (during search) in zone

i

{\displaystyle i}

 for

# i
1
,
2
,

{\displaystyle i = 1,2,3.}

 From the problem statement, we get the probabilities:

P
(

Z
1

)

=

1
2

P
(

Z
2

)

=

1
4

P
(

Z
3

)

=

1
4

P
(

M
1

Z
1

)

=

1
5

P
(

M
2

Z
2

)

=

1
6

P
(

M
3

Z
3

)

=

1
7

{\displaystyle \begin{alignat}{2} P(Z\_1) & = \frac{1}{2} \\ P(Z\_2) & = \frac{1}{4} \\ P(Z\_3) & = \frac{1}{4} \\ P(M\_1|Z\_1) & = \frac{1}{5} \\ P(M\_2|Z\_2) & = \frac{1}{6} \\ P(M\_3|Z\_3) & = \frac{1}{7} \end{alignat}}

Use Bayes' and the law of total probability to calculate

P
(

Z
2

M
1

)

{\displaystyle P(Z\_2|M\_1)}

:

P
(

Z
2

M
1

)

=

P
(

Z
2

∩

M
1

)

P
(

M
1

)

=

P
(

M
1

Z
2

)
P
(

Z
2

)

P
(

M
1

)

=

P
(

M
1

Z
2

)
P
(

Z
2

)

∑

# i
1

3

P
(

M
1

Z
i

)
P
(

Z
i

)

{\displaystyle \begin{align} P(Z\_2|M\_1) &= \frac{P(Z\_2 \cap M\_1)}{P(M\_1)} \\
&= \frac{P(M\_1|Z\_2)P(Z\_2)}{P(M\_1)} \\
&= \frac{P(M\_1|Z\_2)P(Z\_2)}{\sum\_{i=1}^{3} P(M\_1|Z\_i)P(Z\_i)} \\
\end{align}}

where the probabilities of not finding the missing plane in zones 2 and 3 are

P
(

M
1

Z
2

)

=
1

P
(

M
1

Z
3

)

=
1

{\displaystyle \begin{align}
P(M\_1|Z\_2) &= 1 \\
P(M\_1|Z\_3) &= 1 \\
\end{align}}

Calculation

P
(

Z
2

M
1

)

=

P
(

M
1

Z
2

)
P
(

Z
2

)

P
(

M
1

Z
1

)
P
(

Z
1

)
P
(

M
1

Z
2

)
P
(

Z
2

)
P
(

M
1

Z
3

)
P
(

Z
3

)

=

1
×

1
4

1
5

×

1
2

1
×

1
4

1
×

1
4

=

5
12

≈
0.4167

&= \frac{1\times\frac{1}{4}}{\frac{1}{5} \times \frac{1}{2} + 1 \times \frac{1}{4} + 1 \times \frac{1}{4}} \\
&= \frac{5}{12} \\
&\approx 0.4167
\end{align}}
LOTTO 6/50

**Problem created by Tao Steven Zheng (郑涛)**

## **Problem**

   LOTTO 6/50 allows a player to choose 6 numbers from 1 to 50. Repetitions of numbers is not allowed. If four or more numbers match the winning numbers of the lottery, the player wins some sort of prize. What is the probability of winning a prize? Express the answer as a reduced fraction.

## **Solution**

Probability of hitting 4 of the 6 winning numbers:

P
(
X
# )

(

6
4

)

(

44
2

)

(

50
6

)

=

15
(
946
)

15890700

.

{\displaystyle P(X)= \frac{\binom{6}{4} \binom{44}{2}}{\binom{50}{6}} = \frac{15(946)}{15890700}. }

Probability of hitting 5 of the 6 winning numbers:

P
(
Y
# )

(

6
5

)

(

44
1

)

(

50
6

)

=

6
(
44
)

15890700

.

{\displaystyle P(Y) = \frac{\binom{6}{5} \binom{44}{1}}{\binom{50}{6}} = \frac{6(44)}{15890700}. }

Probability of hitting all 6 winning numbers:

P
(
Z
# )

(

6
6

)

(

44
0

)

(

50
6

)

=

1
(
1
)

15890700

.

{\displaystyle P(Z) = \frac{\binom{6}{6} \binom{44}{0}}{\binom{50}{6}} = \frac{1(1)}{15890700}. }

Therefore the probability of winning some sort of prize is

P
(
X
)
P
(
Y
)
P
(
Z
)

=

14190
264
1

15890700

=

14455
15890700

=

59
64860

.

{\displaystyle \begin{align}
P(X)+P(Y)+P(Z) &= \frac{14190 + 264 + 1}{15890700} \\[5 pt]
&= \frac{14455}{15890700} \\[5 pt]
&= \frac{59}{64860}.
\end{align} }
Combinatorial Sets From East Asia

**By: Tao Steven Zheng 鄭濤**

## **Introduction**

This article introduces two sets of abstract figures found in East Asia that are pictorial representations of combinatorics. These diagrams were probably conceived without the intent of being mathematical, but ended up being mathematical curiosities in modern times.

## ***I-Ching* Hexagrams**

The 64 hexagrams of the ***I-Ching*** (易經 yì jīng) is the foundation of an ancient Chinese form of divination that dates from the Western Zhou dynasty (c. 1050 - 771 BC). Each hexagram consists of six bars (爻 yáo). The solid bar represents *yang* (陽 yáng), the positive force; the broken bars represent *yin* (陰 yīn), the negative force. Interestingly, the sixty-four hexagrams can represent the set of binary numbers from 0 to 63. This set of 64 hexagrams is also called the **King Wen's sequence** (文王卦序 wén wáng guà xù).

The math behind the I-Ching hexagrams is simple. Just apply the fundamental counting principle to get the number of unique hexagrams:

2
6

=

{\displaystyle 2^6 = 64. }

## ***Genji Monogatari* Chapter Symbols**

These 54 combinations are the chapter symbols in ***The Tale of Genji*** (源氏物語 Genji monogatari), an 11th century novel from Medieval Japan. It is uncertain when these symbols were invented (most likely after the 11th century AD). Interestingly, 52 out of the 54 of the symbols are a visual representation of the **Bell number** for partitioning five elements. The Bell numbers were discovered by the Scottish-born American mathematician **Eric Temple Bell** (1883 - 1960) in the 1930s.

The number of symbols can be calculated using the **Bell Triangle**. It works similarly to the Pascal Triangle.
Jiuzhang Suanshu Gougu 14

## **Problem**

答曰：乙東行一十步半；甲邪行一十四步半及之。

術曰：令七自乘，三亦自乘，并而半之，以為甲邪行率。邪行率減於七自乘，餘為南行率。以三乘七為乙東行率。置南行十步，以甲邪行率乘之，副置十步，以乙東行率乘之，各自為實。實如南行率而一，各得行數。

Answer: Person B travels

10

1
2

{\displaystyle 10\frac{1}{2}}

 *bu*; person A travels

14

1
2

{\displaystyle 14 \frac{1}{2}}

 *bu* diagonally.

Method: Let 7 be multiplied by itself, and 3 also be multiplied by itself, add them and halve the result. Let this be the rate of A walking diagonally. Subtract the diagonal walking rate from the square of 7. The remainder is the rate of A walking south. The rate of B walking east is 3 times 7. Set the 10 *bu* walked south and multiply this by the rate of A walking diagonally. Again set the 10 *bu* walked south by the rate of B walking east. Let each of these be individual dividends. Divide each dividend by the rate of A walking south to obtain both distances.

## **Solution**

This problem is an application of Pythagorean triples. First compute the rates of the height, base, and hypotenuse. According to the method, the height, base, hypotenuse are called the south rate, the east rate, and the diagonal rate respectively. Let

# m
7

{\displaystyle m = 7 }

, and

# n
3

{\displaystyle n = 3}

h
e
i
g
h
t
:
b
a
s
e
:
h
y
p
o
t
e
n
u
s
e

=

1
2

(

m

2

−

n

2

)
:
m
n
:

1
2

(

m

2

n

2

)

{\displaystyle
\mathrm{height : base : hypotenuse} = \frac{1}{2}({m}^{2} - {n}^{2}) : mn : \frac{1}{2}({m}^{2} +{n}^{2})
}

h
e
i
g
h
t
:
b
a
s
e
:
h
y
p
o
t
e
n
u
s
e

=
20
:
21
:
29

{\displaystyle
\mathrm{height : base : hypotenuse} = 20 : 21 : 29
}

Given that person A traveled 10 *bu* due south before travelling diagonally, the distance traveled by person B is

10
×
21

20

=
10

1
2

{\displaystyle \frac{10 \times 21}{20} = 10\frac{1}{2} }

and the diagonal distance travelled by person A is

10
×
29

20

=
14

1
2

.

{\displaystyle \frac{10 \times 29}{20} = 14\frac{1}{2}. }

Thus, person A travelled

24

1
2

{\displaystyle 24\frac{1}{2} }

 *bu* (south plus diagonal), and person B travelled

10

1
2

{\displaystyle 10\frac{1}{2}}

 *bu*.

For a derivation of why this method works, check out this page.
Calendrics with Python

**By: Tao Steven Zheng (郑涛)**

## **Task**

Write a program that takes in three inputs (int, int, string) and outputs a string. The purpose is to input **day1**, **day2**, and the weekday of **day1** in order to report the **weekday of** **day2**.

## **Code**

```
         day1\_weekday = 1
     if day1\_weekday == "Monday":
         day1\_weekday = 2
     if day1\_weekday == "Tuesday":
         day1\_weekday = 3
     if day1\_weekday == "Wednesday":
         day1\_weekday = 4
     if day1\_weekday == "Thursday":
         day1\_weekday = 5
     if day1\_weekday == "Friday":
         day1\_weekday = 6
     if day1\_weekday == "Saturday":
         day1\_weekday = 7

     days\_difference = day2 - day1

     day2\_weekday = (day1\_weekday + days\_difference - 1) % 7 + 1

     if day2\_weekday == 1:
         print("Sunday")
     if day2\_weekday == 2:
         print("Monday")
     if day2\_weekday == 3:
         print("Tuesday")
     if day2\_weekday == 4:
         print("Wednesday")
     if day2\_weekday == 5:
         print("Thursday")
     if day2\_weekday == 6:
         print("Friday")
     if day2\_weekday == 7:
         print("Saturday")

```
Eigenstates of an Infinite Square Well

## **Problem**

Consider a particle of mass

m

{\displaystyle m}

 trapped in an infinite square well of width

# a
2

{\displaystyle a=2}

:

Ψ
(
x
,
0
# )

2

2

5

Ψ
1

(
x
)

3
i

5

Ψ
2

(
x
)
−

2

2

5

Ψ
4

(
x
)

{\displaystyle \Psi(x,0)=\frac{2\sqrt{2}}{5} \Psi\_1 (x) + \frac{3i}{5} \Psi\_2 (x) - \frac{2\sqrt{2}}{5} \Psi\_4 (x) }

**Part 1:** What are the energy eigenstates?

**Part 2:** What is the probability of finding each eigenstate? Verify that all probabilities sum up to 1.

**Part 3:** Calculate the Hamiltonian

⟨

H
^

⟩

{\displaystyle \langle \hat{H} \rangle }

.

## **Solution**

**Part 1**

To calculate the eigenenergies of each eigenstate of an infinite square well of width

a

{\displaystyle a}

, use the formula

E
n

=

n
2

π
2

ℏ
2

2
m

a
2

{\displaystyle E\_n=\frac{n^2 \pi^2 \hbar^2}{2m a^2} }

.

E
1

=

1
2

π
2

ℏ
2

2
m
(

2
2

)

=

π
2

ℏ
2

8
m

{\displaystyle E\_1=\frac{1^2 \pi^2 \hbar^2}{2m (2^2)} = \frac{\pi^2 \hbar^2}{8m} }

E
2

=

2
2

π
2

ℏ
2

2
m
(

2
2

)

=

π
2

ℏ
2

2
m

{\displaystyle E\_2=\frac{2^2 \pi^2 \hbar^2}{2m (2^2)} = \frac{\pi^2 \hbar^2}{2m} }

E
4

=

4
2

π
2

ℏ
2

2
m
(

2
2

)

=

π
2

ℏ
2

m

{\displaystyle E\_4=\frac{4^2 \pi^2 \hbar^2}{2m (2^2)} = \frac{\pi^2 \hbar^2}{m} }

**Part 2**

We know our eigenstates are orthogonal, and a quick check shows that the wavefunction is already normalized, so we can just calculate the probabilities directly.

P
(

E
1

# )

c
1

2

=

2

2

5

2

=

8
25

P
(

E
2

# )

c
2

2

=

−
3
i

5

3
i

5

=

9
25

{\displaystyle P(E\_2)={\left|c\_2 \right|}^{2}=\frac{-3i}{5} \frac{3i}{5}=\frac{9}{25} }

P
(

E
4

# )

c
4

2

=

−
2

2

5

2

=

8
25

P
(

E
1

)
P
(

E
2

)
P
(

E
4

# )

8
9
8

25

=
1

{\displaystyle P(E\_1)+P(E\_2)+P(E\_4)=\frac{8+9+8}{25}=1 }

**Part 3**

Our eigenvalues are the eigenenergies calculated above, so

⟨

H
^

# n
1

∞

c
n

2

E
n

{\displaystyle \langle \hat{H} \rangle =\sum\_{n=1}^\infty {\left|c\_n \right|}^{2} E\_n }

⟨

H
^

⟩

=

8
25

π
2

ℏ
2

8
m

9
25

π
2

ℏ
2

2
m

8
25

π
2

ℏ
2

m

=

43
50

π
2

ℏ
2

m

{\displaystyle \begin{align}
\langle \hat{H} \rangle &= \frac{8}{25} \frac{\pi^2 \hbar^2}{8m} + \frac{9}{25} \frac{\pi^2 \hbar^2}{2m} + \frac{8}{25} \frac{\pi^2 \hbar^2}{m} \\[5 pt]
&= \frac{43}{50} \frac{\pi^2 \hbar^2}{m}
\end{align} }
Math & Physics Problems Wikia

## **Welcome to the Math & Physics Problems Wiki!**

Welcome! This wiki is an archive of neat math, physics, chemistry, and computer programming problems that are great for high school and university students. My goal is to spread the art and culture of mathematical problem solving. Students who wish to navigate this wiki better (for practice problems) should check out the section **Problem Sets of Steven Zheng** below.

One of my areas of interest is the scientific history of ancient civilizations, especially the scientific development of the Orient. Check out **History of STEM** for insightful problems, interesting articles and interactive timelines on the history of STEM (Science, Technology, Engineering, Mathematics).

This wiki is also a portal for useful **learning resources** and **free math/computation tools**.

Want to learn math and physics better? Check out the **pedagogy** page.

## **Featured Articles**

**Simple Harmonic Oscillator**
Read More...

**Liu Hui's Puzzle**
Read More...

**Eigenstates of an Infinite Square Well**
Read More...

**Napkin Ring Problem**
Read More...

## **Email Contact**

eulerians@hotmail.com

stevenzheng1@gmail.com

## **Additional Topics**

Econometrics

Scientific computing

Biographies of Scientists

Translations of Ancient Scientific Works

Linguistics

Problems by Steven Zheng

Fermi Problems
Mathematical Puzzles from the Gusuryak

**By: Tao Steven Zheng 鄭濤**

## **Introduction**

This article introduces two number puzzles found in the *Gusuryak* (九數略 구수략), a Korean mathematical work by **Choi Seok-jeong** (崔錫鼎 최석정; 1646 – 1715) published in 1700. Choi Seok-jeong was a Korean scholar-official and mathematician during the Joseon period (1392 – 1894).

## **Mutually Orthogonal Latin Squares**

A **Latin square** is an *n* × *n* array filled with *n* different symbols, each occurring exactly once in each row and exactly once in each column. **Leonhard Euler** (1707 – 1783), the eminent Swiss mathematician of the 18th century, is known to be the first European to study Latin squares in 1782. The name is derived from his use of Latin (and also Greek) letters as symbols. The addition of Greek letters was used to form Graeco-Latin squares, also known as **mutually orthogonal Latin squares.** Choi Seok-jeong was the first to publish an example of a 9 x 9 mutually orthogonal Latin squares using the Chinese numerals 1 through 9; thus, predating Leonhard Euler's work by almost a century.

## **Hexagonal Tortoise Problem**

The **hexagonal tortoise problem**, or *ji-su gwi-mun do* (地數龜文圖 지수귀문도) is a recreational mathematics problem that involves a hexagonal lattice, whereby the positive integers 1 to N are arranged such that the sum of all integers at the vertices of each hexagon is the same. The problem bears some similarity to the magic squares and magic circles of ancient China. There are nine hexagons in Choi Seok-jeong's original problem. All the numbers of each hexagon sum up to the number 93.
Elimination Method with Python

## Description

1. Set up initial matrix element by element

2. Read the Augmented Matrix (A) of n by n+1 Size

3. Transform Augmented Matrix (A) to Upper Triangular Matrix using Row Operations

4. Obtain Solution using Back Substitution

5. Display Result

## Code

```
import numpy as np
import sys

# Set up the initial matrix A and solution vector x
n = int(input('Enter number of unknowns: '))
A = np.zeros((n,n+1))
x = np.zeros(n)

# Input the coefficients of the augmented matrix
print('Enter coefficients:')
        A[i][j] = float(input( 'A['+str(i)+']['+ str(j)+']='))

# Applying the elimination method (方程术)
        sys.exit('Divide by zero detected!')

    for j in range(i+1, n):
        ratio = A[j][i]/A[i][i]

        for k in range(n+1):
            A[j][k] = A[j][k] - ratio \* A[i][k]

# Back Substitution
x[n-1] = A[n-1][n]/A[n-1][n-1]

for i in range(n-2,-1,-1):
    x[i] = A[i][n]

    for j in range(i+1,n):
        x[i] = x[i] - A[i][j]\*x[j]

    x[i] = x[i]/A[i][i]

# Display solution
print('\nThe solution is: ')
for i in range(n):
    print('x%d = %0.2f' %(i+1,x[i]), end = '\t')

```

## Example and Results

Solve the linear system:

A

=

[

5

4

3

2

1496

4

2

6

3

1175

3

1

7

5

958

2

3

5

1

861

]

{\displaystyle \mathbf{A} =
 \begin{bmatrix}
 5 & 4 & 3 & 2 & 1496 \\
 4 & 2 & 6 & 3 & 1175 \\
 3 & 1 & 7 & 5 & 958 \\
 2 & 3 & 5 & 1 & 861 \\
 \end{bmatrix}
}

```
Enter number of unknowns: 4
Enter coefficients:
A[0][0]=5
A[0][1]=4
A[0][2]=3
A[0][3]=2
A[0][4]=1496
A[1][0]=4
A[1][1]=2
A[1][2]=6
A[1][3]=3
A[1][4]=1175
A[2][0]=3
A[2][1]=1
A[2][2]=7
A[2][3]=5
A[2][4]=958
A[3][0]=2
A[3][1]=3
A[3][2]=5
A[3][3]=1
A[3][4]=861

The solution is:
x1 = 177.00	x2 = 121.00	x3 = 23.00	x4 = 29.00
```
Dot Product

# A
3
i
4
j
−
5
k

{\displaystyle \boldsymbol{A} = 3\boldsymbol{i} + 4\boldsymbol{j} - 5\boldsymbol{k} }

 and

# B
5
i
−
12
j
13
k

{\displaystyle \boldsymbol{B} = 5\boldsymbol{i} - 12\boldsymbol{j} + 13\boldsymbol{k} }

.

**Part 1:** Calculate the dot product.

**Part 2:** Calculate the angle between the two vectors.

## **Solution**

**Part 1**

A
⋅
B

=<
3
,
4
,
−
5
>
⋅
<
5
,
−
12
,
13
>

{\displaystyle \boldsymbol{A \cdot B} = <3, 4, -5>\cdot<5, -12, 13> }

A
⋅
B

=
3
(
5
)
4
(
−
12
)
(
−
5
)
(
13
)

{\displaystyle \boldsymbol{A \cdot B} = 3(5) + 4(-12) + (-5)(13) }

A
⋅
B

=
−
98

{\displaystyle \boldsymbol{A \cdot B} = -98 }

**Part 2**

A
⋅
B

=

A

B

cos
⁡

θ

cos
⁡

θ

=

A
⋅
B

A

B

A

=

(
3

)
2

(
4

)
2

(
−
5

)
2

=

50

{\displaystyle |\boldsymbol{A}| = \sqrt{(3)^2 + (4)^2 + (-5)^2} = \sqrt{50} }

B

=

(
5

)
2

(
−
12

)
2

(
13

)
2

=

338

{\displaystyle |\boldsymbol{B}| = \sqrt{(5)^2 + (-12)^2 + (13)^2} = \sqrt{338} }

cos
⁡

θ

=

−
98

50

338

{\displaystyle \cos{\theta} = \frac{-98}{\sqrt{50}\sqrt{338}} }

# θ

cos

−
1

(

−
98

130

)

{\displaystyle \theta = {\cos}^{-1}\left(\frac{-98}{130}\right) }

# θ

138.92

∘

{\displaystyle \theta = {138.92}^{\circ} }
Cyclic Integration by Parts

## **Problem**

Evaluate the integral

∫

0

π

e
x

sin
⁡
x

d
x
.

{\displaystyle \int\_{0}^{\pi} e^x \sin x \,dx.}

## **Hint**

(1) A useful strategy for selecting

u

{\displaystyle u}

 when integrating by parts is the LIATE method, which gives the precedence for selecting

u

{\displaystyle u}

 in the following order:

**L**ogarithmic

**I**nverse trigonometric (including inverse hyperbolic functions)

**A**lgebraic

**T**rigonometric (including hyperbolic functions)

**E**xponential

# u
sin
⁡
x

{\displaystyle u = \sin x }

 and

d
# v

e
x

d
x

{\displaystyle dv = e^x \,dx }

. Then

d
# u
cos
⁡
x

d
x

{\displaystyle du = \cos x \,dx }

 and

# v

e
x

.

{\displaystyle v = e^x. }

 Substituting each component into the integration by parts formula

∫
u

d
# v
u
v
−
∫
v

d
u

{\displaystyle \int u \,dv = uv - \int v \,du }

 gives

∫

e
x

sin
⁡
x

d
# x
sin
⁡
x

e
x

−
∫

e
x

cos
⁡
x

d
x
.

{\displaystyle \int {e^x \sin x} \,dx = \sin x \,e^x - \int e^x \cos x \,dx. }

We discover that another integration by parts is required. Let

# u
cos
⁡
x

{\displaystyle u = \cos x }

 and

d
# v

e
x

d
x

{\displaystyle dv = e^x \,dx }

. Then

d
# u
−
sin
⁡
x

d
x

{\displaystyle du = -\sin x\, dx}

 and

# v

e
x

.

{\displaystyle v = e^x. }

Thus,

∫

e
x

cos
⁡
x

d
# x
cos
⁡
x

e
x

∫

e
x

sin
⁡
x

d
x

{\displaystyle \int {e^x \cos x} \, dx = \cos x \, e^x + \int e^x \sin x \,dx }

and

∫

e
x

sin
⁡
x

d
# x
sin
⁡
x

e
x

−
cos
⁡
x

e
x

−
∫

e
x

sin
⁡
x

d
x
.

{\displaystyle \int e^x \sin x \,dx = \sin x \,e^x - \cos x \,e^x - \int e^x \sin x \,dx. }

Notice the original integral is found on the right-hand side; subsequently,

2
∫

e
x

sin
⁡
x

d
# x
sin
⁡
x

e
x

−
cos
⁡
x

e
x

{\displaystyle 2 \int {e^x \sin x} \, dx = \sin x \,e^x - \cos x \,e^x }

∫

e
x

sin
⁡
x

d
# x

1
2

e
x

(

sin
⁡
x
−
cos
⁡
x

)

C
.

{\displaystyle \int {e^x \sin x } \,dx = \frac{1}{2} e^x \left(\sin x - \cos x \right) + C. }

The definite integral is

∫

0

π

e
x

sin
⁡
x

d
x

=

1
2

e
x

(
sin
⁡
x
−
cos
⁡
x
)

0

π

=

1
2

(

e

π

1
)
.

{\displaystyle \begin{align}
\int\_{0}^{\pi} e^x \sin x \,dx &= \frac{1}{2} e^x (\sin x - \cos x) \Biggr|\_{0}^{\pi} \\[5 pt]
&= \frac{1}{2}(e^{\pi} + 1).
\end{align} }
Euler's Method with MATLAB

## **Task**

Write a program that plots the exact solution and approximation by Euler’s method of the equation differential equation

y
′

=
y
cos
⁡
t
,

y
(
0
# )
1

{\displaystyle y' = y\cos t, \quad y(0) = 1 }

over the interval

0
≤
t
≤
6

{\displaystyle 0 \le t \le 6}

 with step size

# h

2

−
3

.

{\displaystyle h = 2^{-3}.}

 The program simultaneously plots the exact solution and computes the error of the approximation at the final time.

## **Hint**

(1) The Euler method is

y

n
1

=

y
n

h
f
(

t
n

,

y
n

)
.

{\displaystyle y\_{n+1} = y\_n + hf(t\_n,y\_n). }

## **Code**

```
% Define the differential equation: y' = f(t,y)
f = @(t,y) y\*cos(t);

% Choose the step size h and create the vector
% of t values from t0 to tf incremented by h
t0 = 0;
tf = 6;
h = 2^-3;
t = t0:h:tf;

% Initialize a vector of y values as a zero vector
% and set the initial value: y(t0) = y0
y = zeros(size(t));
y0 = 1;
y(1) = y0;

% Implement Euler's method to create the vector of t values
for n = 1:(length(t)-1)
 y(n+1) = y(n) + h\*f(t(n),y(n));
end

% Plot the approximation with the exact solution
t\_exact = t0:0.02:tf;
y\_exact = exp(sin(t\_exact));
plot(t,y,'b.-',t\_exact,y\_exact)
grid on
ylim([0,3])
savefig('euler.fig')

% Compare to exact answer and compute error at tf
error = abs(y\_exact(end) - y(end))

```
Chain Hanging Off a Table

## **Problem**

A uniform chain of mass

m

{\displaystyle m}

, and length

L

{\displaystyle L}

 is held onto a horizontal frictionless table. The table has a large hole in which a segment of length

D

{\displaystyle D}

 is hanging over the hole. The chain is then released from rest, and the chain begins to descend. How long will it take the chain to completely slide through the hole?

## **Hint**

(1) Use the integration formula

∫

d
x

x
2

−

a
2

=
ln
⁡

(

x

x
2

−

a
2

)

C

{\displaystyle \int \frac{dx}{\sqrt{x^2 - a^2}} = \ln \left(x + \sqrt{x^2 -a^2} \right) + C }

.

## **Solution**

Define

σ

{\displaystyle \sigma}

 as the constant linear mass density of the chain. Let

x

{\displaystyle x}

 represent the variable length hanging over the hole.

F

n
e
t

=
m
a

{\displaystyle {F}\_{net} = ma }

σ
x
# g
σ
L

d
v

d
t

{\displaystyle \sigma x g = \sigma L \frac{dv}{dt} }

Since

d
v

d
t

=

d
v

d
x

d
x

d
t

=
v

d
v

d
x

{\displaystyle \frac{dv}{dt} = \frac{dv}{dx}\frac{dx}{dt} = v \frac{dv}{dx} }

, the equation for force become the differential equation

v

d
v

d
x

=

g
x

L

.

{\displaystyle v \frac{dv}{dx} = \frac{gx}{L}. }

Since the chain was initially at rest, and the initial length hanging over the hole is

D

{\displaystyle D}

, the solution for velocity is

# v

g
L

x

2

−

D

2

.

{\displaystyle v = \sqrt{\frac{g}{L}} \sqrt{{x}^{2} - {D}^{2}}. }

Since

# v

d
x

d
t

{\displaystyle v = \frac{dx}{dt} }

, the above equation can be written as

d
x

d
t

=

g
L

x

2

−

D

2

.

{\displaystyle \frac{dx}{dt} = \sqrt{\frac{g}{L}} \sqrt{{x}^{2} - {D}^{2}}. }

Integrate the above differential equation with the integrating bounds

# x
[
D
,
L
]

{\displaystyle x = [D, L] }

 and

# t
[
0
,
T
]

{\displaystyle t = [0, T] }

.

∫

D

L

d
x

x

2

−

D

2

=

∫

0

T

g
L

d
t

ln
⁡

(

x

L
2

−

D
2

)

D

L

=

g
L

t

0

T

ln
⁡

(

L

L
2

−

D
2

)

−
ln
⁡

(

D

D
2

−

D
2

)

=

g
L

T

{\displaystyle \begin{align}
\int\_{D}^{L} \frac{dx}{\sqrt{{x}^{2} - {D}^{2}}} &= \int\_{0}^{T} \sqrt{\frac{g}{L}} dt \\[5 pt]
\ln \left(x + \sqrt{L^2 -D^2} \right) \,\Biggr|\_{D}^{L} &= \sqrt{\frac{g}{L}} t \,\Biggr|\_{0}^{T} \\[5 pt]
\ln \left(L + \sqrt{L^2 -D^2} \right) - \ln \left(D + \sqrt{D^2 -D^2} \right) &= \sqrt{\frac{g}{L}} T \\[5 pt]
\end{align} }

The solution for time is

# T

L
g

ln
⁡

(

L

L

2

−

D

2

D

)

.

{\displaystyle T = \sqrt{\frac{L}{g}} \ln{\left(\frac{L + \sqrt{{L}^{2} - {D}^{2}}}{D}\right)}. }
Hindu Trigonometry

## **Problem**

   Indian astronomers used three major trigonometric ratios: “jya” (sine), “koti-jya” (cosine), and “utkrama-jya” (versine). The "utkrama-jya" (versine) is defined as

versin
⁡
# θ
1
−
cos
⁡

θ

.

{\displaystyle \operatorname{versin}\theta = 1 - \cos{\theta}.}

**Part 1:** Show that

versin
⁡
# θ
2

sin
2

⁡

θ
2

.

{\displaystyle \operatorname{versin}\theta = 2 \sin^2{\frac{\theta}{2}}. }

**Part 2:** Show that

versin
⁡
# θ
sin
⁡
θ
tan
⁡

θ
2

{\displaystyle
\operatorname{versin}\theta = \sin\theta \tan\frac\theta2
}

## **Solution**

**Part 1**

Since the half-angle identity of sine is

sin
⁡

θ
2

=

1
−
cos
⁡

θ

2

{\displaystyle \sin{\frac{\theta}{2}} = \sqrt{\frac{1-\cos{\theta}}{2}} }

, we get

1
−
cos
⁡

θ

=
2

sin
2

⁡

θ
2

{\displaystyle 1 - \cos{\theta} = 2 \sin^2{\frac{\theta}{2}} }

.

Therefore,

versin
⁡
# θ
2

sin
2

⁡

θ
2

.

{\displaystyle \operatorname{versin}\theta = 2 \sin^2{\frac{\theta}{2}}. }

**Part 2**

Since the half-angle identity of tangent is

tan
⁡

θ
2

=

1
−
cos
⁡

θ

sin
⁡
θ

{\displaystyle \tan{\frac{\theta}{2}} = \frac{1-\cos{\theta}}{\sin \theta} }

, we get

versin
⁡
# θ
sin
⁡
θ
tan
⁡

θ
2

.

{\displaystyle \operatorname{versin}\theta = \sin\theta \tan \frac{\theta}{2}. }
Jiuzhang Suanshu Shaoguang 18

## **Problem**

答曰：六十步。

開圓術曰：置積步數，以十二乘之，以開方除之，即得周。

Answer: 60 *bu*.

Opening the circle method: Set the area in *bu*, multiply by 12, then extract the square root, which gives the circumference.

# A

π

d
2

4

{\displaystyle A = \frac{\pi d^2}{4} }

. Since the circumference of a circle with diameter

d

{\displaystyle d}

 is

# C
π
d

{\displaystyle C=\pi d }

, the area can be alternatively expressed as

# A

C
2

4
π

.

{\displaystyle A = \frac{C^2}{4\pi}. }

Solving for the circumference yields

# C

4
π
A

.

{\displaystyle C = \sqrt{4\pi A}. }

The original method described in the Jiuzhang Suanshu assumes

# π
3

{\displaystyle \pi = 3 }

; thus,

# C

12
A

.

{\displaystyle C = \sqrt{12 A}. }

Applying this formula yields

C

=

12
×
300

[
5
p
t
]

=

3600

[
5
p
t
]

=
60

{\displaystyle \begin{align}
C &= \sqrt{12 \times 300} \\ [5 pt]
&= \sqrt{3600} \\ [5 pt]
&= 60
\end{align} }

This explains why original text provided the answer 60 *bu.* A more accurate answer would be 61.4 *bu*.
EOC Lecture 1: Atomic Structure

**By: Tao Steven Zheng (郑涛)**

Chemistry is the study of the nature and bahaviour of matter. In chemistry, the **atom** represents the smallest unit of a chemical **element**. Within the atom, one finds even smaller subatomic particles called **protons**, **neutrons**, and **electrons**. The protons together with the neutrons form the **nucleus**, which resides at an atom's core. the electrons exist outside the nucleaus in specific regions of space called **orbitals**. All atoms of an element show similar chemical properties; thus, they cannot be further decomposed by chemical means. Further discussion of physical decomposition by non-chemical means can be found in nuclear chemistry.

## **Internal Structure of the Atom**

As mentioned above, three subatomic particles are commonly found inside an atom: protons, neutrons, and electrons.

**Protons** carry a positive charge (+1) and have a mass of 1.6726×10−27 kg. The **atomic number** (Z) of an element represents the number of protons found in the atom of a specific elelment. All atoms of a given element have the same atomic number. For example, all hydrogen atoms possess one proton. An atom with two protons cannot be called hydrogen because all atoms with two protons are helium atoms.

**Neutrons** carry no charge (0) and have a mass of 1.6749×10−27 kg. Unlike the proton, the number of neutrons does not determine the element. Different **isotopes** of one element have the same number of protons but different numbers of neutrons. The **mass number** of an atom or isotope is equal to the total number of protons and neutrons. The convention

X

Z
A

{\displaystyle \ce{^{A}\_{Z}X}}

 is used to show both the atomic number (Z) and the mass number (A) of an atom. For example,

Th

90
227

{\displaystyle \ce{^{227}\_{90}Th}}

 represents the thorium-227 isotope. Like all thorium isotopes, its atomic number is 90, but since its mass number is 227, the number of neutrons is 227 - 90 = 137.

**Electrons** carry one negative charge (-1) and posesses a tiny mass compared to protons and neutrons. The mass of an electron is 9.1094×10−31 kg, which makes it roughly 1/1837 the mass of a proton or a neutron. Hence, the electron mass is usually considered negligible. The electrons located furthest from the nucleus are called the **valence electrons**. The valence electrons are important to the discussion of chemical bonding and reactions because they are most easily influenced by other atoms. If the number of electrons matches the number of protons, then the atom is neutral. This is because the net charge on the atom is zero. Atoms that have gained or loss electrons are called **ions**. Positive ions, or **cations**, have fewer electrons than protons; thus, the net charge is positive. Negative ions, or **anions**, have more electrons than protons; thus, the net charge is negative.
Mass-Spring Oscillator

## **Problem**

The frequency of a mass on a spring is 0.5 Hz. Determine the displacement of the spring prior to oscillation.

# T
2
π

m
k

{\displaystyle T = 2\pi \sqrt{\frac{m}{k}} }

The diagram above is a free-body diagram at the moment of release. Treating upwards as the positive direction:

F

n
e
t

=
m
a

{\displaystyle {F}\_{net} = ma }

k
x
−
m
# g
m
(
0
)

{\displaystyle kx - mg = m(0) }

# k

m
g

x

{\displaystyle k = \frac{mg}{x} }

.
Thus

# 0.5
2
π

m

m
g

/

x

{\displaystyle 0.5 = 2 \pi \sqrt{\frac{m}{mg/x}} }

# 0.5
2
π

x
g

{\displaystyle 0.5 = 2 \pi \sqrt{\frac{x}{g}} }

.
Solving for

x

{\displaystyle x}

 yields

# x
g

(

T

2
π

)

2

{\displaystyle x = g \left(\frac{T}{2\pi}\right)^2 }

.
Therefore,

# x
9.81

(

0.5

2
π

)

2

{\displaystyle x = 9.81 \left(\frac{0.5}{2\pi}\right)^2 }

# x
0.062

m

{\displaystyle x = 0.062 \; m }

.
Harmonic Conjugates

## **Problem**

Consider the function

v
(
x
,
y
# )
x
y
−
x
y

{\displaystyle v(x,y) = x + y - xy }

.

**Part 1:** Show that

v
(
x
,
y
)

{\displaystyle v(x, y)}

 is harmonic.

**Part 2:** Find the harmonic conjugate

u
(
x
,
y
)

{\displaystyle u(x, y)}

 and determine

f
(
x
,
y
# )
u
(
x
,
y
)
i

v
(
x
,
y
)

{\displaystyle f(x,y) = u(x,y) + i\,v(x,y)}

.

## **Solution**

**Part 1**

Calculate the following partial derivatives:

v
x

=
1
−
y

v

x
x

=
0

v
y

=
1
−
x

v

y
y

=

{\displaystyle \begin{align} v\_x &= 1 - y \\
v\_{xx} &= 0 \\
v\_y &= 1 - x \\
v\_{yy} &= 0.
\end{align} }

Obviously

v

x
x

v

y
y

=
0

{\displaystyle v\_{xx} + v\_{yy} = 0 }

; therefore,

v
(
x
,
y
# )
x
y
−
x
y

{\displaystyle v(x,y) = x + y - xy }

 is harmonic.

**Part 2**

According to the Cauchy-Riemann equations,

u
x

=

v
y

{\displaystyle u\_x = v\_y}

 and

u
y

=
−

v
x

{\displaystyle u\_y=-v\_x}

.

Therefore,

u
x

=
1
−
x

{\displaystyle u\_x = 1 - x }

# u
∫
1
−
x

d
x

{\displaystyle u = \int 1-x \, dx }

# u
x
−

x
2

2

C
(
y
)

{\displaystyle u = x - \frac{x^2}{2} + C(y) }

and

u
y

=
y
−
1

{\displaystyle u\_y = y - 1 }

# u
∫
y
−
1

d
y

{\displaystyle u = \int y - 1 \, dy }

# u

y
2

2

−
y
C
(
x
)
.

{\displaystyle u = \frac{y^2}{2} - y + C(x). }

Subsequently,

u
(
x
,
y
# )
x
−
y

1
2

(

y
2

−

x
2

)

{\displaystyle u(x,y) = x - y + \frac{1}{2}(y^2 - x^2) }

and

f
(
x
,
y
# )
x
−
y

1
2

(

y
2

−

x
2

)
i
(
x
y
−
x
y
)
.

{\displaystyle f(x,y) = x - y + \frac{1}{2}(y^2 - x^2) + i(x + y - xy). }
Brahmagupta (ब्रह्मगुप्त)

**By: Tao Steven Zheng (郑涛)**

**Born:** c. 598 AD in Billamala

**Died:** c. 670 AD in Ujjain

**Brahmagupta** was an Indian mathematician and astronomer who made pivotal contributions to arithmetic, algebra, geometry, and the study of quadratic indeterminate equations. His works were of great importance to later Indian mathematicians who would draw from his discoveries to perfect the generalized solution of Pell's equation. Brahmagupta was also the first recorded mathematician to have demystified the properties of the number zero to its modern form.

## **Discoveries**

**Astronomical Theory**

Brahmagupta opposed the ancient Vedic astronomers who argued that the Sun is closer to the Earth than the moon.

**Zero**

In his magnum opus *Brahmasphutasiddhanta*, Brahmagupta was the first known mathematician to document on the arithmetic properties of zero as a number with its own merit. The concept of zero as a number may have been known in India prior to Brahmagupta. Radiocarbon dating of the *Bakhshali Manuscript* (which includes the symbol for zero) has revealed that parts of the document was written in the 4th century AD, the 7th century AD, and the 10th century AD.

Brahmagupta's Identity

**Approximation of Pi**

Brahmagupta used two approximations of pi:

# π
3

{\displaystyle \pi = 3 }

# π

10

{\displaystyle \pi = \sqrt{10} }

**Pell's Equation**

Brahmagupta solved certain quadratic indeterminate equations of the form

N

x
2

# 1

y
2

{\displaystyle Nx^2 + 1 = y^2}

, which is called Pell's equation in the West. Pell's equation was intensively studied in ancient India after Brahmagupta, and his contributions paved the road to the general solution by Bhaskara II in the 12th century AD.

**Cyclic Quadrilaterals**

Brahmagupta was famous for his studies on cyclic quadrilaterals. He discovered the formula for computing the area of a cyclic quadrilateral with sides

a
,
b
,
c
,
d

{\displaystyle a,b,c,d}

# A

s
(
s
−
a
)
(
s
−
b
)
(
s
−
c
)
(
s
−
d
)

{\displaystyle A = \sqrt{s(s-a)(s-b)(s-c)(s-d)} }

where

# s

a
b
c
d

2

{\displaystyle s = \frac{a+b+c+d}{2} }

 is the semi-perimeter.

He also discovered the property of orthodiagonal cyclic quadrilaterals, which is called the Brahmagupta theorem.
Lunes of Alhazen

## **Problem**

The Lunes of
Alhazen is an extension of an ancient Greek attempt to square the circle. Prove
that the sum of areas of lunes AC and BC is equal to the area of the triangle
ABC as shown below.

## **Solution**

Let

A
B

¯

=
c

{\displaystyle \overline{AB} = c }

A
C

¯

=
a

{\displaystyle \overline{AC} = a }

B
C

¯

=
b

{\displaystyle \overline{BC} = b }

Since triangle ABC is a right triangle,

a

2

b

2

=

c

2

{\displaystyle {a}^{2} + {b}^{2} = {c}^{2} }

, and its area is

a
b

2

{\displaystyle \frac{ab}{2}}

.

Let

X

{\displaystyle X}

 be the area of the lune AC, and

Y

{\displaystyle Y}

 be the area of lune BC.

X
# Y

1
2

π

(

a

2

4

)

1
2

π

(

b

2

4

)

−

[

1
2

π

(

c

2

4

)

−

a
b

2

]

{\displaystyle X + Y = \frac{1}{2} \pi \left(\frac{{a}^{2}}{4}\right) + \frac{1}{2} \pi \left(\frac{{b}^{2}}{4}\right) -
 \left[\frac{1}{2} \pi \left(\frac{{c}^{2}}{4}\right) - \frac{ab}{2}\right]}

X
# Y

1
2

π

(

a

2

b

2

−

c

2

4

)

a
b

2

{\displaystyle X + Y = \frac{1}{2} \pi \left(\frac{{a}^{2} + {b}^{2} - {c}^{2} }{4}\right) + \frac{ab}{2}}

Since

a

2

b

2

=

c

2

{\displaystyle {a}^{2} + {b}^{2} = {c}^{2} }

, the term

a

2

b

2

−

c

2

=
0

{\displaystyle {a}^{2} + {b}^{2} - {c}^{2} = 0 }

.

Therefore,

X
# Y

a
b

2

{\displaystyle X + Y = \frac{ab}{2}}

.
## **Historical Note**

The Lunes of Alhazen is an extension of the Lune of Hippocrates, where a single lune matches the area of a 45-90-45 triangle inside a circular quadrant.
2x2 Matrix Game Formula (Part 2)

This is a continuation of this problem: 2x2 Matrix Game Formula

## **Problem**

Let the payoff matrix of a 2 x 2 game be characterized by the matrix

A

=

[

a

b

c

d

]

{\displaystyle \mathbf{A} =
 \begin{bmatrix}
 a & b \\
 c & d \\
 \end{bmatrix}}

.
The value of the game was found to be

# v

det

(
A
)

S

{\displaystyle v = \frac{\det{(A)}}{S} }

, where

# S
(
a
d
)
−
(
b
c
)

{\displaystyle S = (a+d) - (b+c) }

 and

det

(
A
)

=
a
d
−
b
c

{\displaystyle \det{(A)} = ad - bc }

.

If any entry is not positive in the matrix

A

{\displaystyle A}

, one can add

λ

{\displaystyle \lambda}

 to each entry such that all entries are positive.

Suppose

A
1

=

[

α

β

γ

δ

]

{\displaystyle \mathbf{A\_1} =
 \begin{bmatrix}
 \alpha & \beta \\
 \gamma & \delta \\
 \end{bmatrix}}

where

# α
a
λ

{\displaystyle \alpha = a + \lambda }

,

# β
b
λ

{\displaystyle \beta = b + \lambda }

,

# γ
c
λ

{\displaystyle \gamma = c + \lambda }

, and

# δ
d
λ

{\displaystyle \delta = d + \lambda }

. Let

v

{\displaystyle v}

 be the value of the game

A

{\displaystyle A}

, and

v
1

{\displaystyle v\_1}

 be the value of the game

A
1

{\displaystyle A\_1}

. Show that

# v

v
1

−
λ

{\displaystyle v = v\_1 - \lambda }

.

## **Solution**

Following the solution from 2x2 Matrix Game Formula, the solutioon of

A
1

{\displaystyle A\_1}

 is

v
1

=

det

(

A
1

)

S
1

{\displaystyle v\_1 = \frac{\det{(A\_1)}}{S\_1} }

 where

S
1

=
(
α
δ
)
−
(
β
γ
)

{\displaystyle S\_1 = (\alpha + \delta) - (\beta + \gamma) }

 and

det

(

A
1

)

=
α
δ
−
β
γ

{\displaystyle \det{(A\_1)} = \alpha \delta - \beta \gamma }

.

Consequently,

v
1

=

α
δ
−
β
γ

(
α
δ
)
−
(
β
γ
)

{\displaystyle v\_1 = \frac{\alpha \delta - \beta \gamma}{(\alpha + \delta) - (\beta + \gamma)} }

v
1

=

(
a
λ
)
(
d
λ
)
−
(
b
λ
)
(
c
λ
)

(
a
d
2
λ
)
−
(
b
c
2
λ
)

{\displaystyle v\_1 = \frac{(a + \lambda)(d + \lambda) - (b + \lambda)(c + \lambda)}{(a + d + 2\lambda) - (b + c + 2\lambda)} }

v
1

=

a
d
(
a
d
)
λ

λ

2

−
[
b
c
(
b
c
)
λ

λ

2

]

(
a
d
)
−
(
b
c
)

{\displaystyle v\_1 = \frac{ad + (a+d)\lambda + {\lambda}^{2} - [bc + (b+c)\lambda + {\lambda}^{2}]}{(a + d) - (b + c)} }

v
1

=

a
d
−
b
c

(
a
d
)
−
(
b
c
)

(
a
d
)
λ
−
(
b
c
)
λ

(
a
d
)
−
(
b
c
)

{\displaystyle v\_1 = \frac{ad-bc}{(a + d) - (b + c)} + \frac{(a+d)\lambda - (b+c)\lambda}{(a + d) - (b + c)} }

v
1

=

det

(
A
)

S

λ

{\displaystyle v\_1 = \frac{\det{(A)}}{S} + \lambda }

.
Since

# v

det

(
A
)

S

{\displaystyle v = \frac{\det{(A)}}{S} }

, it follows that

v
1

=
v
λ

{\displaystyle v\_1 = v + \lambda }

and

# v

v
1

−
λ

{\displaystyle v = v\_1 - \lambda }

.