The general trajectory of a one-dimensional simple harmonic oscillator for Fspr = −kz can be expressed as z(t) = A cos(ω0t + δ) , where ω0 = k/m is the angular frequency and the constants, A and δ, are determined by the initial conditions. If we add a small drag force, Fr = −γz ̇, the amplitude of the oscillation, A, will obviously decrease. Thus, a reasonable ansatz (i.e., educated guess) for the trajectory is $$z(t) = A(1 + βf(t)) \cos(ω_0t + δ)$$ , where f(t) is a function of time satisfying the initial condition, f(0) = 0.
So part 1 was to find f(t) such that that function satisfies the equation of motion, to the first order B = $\gamma$/2m. I did that and found that f(t) = -t, which i know is right.
So now the function is $$z(t) = A(1 - βt) \cos(ω_0t + δ)$$, and I was tasked with finding the total energy $$E = \frac{m}{2}z'^2+\frac{k}{2}z^2 = \frac{m}{2}[z^2+w_o^2z'^2]$$ and the work done by drag $$ W_r = \int_0^tF_rz'dt = \int_0^t(-\gamma z')z'dt$$ and then show how the two are related.
When i solve for the energy i get $$E = A^2mw_o[\frac{w_o}{2} - w_0Bt - B\sin(w_0t + \delta)\cos(w_0t+\delta)]$$ and when i solve for the work done i get $$ W_r =A^2mw_o[- w_0Bt - B\sin(w_0t + \delta)\cos(w_0t+\delta) +B\sin(2\delta)] $$
but I think E + $W_r$ should equal to $\frac{1}{2}kA^2 = \frac{1}{2}A^2mw_o^2$, since that would be the total energy in the system at the beginning (potential at max extension), which means one of the equations is wrong...