4. (2002 Beijing Science College Entrance Exam) It is known that $f(x)$ is an odd function defined on $(-3,3)$. When $0<x<3$, the graph of $f(x)$ is shown in Figure 1-3. The solution set of the inequality $f(x) \cos x<0$ is
A. $\left(-3,-\frac{\pi}{2}\right) \cup(0,1) \cup\left(\frac{\pi}{2}, 3\right)$
B. $\left(-\frac{\pi}{2},-1\right) \cup(0,1) \cup\left(\frac{\pi}{2}, 3\right)$
C. $(-3,-1) \cup(0,1) \cup(1,3)$
D. $\left(-3,-\frac{\pi}{2}\right) \cup(0,1) \cup(1,3)$
4. B From the problem, we can construct an auxiliary function
$$
f(x)=-(x-2)^{2}+1(00,\end{array}\right.$ or $\left\{\begin{array}{l}f(x)>0, \\ \cos x<0,\end{array}\right.$ It is easy to solve that (B) is correct.