Jacobian Determinant Part 2
---------------------------
For mapping $F: [0,1] \times [-1,1] -> S_2$


```python
from sympy import *
import sympy
print(sympy.__version__)
```


```python
from IPython.display import display
```


```python
import numpy as np
```


```python
u, v = Symbol('u'), Symbol('v')
```


```python
rx = sympy.cos(u*sympy.pi*2)
ry = sympy.sin(u*sympy.pi*2)
r = sympy.sqrt(1 - v*v)
x = rx*r
y = ry*r
z = v
```


```python
display(x,y,z)
```


```python
DF = np.zeros((3,2), np.object)
for i, a in enumerate([x, y, z]):
    for j, b in enumerate([u, v]):
        DF[i,j] = simplify(diff(a, b))
DF = Matrix(DF)
DF
```


```python
DF.T
```


```python
J = sqrt((DF.T*DF).det())
```


```python
J
```


```python
J = simplify(J) # WTF
J # As expected though, J is constant
```


```python
# Now for the affine trafo from [0, 1] -> [-1, 1]
# DF = diag(2)
# -> DF.T*DF = diag(4)
# -> sqrt(DF.T*DF).det() = 4
```

8ee58d19f702fdf2c82434537a0cf0e7135986ca
ipynb
Jupyter Notebook
misc/IntegrationOnManifoldsSympyNo2.ipynb
DaWelter/NaiveTrace
a904785a0e13c394b2c221bc918cddb41bc8b175
FSFAP
2018-04-25T08:14:14.000Z
2022-01-29T06:19:16.000Z
misc/IntegrationOnManifoldsSympyNo2.ipynb
DaWelter/NaiveTrace
a904785a0e13c394b2c221bc918cddb41bc8b175
FSFAP
misc/IntegrationOnManifoldsSympyNo2.ipynb
DaWelter/NaiveTrace
a904785a0e13c394b2c221bc918cddb41bc8b175
FSFAP
Qwen/Qwen-72B
1. YES
2. YES