Step 1 :The given differential equation is a non-homogeneous second order differential equation with a cosine forcing function. We can solve it using the method of undetermined coefficients.
Step 2 :The homogeneous solution of the equation is given by the characteristic equation: \(r^2 + 4 = 0\), which gives \(r = \pm2i\). So, the homogeneous solution is: \(x_h(t) = C1 \cos(2t) + C2 \sin(2t)\).
Step 3 :For the particular solution, we guess a solution of the form: \(x_p(t) = A \cos(4t) + B \sin(4t)\).
Step 4 :Substituting this into the differential equation gives: \(-16A \cos(4t) - 16B \sin(4t) + 4A \cos(4t) + 4B \sin(4t) = 12 \cos(4t)\).
Step 5 :Simplifying gives: \(-12A \cos(4t) - 12B \sin(4t) = 12 \cos(4t)\). Comparing coefficients gives A = -1 and B = 0. So, the particular solution is: \(x_p(t) = - \cos(4t)\).
Step 6 :The general solution is the sum of the homogeneous and particular solutions: \(x(t) = C1 \cos(2t) + C2 \sin(2t) - \cos(4t)\).
Step 7 :Using the initial conditions \(x(0) = 0\) and \(x'(0) = 0\), we find \(C1 = 0\) and \(C2 = 0\). So, the solution is: \(x(t) = - \cos(4t)\).
Step 8 :For the system to be in resonance, the natural frequency of the system must equal the frequency of the forcing function. The natural frequency is given by \(\sqrt{k/m}\), where k is the spring constant and m is the mass. The frequency of the forcing function is 4 (from the \(\cos(4t)\) term).
Step 9 :Setting these equal gives: \(\sqrt{k/m} = 4\). Solving for m gives: \(m = k / 16\).
Step 10 :Since the spring constant k is 4 (from the \(x'' + 4x = 0\) part of the differential equation), the mass m must be: \(m = 4 / 16 = 0.25 \, kg\). \(\boxed{m = 0.25 \, kg}\)