1. General Rule for Trigonometric P.I.: For an equation of the form $f(D)y = \cos(ax)$ or $f(D)y = \sin(ax)$, where $f(D)$ is a polynomial in the differential operator $D$, the standard rule is to replace $D^2$ with $-a^2$.
2. Mathematical Expression: The particular integral is given by:
$$P.I. = \frac{1}{f(D^2)} \cos ax$$
Applying the substitution $D^2 \to -a^2$:
$$P.I. = \frac{1}{f(-a^2)} \cos ax$$
3. The Condition of Validity: This substitution is only valid if the denominator does not become zero. If $f(-a^2) = 0$, the formula results in division by zero, which is undefined. In such a "case of failure," a different approach involving multiplication by $x$ and differentiation of the operator is required.
Thus, the formula $\frac{1}{f(-a^2)} \cos ax$ is valid if and only if (iff) $f(-a^2) \neq 0$.