Hello I would like to use this equation (nonlinear pendulum) to calculate the gravitational constant.
I mananaged to find a way how to calculate the period of the pendulum by using the following code:
g=9.81
L=0.78
y=.
y=First[y/.NDSolve[{y''[t]==-(g/L)*Sin[y[t]],y[0]==30*Pi/180,y'[0]==0},y,{t,0,10}]]
Plot[y[t],{t,0,10}]
FindMaximum[y[t],{t,1.7,2.5}]
But I would need it the other way. So that I can calculate the gravitational constant. Any help is appreciated!