<s>[INST] Why can't $\frac{1}{\sin(x)\cos(x)}$ be expressed in the form $\frac{A}{\sin x}+\frac{B}{\cos x}$ I've tried expressing $\frac{1}{\sin(x)\cos(x)}$ as partial fractions:
$$\frac{1}{\sin(x)\cos(x)} = \frac{A}{\sin x}+\frac{B}{\cos x}
\implies 1=A\cos x + B\sin x$$
I let $x=\frac{\pi}{2}$, getting $A=-1$. Then I let $x=\pi$, getting $B=1$. This means that $1=\cos x-\sin x$ which is obviously wrong most of the time.
But why is it wrong? If the denominator had something like $(x^2-1)$ I still can get a correct answer for different values I substitute.
 [/INST] \begin{align}
   \sin \sin x + \cos x \cos x &= 1 \\
   \dfrac{\sin x \sin x}{\sin x \cos x} + \dfrac{\cos x \cos x}{\sin x \cos x} 
      &= \dfrac{1}{\sin x \cos x} \\
   \dfrac{\sin x}{\cos x} + \dfrac{\cos x}{\sin x} 
      &= \dfrac{1}{\sin x \cos x} \\
\end{align}
</s>