velocity vs time on a roller coaster from t (0,16)s

 v(t) = \frac{-1m}{15{s^4}}{t^3} + \frac{8m}{5{s^3}}{t^2}   (blue curve)
 a(t)  = \frac{dv}{dt} = \dot{v}(t) = \frac{-1m}{5{s^4}}{t^2} + \frac{16m}{5{s^3}}t   (orange curve)

Find maximum

0 = \ddot{a}(t_m) = \frac{-2m}{5{s^4}}t_m + \frac{16m}{5{s^3}} >>> t_m = 8s  
(max  acceleration) = \frac{-1m}{5{s^4}}{(8s)^2} + \frac{16m}{5{s^3}}8s >>>> 12.8 \frac{m}{s^2}

Maximum acceleration is greater than 1g

import matplotlib.pyplot as plt
import numpy as np

# 1. Define the x-range (e.g., from -2 to 2 with 100 points)
x = np.linspace(0, 16, 1000)

# 2. Calculate the y-values using the equation (y = x**2)
A = - 1 /15
B = 8 / 5
y = A * pow(x, 3) + B * pow(x, 2)
# first div of y os acceleration curve
y2 = 3 * A * pow(x, 2) + 2 * B * x
# seocnd div of y is max of x

xmax = (-2 * B) / (6 * A)
ymax = (3 * A * pow(xmax, 2)) + ( 2 * B * xmax)
label_text = f"The max value at ({xmax}, {ymax}) "

# 3. Plot the data
plt.figure(figsize=(8, 6)) # Optional: adjust plot size
plt.plot(x, y)
plt.plot(x, y2)
plt.text (xmax, ymax+2, label_text)
# 4. Add customizations
plt.xlabel("X-axis: seconds")
plt.ylabel("Y-axis: m/s (blue) and m/s^2 (orange)")
plt.legend() # Show the legend
plt.grid(True) # Add a grid

# 5. Display the plot
plt.show()
 y(t) = \int v(t) =\int \frac{-1m}{15{s^4}}{t^3} + \int \frac{8m}{5{s^3}}{t^2}  = \frac{-1m}{60{s^4}}{t^4} + \frac{8m}{15{s^3}}{t^3} 
import matplotlib.pyplot as plt2
import numpy as np

# 1. Define the x-range (e.g., from 0 to 16 with 1000 points)
x = np.linspace(0, 16, 1000)

# 2. Calculate the y-values using the equation (y = x**2)
A = - 1 /15
B = 8 / 5
y = A / 4 * pow(x, 4) + B / 3 * pow(x, 3)
ymax = A / 4 * pow(16, 4) + B / 3 * pow(16, 3)
y_label = "m"
y2_label = f"{ymax:.2f} "

# 3. Plot the data
plt2.figure(figsize=(8, 6)) # Optional: adjust plot size
plt2.plot(x, y)
# 4. Add customizations
plt2.xlabel("X-axis: seconds")
plt2.ylabel("Y-axis: m (blue)")
plt2.legend() # Show the legend
plt2.grid(True) # Add a grid
plt2.text(12,1000, y2_label)
plt2.text(14,1000, y_label)
# 5. Display the plot
plt2.show()