```python
import sympy
from  sympy import symbols, sqrt
sympy.init_printing()
```


```python
rho, kappa, r =  symbols('rho kappa r')
```


```python
z = rho ** 2/(r*(1 + sqrt(1 - kappa*(rho/r) ** 2)))
z
```


```python
z.diff(rho).expand().simplify().subs(kappa, 1)
```


```python
zs = z.radsimp()
zs
```


```python
zs.diff(rho)
```

1710a7852b5c447f7227d4b1f80b11a18572c480
ipynb
Jupyter Notebook
notes/zemax_conic.ipynb
draustin/otk
c6e91423ec79b85b380ee9385f6d27c91f92503d
MIT
2020-05-17T14:26:42.000Z
2022-02-14T04:52:54.000Z
notes/zemax_conic.ipynb
uamhforever/otk
c6e91423ec79b85b380ee9385f6d27c91f92503d
MIT
2020-04-10T22:50:00.000Z
2020-06-18T04:54:19.000Z
notes/zemax_conic.ipynb
uamhforever/otk
c6e91423ec79b85b380ee9385f6d27c91f92503d
MIT
2022-02-14T04:52:45.000Z
2022-02-14T04:52:45.000Z
Qwen/Qwen-72B
1. YES
2. YES