The cam is rotating with angular velocity omega and angular
Solution
The acceleration of the rod is given by,
m double dot x + k*x = F cos (omega *t)
eliminate double dot x,
double dot x = F cos (omega*t) - k*x / m ----- eqn1
Since the rod is rolling over a cam of constant acceleration,
F cos (omega*t) = m * alpha, where alpha is the angular acceleration.
F cos (omega*t) = m * r^2 * omega, where omega could be represented as v/r.
So, the periodic input becomes simply,
F cos (omega*t) = m * v * r ------ the conservation of angular momentum
Replace the periodic input in the spring-mass system,
double dot x = m * v * r - k * x / m ------ eqn 2
double dot x (acceleration) = m * dot x * r - k * x / m where k/m is the nautal frequency, omega (n).
The acceleration, a is m * dot x * r - omega (n)^2 * x
Integrate eqn2 once to find the velocity,
dot x = m * x * r - k/m * x^2 / 2
dot x (velocity) = m * x * r - omega(n) * x^2 / 2 --- where omega (n) is the natural frequency
