```python
import sympy
sympy.init_printing()
## constants
stages = 3
```


```python
s = sympy.Symbol('s')
x = sympy.Symbol('x')
cf1, rf1, cc1, rc1 = sympy.symbols(r"C_f1, R_f1, C_c1, R_c1")
cf2, rf2, cc2, rc2 = sympy.symbols(r"C_f2, R_f2, C_c2, R_c2")
cf3, rf3, cc3, rc3 = sympy.symbols(r"C_f3, R_f3, C_c3, R_c3")
CauerVector = sympy.Matrix([[cc1, rc1],[cc2, rc2],[cc3, rc3]])

## enter FosterVector value manually.
FosterVector = sympy.ones(stages,2);FosterVector[1,1]=2;FosterVector[2,1]=3

ZfVector = sympy.zeros(stages,1)
Zfall = 0
```


```python
CauerVector
```


```python
FosterVector
```


```python
for i in range(3):
    ZfVector[i] = 1/(s*FosterVector[i,0] + 1/FosterVector[i,1])
    Zfall += ZfVector[i]
ZfVector, Zfall
```


```python
Zfall=Zfall.cancel()
```


```python
(pf, qf) = sympy.fraction(Zfall)
pf = sympy.Poly(pf,s)
qf = sympy.Poly(qf,s)
```


```python
cc3 = qf.nth(3)/pf.nth(2)
```


```python
Yfall = (1/Zfall - cc3*s).cancel()
(qf, pf) = sympy.fraction(Yfall)
qf = sympy.Poly(qf, s)
pf = sympy.Poly(pf, s)
```


```python
rc3 = pf.nth(2)/qf.nth(2)
```


```python
Zfall = (1/Yfall - rc3).cancel()
(pf, qf) = sympy.fraction(Zfall)
qf = sympy.Poly(qf, s)
pf = sympy.Poly(pf, s)
```


```python
cc2 = qf.nth(2)/pf.nth(1)
```


```python
Yfall = (1/Zfall - cc2 * s).cancel()
(qf, pf) = sympy.fraction(Yfall)
qf = sympy.Poly(qf, s)
pf = sympy.Poly(pf, s)
```


```python
rc2 = pf.nth(1)/qf.nth(1)
```


```python
Zfall = (1/Yfall  - rc2).cancel()
(pf, qf) = sympy.fraction(Zfall)
qf = sympy.Poly(qf, s)
pf = sympy.Poly(pf, s)
```


```python
cc1 = qf.nth(1)/pf.nth(0)
```


```python
Yfall = (1/Zfall - cc1 * s).cancel()
(qf, pf) = sympy.fraction(Yfall)
qf = sympy.Poly(qf, s)
pf = sympy.Poly(pf, s)
```


```python
rc1 = pf.nth(0)/qf.nth(0)
```


```python
rc3+rc2+rc1
```


```python

```

9defe915f02cb8fa3d74b5a015b66c935fbd1879
ipynb
Jupyter Notebook
ref/20190504_Foster2Cauer3rdOrder_MatrixCalc_recursive_pre.ipynb
thara3/FosterCauer_CauerFoster
3c63fa5e61e1386158808674ed227484c3850b06
MIT
ref/20190504_Foster2Cauer3rdOrder_MatrixCalc_recursive_pre.ipynb
thara3/FosterCauer_CauerFoster
3c63fa5e61e1386158808674ed227484c3850b06
MIT
ref/20190504_Foster2Cauer3rdOrder_MatrixCalc_recursive_pre.ipynb
thara3/FosterCauer_CauerFoster
3c63fa5e61e1386158808674ed227484c3850b06
MIT
Qwen/Qwen-72B
1. YES
2. YES