<jupyter_start><jupyter_text>First ExampleA football is kicked with an angle of 30 degrees with the ground. The mass of the ball is 0.43 kg. Consider the gravitational acceleration as 9.81 m/s$^2$. The initial speed of the ball is 30 m/s and the initial height is 0 m. Find the motion of the ball. The free-body diagram of the ball is depicted below:  An example a little bit more complex  Now, besides the gravity, we consider the air resistance ($b$ = 0.006 Ns/m). First we will consider the air resistance  proportional to the speed and opposite direction of the velocity vector.<jupyter_code>dt = 0.01

m = 0.43
b = 0.006

x0 = 0
y0 = 0
vx0 = 15*np.sqrt(3)
vy0 = 15

x = x0
y = y0
vx = vx0
vy = vy0

rx = np.array([])
ry = np.array([])

rx = np.append(rx,x)
ry = np.append(ry,y)

for i in t:
    dvxdt = -b/m*vx
    dxdt = vx
    dvydt = -b/m*vy -g
    dydt = vy

    x = x + dt*dxdt
    y = y + dt*dydt
    vx = vx + dt*dvxdt
    vy = vy + dt*dvydt
    
    rx = np.append(rx, x)
    ry = np.append(ry, y)
plt.figure()
plt.plot(rx,ry)
plt.ylim(0,13)
plt.xlim(0,85)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11441441441441441, 'fraction_numerical': 0.04234234234234234, 'mean_word_length': 2.9537366548042705, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '365355', 'license': 'MIT', 'n_tokens_mistral': 471, 'n_tokens_neox': 429, 'n_words': 162, 'path': 'courses/modsim2018/renatowatanabe/Untitled2.ipynb', 'repo_name': 'Calima94/bmc', 'size': '1110'}