#### 水瓶速度範圍推導 (影片補充
# 基科水瓶速度推導
探求水瓶速度合理的範圍
Steps
---
- **用座標旋轉找出質心座標**
- **算出力矩**
- **旋轉到臨界狀況的旋轉角度**
- **代入 W^2 = w0^2 + 2 a s**
###### tags: `基科` `Book`









將上述式子帶入程式
```python=
import matplotlib.pyplot as plt
import numpy as np
H = 0.21 # 瓶子的高度
f = 2/3 # 水的比例
W = 0.06 # 裝滿水的質量
g = 9.8 # 重力常數
theta = np.linspace(0, np.pi/3, 200) # 水瓶和桌面之見的角度
r = 0.03 # 瓶子底部的半徑
u = 0.25 # 摩擦係數
cot_theta = (1 + np.tan(theta) * u)/(np.tan(theta) - u)
xm = ((2/3) * (r**3) * cot_theta - f * W * r)/(f * W)
ym = ((1/2) * (r**4) * (cot_theta**2) + (1/4) * (f**2) * (W**2))/ (f * W * r)
x_ = np.cos(theta) * xm - np.sin(theta) * ym
y_ = np.sin(theta) * xm + np.cos(theta) * ym
v_square = 2 * g * x_* (-1) * np.arcsin((x_)/ np.sqrt((x_)**2 + (y_)**2)) * (H**2 + 4 * (r**2))
fig = plt.figure(figsize = (12, 7))
plt.plot(theta, v_square, alpha = 0.4, label ='Velocity vs. theta',
color ='red', linestyle ='dashed',
linewidth = 2, marker ='D',
markersize = 5, markerfacecolor ='blue',
markeredgecolor ='blue')
plt.title("the range of velocity's square")
plt.xlabel('theta (Θ) ')
plt.ylabel("velocity's square (m^2/s^2)")
plt.grid(alpha =.6, linestyle ='--')
plt.legend()
plt.show()
```
而結果如下圖

很奇怪的是,v平方不應是負的?... 那到底問題出在哪?