Redefine the initial value
problem so that w = k, that is, so the system is being driven at
its natural frequency:
y'' + k2 y = F0 cos kt, y(0) = 0, y'(0)
= 0.
Find the symbolic solution of this initial value problem. You may use your
helper application.