The solution is also obtainable with a graphing calculator. Let f be f and q be q. Suppose that you calculate f as follows:
f = p - sin-1( r/L sin(q)).
IMPORTANT: Calculators return a value of arcsin between -90 and +90 degrees. Our values of interest lie between about 150 and 210 degrees. Therefore the adjustment must be made as shown.
Given next are the functions to be loaded.
Input := e1 = Sin[f[t]] L == Sin[q[t]] r
Output = L Sin[f[t]] == r Sin[q[t]]
Input := e2 = D[e1,t] /. q'[t] -> w
Output = L Cos[f[t]] f'[t] == r w Cos[q[t]]
Input := s2 = Solve[e2,f'[t]][[1,1]]
Output =
r w Cos[q[t]] Sec[f[t]]
f'[t] -> -----------------------
L
Input := e3 = D[e2,t]
Output =
2
-(L Sin[f[t]] f'[t] ) + L Cos[f[t]] f''[t] ==
-(r w Sin[q[t]] q'[t])
Input := s3 = Solve[e3,f''[t]][[1,1]]
Output =
f''[t] -> -(
2
Sec[f[t]] (-(L Sin[f[t]] f'[t] ) + r w Sin[q[t]] q'[t])
-------------------------------------------------------)
L
Input := e4 = X[t] == r Cos[w t] + L Cos[ f[t] ]
Output = X[t] == r Cos[t w] + L Cos[f[t]]
Input := e5 = D[e4,t]
Output = X'[t] == -(r w Sin[t w]) - L Sin[f[t]] f'[t]
Input := e6 = D[e5,t]
Output =
2 2
X''[t] == -(r w Cos[t w]) - L Cos[f[t]] f'[t] -
L Sin[f[t]] f''[t]