```python
import sympy as sp
```


```python
val = 5
x,y = sp.symbols('x y')
```


```python
eq1 = sp.Eq(5*x + 5*y -7, 0)
eq2 = sp.Eq(6*x - 6*y - 9, 0)
display(sp.solve(eq1,x))
display(sp.solve(eq2,y))
```


    [7/5 - y]



    [x - 3/2]



```python
sp.solve((eq1,eq2),(x,y))
```




    {x: 29/20, y: -1/20}




```python
sp.solve((eq1,eq2),(x,y))[x]
sp.solve((eq1,eq2),(x,y))[y]
```




$\displaystyle - \frac{1}{20}$




```python
D,V,rho = sp.symbols('D,V_m, rho')
V
```




$\displaystyle V_{m}$




```python
f = sp.Function('f')
ode = D * f(x).diff(x,2) - V * rho
sp.Eq(ode,0)
```




$\displaystyle D \frac{d^{2}}{d x^{2}} f{\left(x \right)} - V_{m} \rho = 0$




```python
sp.dsolve(sp.Eq(ode,0))
```




$\displaystyle f{\left(x \right)} = C_{1} + C_{2} x + \frac{V_{m} \rho x^{2}}{2 D}$



# https://www.youtube.com/watch?v=MXUMJMrX2Gw



```python
import scipy as scp
import scipy.integrate as si 
import numpy as np
import matplotlib.pyplot as plt

def odes(x,t):
    a1 = 3e5
    a2 = 0.2
    a3 = 4e-7
    a4 = 0.6
    a5 = 8
    a6 = 90
    
    A = x[0]
    B = x[1]
    C = x[2]
    
    dAdt = a1 - a2*A - a3*A*C
    dBdt = a3*A*C - a4*B
    dCdt = -a3*A*C - a5*C + a6*B
    
    return [dAdt, dBdt, dCdt]

x0 = [2e6, 0, 90]

t = np.linspace(0,15,1000)
x = si.odeint(odes,x0,t)

A = x[:,0]
B = x[:,1]
C = x[:,2]

plt.semilogy(t,A)
plt.semilogy(t,B)
plt.semilogy(t,C)
plt.show()
```


```python

```


```python

```

5f4d28a3a968eb09ff975fdcea1996d2241a70e6
ipynb
Jupyter Notebook
python/matplotlib/Scipy/Eq.ipynb
karng87/nasm_game
a97fdb09459efffc561d2122058c348c93f1dc87
MIT
python/matplotlib/Scipy/Eq.ipynb
karng87/nasm_game
a97fdb09459efffc561d2122058c348c93f1dc87
MIT
python/matplotlib/Scipy/Eq.ipynb
karng87/nasm_game
a97fdb09459efffc561d2122058c348c93f1dc87
MIT
Qwen/Qwen-72B
1. YES
2. YES