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


```python
K,L,r,w,p,T = symbols('K L r w p T',
                  real=True,
                  positive=True,
                  finite=True)

production = T * K * L
cost = r*K + w*L**2
profit = p * production - cost
profit
```


```python
DK = profit.diff(K)
DL = profit.diff(L)

DK, DL
```


```python
A = Matrix([
    [0, T*p],
    [T*p, -2*w]
])

b = Matrix([
    [r],
    [0]
])

A, b
```


```python
d = A.det()
d
```

Assume that $p >0$.


```python
Ainv = A.inv()
Ainv
```


```python
sol = solve([DK, DL], [K, L], dict=True)
sol
```


```python
Hessian = Matrix([
    [DK.diff(K), DK.diff(L)],
    [DL.diff(K), DL.diff(L)]
])
Hessian
```


```python
# What is the rank of the matrix A?
A.rank()
```


```python

```

faa1a83889e1a9b508086f497b6df7ad34b05361
ipynb
Jupyter Notebook
assets/pdfs/math_bootcamp/final2017/problem_2.ipynb
joepatten/joepatten.github.io
4b9acc8720f3a33337368fee719902b54a6f2f68
MIT
assets/pdfs/math_bootcamp/final2017/problem_2.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_2.ipynb
joepatten/joepatten.github.io
4b9acc8720f3a33337368fee719902b54a6f2f68
MIT
Qwen/Qwen-72B
1. YES
2. YES