```python
from sympy import *
init_printing()
```


```python
q1, q2, q3 = symbols('q_1 q_2 q_3',
                     real=True,
                     positive=True,
                     finite=True)

# Define payoff functions for solvable system
payoff1 = Rational(1,4)*(q1**2) - q1 * q2 + Rational(1,3) * q1 * q3
payoff2 = Rational(1,4) * q1 - Rational(1,4)*q2**2 + q2 * q3
payoff3 = Rational(1,8) * q3 * (q1 + q2) - q3

# Define payoff functions for unsolvable system
# payoff1_ns
# payoff2_ns
# payoff3_ns

payoff1, payoff2, payoff3
```


```python
D1 = payoff1.diff(q1)
D2 = payoff2.diff(q2)
D3 = payoff3.diff(q3)
D = [D1, D2, D3]
D1, D2, D3
```


```python
# Solve the FOC system
solve([D1, D2, D3], [q1, q2, q3], dict=True)
```


```python
A = Matrix([
    [Rational(1,2), -1, Rational(1,3)],
    [0, -Rational(1,2), 1],
    [Rational(1,8), Rational(1,8), 0]
])
A
b = Matrix([[0],
            [0],
            [1]])
            
A, b
```


```python
A.rref()
```


```python
A.inv()
```


```python
A.det()
```


```python
A.inv() * b
```

75bb7dd2a8d77f06dab8965ce111b0a1dc2ef71e
ipynb
Jupyter Notebook
assets/pdfs/math_bootcamp/final2017/problem_1.ipynb
joepatten/joepatten.github.io
4b9acc8720f3a33337368fee719902b54a6f2f68
MIT
assets/pdfs/math_bootcamp/final2017/problem_1.ipynb
joepatten/joepatten.github.io
4b9acc8720f3a33337368fee719902b54a6f2f68
MIT
2020-08-09T16:28:31.000Z
2020-08-10T14:48:57.000Z
assets/pdfs/math_bootcamp/final2017/problem_1.ipynb
joepatten/joepatten.github.io
4b9acc8720f3a33337368fee719902b54a6f2f68
MIT
Qwen/Qwen-72B
1. YES
2. YES