```python
import sympy
sympy.init_printing()

u_max,u_star,rho_max,rho_star,A,B=sympy.symbols('u_max u_star rho_max rho_star A B')
```


```python
eq1=sympy.Eq(0,u_max*rho_max*(1-A*rho_max-B*rho_max**2))
eq2=sympy.Eq(0,u_max*(1 - 2*A*rho_star-3*B*rho_star**2))
eq3=sympy.Eq(u_star,u_max*(1-A*rho_star-B*rho_star**2))
eq4=sympy.Eq(eq2.lhs-3*eq3.lhs,eq2.rhs-3*eq3.rhs)

rho_sol=sympy.solve(eq4,rho_star)[0]
B_sol=sympy.solve(eq1,B)[0]
quadA=eq2.subs([(rho_star,rho_sol),(B,B_sol)])
A_sol=sympy.solve(quadA,A)
```


```python
aval=A_sol[0].evalf(subs={u_star: 1.5,u_max:2.0,rho_max:15.0})
bval=B_sol.evalf(subs={rho_max:15.0,A:aval})
```


```python
aval
```


```python
bval
```


```python
sympy.init_printing(use_latex=False)
u_max=2.0
rho_max=15.0
u_star=1.5
rho_star_1=-12.6369
rho_star_2=6.32057

```




    0.0




```python

```


```python

```

40c26187845a52581a0f142529c04791f005a8f7
ipynb
Jupyter Notebook
ASSIGNMENTS/module_03_wave/module_3_extras.ipynb
nbatista0630/batista--numerical-mooc
fa3ae1bc698bbe66914300f424bde5a4a8625d51
CC-BY-3.0
ASSIGNMENTS/module_03_wave/module_3_extras.ipynb
nbatista0630/batista--numerical-mooc
fa3ae1bc698bbe66914300f424bde5a4a8625d51
CC-BY-3.0
2015-10-05T23:25:30.000Z
2015-10-14T00:59:36.000Z
ASSIGNMENTS/module_03_wave/module_3_extras.ipynb
nbatista0630/batista--numerical-mooc
fa3ae1bc698bbe66914300f424bde5a4a8625d51
CC-BY-3.0
Qwen/Qwen-72B
1. YES
2. YES