I want to solve a second order differential equation with GEKKO. In the documentation there is only an example that shows you how to solve a first order equation. I can't figure out how to write the second derivative of y to make it work.
This is the example from the documentation for a first order differential equation.
from gekko import GEKKO
import numpy as np
import matplotlib.pyplot as plt
m = GEKKO()
m.time = np.linspace(0,20,100)
k = 10
y = m.Var(value=5.0)
t = m.Param(value=m.time)
m.Equation(k*y.dt()==-t*y)
m.options.IMODE = 4
m.solve(disp=False)
plt.plot(m.time,y.value)
plt.xlabel('time')
plt.ylabel('y')
plt.show()