Step 1: Understanding the Concept:
The general solution of a linear non-homogeneous second-order differential equation is the sum of the complementary function (\(y_c\)), which is the solution to the homogeneous equation, and a particular integral (\(y_p\)), which is any solution to the non-homogeneous equation.
Step 2: Key Formula or Approach:
1. Find the Complementary Function (\(y_c\)): Solve the auxiliary equation of \(y'' + 9y = 0\).
2. Find the Particular Integral (\(y_p\)): Use the method of undetermined coefficients or the operator method. Since the forcing term \(\cos(3x)\) is part of the complementary function, this is a case of resonance.
Step 3: Detailed Explanation:
1. Find \(y_c\):
The homogeneous equation is \(y'' + 9y = 0\).
The auxiliary equation is \(m^2 + 9 = 0 \implies m^2 = -9 \implies m = \pm 3i\).
The complementary function is \(y_c = C_1\cos(3x) + C_2\sin(3x)\).
2. Find \(y_p\):
The forcing term is \(\cos(3x)\), which appears in \(y_c\). This is the case of resonance.
We use the operator method for the particular integral:
\[ y_p = \frac{1}{D^2+9} \cos(3x) \]
Since substituting \(D^2 = -a^2 = -3^2 = -9\) makes the denominator zero, we use the resonance formula:
\[ \frac{1}{D^2+a^2} \cos(ax) = \frac{x}{2a} \sin(ax) \]
Here, \(a=3\).
\[ y_p = \frac{x}{2(3)} \sin(3x) = \frac{x}{6}\sin(3x) \]
3. Combine to form the general solution:
The general solution is \(y = y_c + y_p\).
\[ y(x) = C_1\cos(3x) + C_2\sin(3x) + \frac{x}{6}\sin(3x) \]
Step 4: Final Answer:
The general solution is \( y(x) = C_1\cos(3x) + C_2\sin(3x) + \frac{x}{6}\sin(3x) \), which matches option (B).