```python
%matplotlib inline
import matplotlib.pyplot as plt
import scipy.integrate
import pandas as pd
import numpy as np
import sympy
```

$\frac{dn_{H}}{dt} = k_2n_{H^+}n_{e^-} - k_1n_{H}$

$\frac{dn_{H^+}}{dt} = k_1n_{H} - k_2n_{H^+}n_{e^-}$


```python
k1, k2, nHI, nHII, ne = sympy.sympify('k1, k2, nHI, nHII, ne')
```


```python
eq1 = k2 * nHII * ne - k1 * nHI
eq2 = k1 * nHI - k2*nHII*ne
```


```python
sympy.solve([eq1, eq2], [nHI])
```




    {nHI: k2*nHII*ne/k1}



$\frac{dn_{HeI}}{dt} = k_6 n_{HeII} n_{e} - k_3 n_{HeI}$

$\frac{dn_{HeII}}{dt} = k_3 n_{HeI} + k_5 n_{HeIII} n_{e} - k_4 n_{HeII} - k_6 n_{HeII} n_{e}$

$\frac{dn_{HeIII}}{dt} = k_4 n_{HeII} - k_5 n_{HeIII} n_{e}$


```python

```

d9a1785e7afd52d4c51966af4e803a3233b6814f
ipynb
Jupyter Notebook
week12/examples_week12_1.ipynb
MatthewTurk/astr496-spr2018
382ed6910a81a22b6f30967a075e15cd5d6f7adf
BSD-3-Clause
2018-01-16T17:27:28.000Z
2018-03-01T18:26:32.000Z
week12/examples_week12_1.ipynb
MatthewTurk/astr496-spr2018
382ed6910a81a22b6f30967a075e15cd5d6f7adf
BSD-3-Clause
2018-02-19T21:32:07.000Z
2018-02-20T21:03:45.000Z
week12/examples_week12_1.ipynb
MatthewTurk/astr496-spr2018
382ed6910a81a22b6f30967a075e15cd5d6f7adf
BSD-3-Clause
2018-02-12T01:18:41.000Z
2018-02-19T19:01:14.000Z
Qwen/Qwen-72B
1. YES
2. YES