If the real valued function \( f(x) = \begin{cases} \frac{\cos 3x - \cos x}{x \sin x}, & \text{if } x < 0 \\ p, & \text{if } x = 0 \\ \frac{\log(1 + q \sin x)}{x}, & \text{if } x > 0 \end{cases} \) is continuous at \( x = 0 \), then \( p + q = \)
Show Hint
For continuity problems, the core task is to evaluate the left-hand limit, the right-hand limit, and the function value at the point. Utilize standard limits like $\lim_{x\to 0} \frac{\sin x}{x}=1$ and $\lim_{x\to 0} \frac{\log(1+x)}{x}=1$ to simplify calculations.